Last updated 2026-11-27
Grammar reference
Why this matters. One language for everything your AI needs from its memory: this page lists every statement it can send. Part of NQL, under Performance (Always there) · Who we are.
Nexsus is driven by statements sent through its five tools. This page lists every kind of statement, the tool that runs it and its form, as a signed-in workspace reads them with DESCRIBE grammar. In a form, [ ] marks an optional part and | a choice.
Read from the service on 16 November 2026: DESCRIBE grammar listed 32 statement kinds, 71 clause forms, 83 keywords, 21 operators, 6 pseudo-columns and 18 worked examples. This page also lists the 6 statement kinds DESCRIBE grammar does not list yet, and leaves out 9 notes the service gives only inside a workspace.
Reading in pages, by meaning and through history
Paging
A read with no LIMIT answers at most 50 rows, one page. When that page is full, the answer carries the notice PAGE_FULL; ask for the next page as the read's own form gives it: LIMIT with OFFSET for a SELECT, LIMIT with AFTER for HISTORY. ABOUT over the whole workspace (FROM WORKSPACE()) answers five rows unless LIMIT says otherwise: the five is ABOUT's own, as the paper gives it, and NEAREST TO names no count of its own; the next page of a SELECT, a ranked read included, is LIMIT with OFFSET, as its form [ LIMIT n [ OFFSET m ] ] gives it, for example LIMIT 20 OFFSET 20; HISTORY pages with LIMIT and AFTER, as its section below says, and CHANGES() takes LIMIT alone.
One reply carries at most 60,000 characters. A longer value is read back in parts: the refusal names the statement to send.
The refusal: REPLY_TOO_LARGE
By meaning
ABOUT: Ranks the rows by meaning: ABOUT '<text>' keeps the rows whose meaning is close to the text, best first, with their relevance; one per read, FROM <model> or FROM WORKSPACE() (every content model, five rows unless LIMIT); the reply names the threshold used and what was held back.NEAREST TO: Ranks the rows by meaning against a record: NEAREST TO <code> uses that record's stored meaning, the record itself first when it is a row of the read; one per read, FROM <model> or FROM WORKSPACE().relevance: The similarity of a row to the search, 0 to 1, served on a ranked read only (WHERE ABOUT or NEAREST TO); filtered by relevance >= <x> alone, which replaces the default threshold for that read.
The examples below are the service's own; two are refusals, each shown with its class: relevance asked for on a plain read, and NEAREST TO a record that is not searchable; the other two are the ranked reads that serve relevance.
SELECT relevance FROM example_itemsSELECT label, relevance FROM example_items WHERE ABOUT 'first item' AND relevance >= 0.3SELECT label, relevance FROM example_items WHERE NEAREST TO <code>SELECT * FROM WORKSPACE() WHERE ABOUT 'first item' LIMIT 5
Through history
SELECT * FROM HISTORY(chain) [ AS OF bound | BETWEEN bound AND bound ] [ SINCE HORIZON ] [ DIRECTION ASC | DESC ] [ LIMIT integer ] [ AFTER code ]HISTORY lists the versions of one record; ask for the next page with LIMIT and AFTER the last code returned.
Each example below reads through time with SELECT: the first reads the code, the version number and the instant written (valid_from) of each row of example_items written on or after 1 January 2026 (UTC); the second reads at most five rows of CHANGES(), the list of changes, whose full form is SELECT * FROM CHANGES(model) SINCE instant [ UNTIL instant ] [ LIMIT integer ].
SELECT code, version, valid_from FROM example_items WHERE valid_from >= '2026-01-01'SELECT * FROM CHANGES() LIMIT 5
Statement kinds
nexsus_query:HISTORY,PREVIEW_ALTER_FIELD,PREVIEW_ARCHIVE,PREVIEW_ARCHIVE_MODEL,PREVIEW_CLOSE,PREVIEW_REASSIGN,PREVIEW_RESTORE,PREVIEW_RESTORE_FIELD,SELECT,SHOW_FIELDS,SHOW_MODELSnexsus_write:ARCHIVE,INSERT,LINK,REASSIGN,RESTORE,UNLINK,UPDATEnexsus_evolve:ALTER_FIELD,ALTER_FLOOR,ALTER_MODEL,ARCHIVE_FIELD,ARCHIVE_MODEL,CREATE_FLOOR,CREATE_MODEL,MOVE_FLOOR,MOVE_MODEL,RESTORE_FIELD,RESTORE_MODELnexsus_govern:ABANDON_CLOSE,ADVANCE_CLOSE,CLOSE,GRANT_RELATION,OPEN_CLOSE,REVOKE_RELATION,SHOW_CLOSE,SHOW_GRANTSnexsus_reference:DESCRIBE
nexsus_query
HISTORY
Tool: nexsus_query
SELECT * FROM HISTORY(chain) [ AS OF bound | BETWEEN bound AND bound ] [ SINCE HORIZON ] [ DIRECTION ASC | DESC ] [ LIMIT integer ] [ AFTER code ]PREVIEW_ALTER_FIELD
Tool: nexsus_query
PREVIEW ALTER FIELD field_ref property_assignment ( <,> property_assignment )*Clause forms
| Name | Form |
|---|---|
RENAME_TO | RENAME TO name_literal |
SET_TYPE | SET TYPE type_token |
SET_REQUIRED | SET REQUIRED bool_literal |
SET_INDEXED | SET INDEXED bool_literal |
SET_DISPLAY_ORDER | SET DISPLAY ORDER integer_literal |
SET_TARGET_MODEL | SET TARGET MODEL model_ref |
SET_PURPOSE | SET PURPOSE string_literal |
SET_ALLOWED_VALUES | SET ALLOWED VALUES ( <(> scalar_literal ( <,> scalar_literal )* <)> | NULL ) |
SET_INTENT | SET INTENT intent_literal |
PREVIEW_ARCHIVE
Tool: nexsus_query
PREVIEW ARCHIVE FROM model WHERE predicate [ CASCADE ] [ EXPECT REACH fingerprint ] [ DEPTH integer ] [ LIMIT integer ]Previews: ARCHIVE
Clause forms
| Name | Form |
|---|---|
CASCADE | CASCADE (acknowledgment of the identical reach) |
EXPECT_REACH | EXPECT REACH value |
DEPTH | DEPTH value |
LIMIT | LIMIT value |
PREVIEW_ARCHIVE_MODEL
Tool: nexsus_query
PREVIEW ARCHIVE MODEL modelPreviews: ARCHIVE_MODEL
PREVIEW_CLOSE
Tool: nexsus_query
PREVIEW CLOSE close_codePreviews: ADVANCE_CLOSE
PREVIEW_REASSIGN
Tool: nexsus_query
PREVIEW REASSIGN reassign_bodyPreviews: REASSIGN
Clause forms
| Name | Form |
|---|---|
FIELD_ADDRESSED | field addressed relationship population TO target |
RELATIONSHIP_ADDRESSED | relationship addressed relationship population TO target |
EDGE_ADDRESSED | edge addressed relationship population TO target |
OUTBOUND_SET | outbound set relationship population TO target |
INBOUND_SET | inbound set relationship population TO target |
PREVIEW_RESTORE
Tool: nexsus_query
PREVIEW RESTORE FROM model WHERE predicate [ CASCADE ] [ STRICT ] [ EXPECT REACH fingerprint ] [ DEPTH integer ] [ LIMIT integer ]Previews: RESTORE
Clause forms
| Name | Form |
|---|---|
CASCADE | CASCADE (acknowledgment of the identical reach) |
EXPECT_REACH | EXPECT REACH value |
STRICT | STRICT value |
DEPTH | DEPTH value |
LIMIT | LIMIT value |
PREVIEW_RESTORE_FIELD
Tool: nexsus_query
PREVIEW RESTORE FIELD field_ref ( <,> property_assignment )*Clause forms
| Name | Form |
|---|---|
RENAME_TO | RENAME TO name_literal |
SET_TYPE | SET TYPE type_token |
SET_REQUIRED | SET REQUIRED bool_literal |
SET_INDEXED | SET INDEXED bool_literal |
SET_DISPLAY_ORDER | SET DISPLAY ORDER integer_literal |
SET_TARGET_MODEL | SET TARGET MODEL model_ref |
SET_PURPOSE | SET PURPOSE string_literal |
SET_ALLOWED_VALUES | SET ALLOWED VALUES ( <(> scalar_literal ( <,> scalar_literal )* <)> | NULL ) |
SET_INTENT | SET INTENT intent_literal |
SELECT
Tool: nexsus_query
SELECT * | column [, column] FROM model [ WHERE predicate ] [ ORDER BY field [ ASC | DESC ] [, field [ ASC | DESC ]] ] [ LIMIT n [ OFFSET m ] ]Clause forms
| Name | Form |
|---|---|
SCHEMA_AS_OF | FOR SYSTEM_VERSION AS OF instant |
AGGREGATE | COUNT | SUM | AVG | MIN | MAX ( payload_column ) [ GROUP BY payload_column ] [ HAVING aggregate_predicate ] |
CHANGES_WINDOW | SELECT * FROM CHANGES(model) SINCE instant [ UNTIL instant ] [ LIMIT integer ] |
SHOW_FIELDS
Tool: nexsus_query
SHOW FIELDS [ FROM | IN ] modelSHOW_MODELS
Tool: nexsus_query
SHOW MODELS [ LIMIT n [ OFFSET m ] ]nexsus_write
ARCHIVE
Tool: nexsus_write
ARCHIVE FROM model WHERE predicate [ CASCADE ] [ EXPECT REACH fingerprint ]Clause forms
| Name | Form |
|---|---|
CASCADE | CASCADE (acknowledgment of the identical reach) |
EXPECT_REACH | EXPECT REACH value |
INSERT
Tool: nexsus_write
INSERT INTO model (field) VALUES (value)LINK
Tool: nexsus_write
LINK RELATIONSHIP kind ON source TO targetREASSIGN
Tool: nexsus_write
REASSIGN reassign_bodyClause forms
| Name | Form |
|---|---|
FIELD_ADDRESSED | field addressed relationship population TO target |
RELATIONSHIP_ADDRESSED | relationship addressed relationship population TO target |
EDGE_ADDRESSED | edge addressed relationship population TO target |
OUTBOUND_SET | outbound set relationship population TO target |
INBOUND_SET | inbound set relationship population TO target |
RESTORE
Tool: nexsus_write
RESTORE FROM model WHERE predicate [ CASCADE ] [ STRICT ] [ EXPECT REACH fingerprint ]Clause forms
| Name | Form |
|---|---|
CASCADE | CASCADE (acknowledgment of the identical reach) |
EXPECT_REACH | EXPECT REACH value |
STRICT | STRICT value |
UNLINK
Tool: nexsus_write
UNLINK EDGE edge_chainUPDATE
Tool: nexsus_write
UPDATE record_coordinate SET field = literalnexsus_evolve
ALTER_FIELD
Tool: nexsus_evolve
ALTER FIELD field_ref property_assignment ( <,> property_assignment )* [ EXPECT VERSION integer ]Clause forms
| Name | Form |
|---|---|
RENAME_TO | RENAME TO name_literal |
SET_TYPE | SET TYPE type_token |
SET_REQUIRED | SET REQUIRED bool_literal |
SET_INDEXED | SET INDEXED bool_literal |
SET_DISPLAY_ORDER | SET DISPLAY ORDER integer_literal |
SET_TARGET_MODEL | SET TARGET MODEL model_ref |
SET_PURPOSE | SET PURPOSE string_literal |
SET_ALLOWED_VALUES | SET ALLOWED VALUES ( <(> scalar_literal ( <,> scalar_literal )* <)> | NULL ) |
SET_INTENT | SET INTENT intent_literal |
SET_RELATIONSHIP_INTENT | SET RELATIONSHIP INTENT token |
ALTER_FLOOR
Tool: nexsus_evolve
ALTER FLOOR floor ( SET PURPOSE text | RENAME TO floor )Clause forms
| Name | Form |
|---|---|
SET_PURPOSE | SET PURPOSE text |
RENAME_TO | RENAME TO floor |
ALTER_MODEL
Tool: nexsus_evolve
ALTER MODEL model ( ADD COLUMN field ( TEXT | NUMBER | DATE | BOOLEAN ) [ NOT NULL ] | ADD COLUMN field REFERENCES model | SET PURPOSE text | RENAME TO name )Clause forms
| Name | Form |
|---|---|
ADD_COLUMN | ADD COLUMN field TYPE type |
SET_PURPOSE | SET PURPOSE text |
ARCHIVE_FIELD
Tool: nexsus_evolve
ARCHIVE FIELD field_ref [ EXPECT VERSION integer ]ARCHIVE_MODEL
Tool: nexsus_evolve
ARCHIVE MODEL modelCREATE_FLOOR
Tool: nexsus_evolve
CREATE FLOOR floor [ PARENT floor ] [ PURPOSE text ]Clause forms
| Name | Form |
|---|---|
PARENT | PARENT floor |
PURPOSE | PURPOSE text |
CREATE_MODEL
Tool: nexsus_evolve
CREATE MODEL model [ PURPOSE text ] [ IN FLOOR floor ] ( field type [ NOT NULL ] | field REFERENCES model ( <,> ... )* ) [ IN FLOOR floor ]MOVE_FLOOR
Tool: nexsus_evolve
MOVE FLOOR floor UNDER floorClause forms
| Name | Form |
|---|---|
UNDER | UNDER floor |
MOVE_MODEL
Tool: nexsus_evolve
MOVE MODEL model TO FLOOR floorRESTORE_FIELD
Tool: nexsus_evolve
RESTORE FIELD field_ref ( <,> property_assignment )* [ EXPECT VERSION integer ]Clause forms
| Name | Form |
|---|---|
RENAME_TO | RENAME TO name_literal |
SET_TYPE | SET TYPE type_token |
SET_REQUIRED | SET REQUIRED bool_literal |
SET_INDEXED | SET INDEXED bool_literal |
SET_DISPLAY_ORDER | SET DISPLAY ORDER integer_literal |
SET_TARGET_MODEL | SET TARGET MODEL model_ref |
SET_PURPOSE | SET PURPOSE string_literal |
SET_ALLOWED_VALUES | SET ALLOWED VALUES ( <(> scalar_literal ( <,> scalar_literal )* <)> | NULL ) |
SET_INTENT | SET INTENT intent_literal |
RESTORE_MODEL
Tool: nexsus_evolve
RESTORE MODEL modelnexsus_govern
ABANDON_CLOSE
Tool: nexsus_govern
ABANDON CLOSE close_code REASON textADVANCE_CLOSE
Tool: nexsus_govern
ADVANCE CLOSE close_code TO state [ REPAIR REASON text ]CLOSE
Tool: nexsus_govern
CLOSE operation AT instantGRANT_RELATION
Tool: nexsus_govern
GRANT WRITE ON RELATION relationOPEN_CLOSE
Tool: nexsus_govern
OPEN CLOSE ON scope CUT instant GRACE integer DAYS PURPOSE textREVOKE_RELATION
Tool: nexsus_govern
REVOKE WRITE ON RELATION relationSHOW_CLOSE
Tool: nexsus_govern
SHOW CLOSE [ close_code ]SHOW_GRANTS
Tool: nexsus_govern
SHOW GRANTSnexsus_reference
DESCRIBE
Tool: nexsus_reference
DESCRIBE grammarKeywords
Reserved
ADDALTERARCHIVECASCADECOLUMNFLOORFLOORSFROMINSERTINTOMODELORDERRESTORESELECTSETTOVALUESVERSION
Soft
ABANDONADVANCEAFTERALLOWEDASASCATAVGAXESBETWEENBYCHANGESCLOSECOUNTCUTDAYSDEPTHDESCDIRECTIONDISPLAYEDGEEXPECTFIELDFORGRACEGRAMMARGROUPHAVINGHISTORYHORIZONININBOUNDINDEXEDINTENTINVARIANTSLIKELIMITLINKMAXMINNOTOFOFFSETOPENPAPERSPREVIEWREACHREASONREASSIGNREFERENCESREFUSALSRELATIONSHIPRENAMEREPAIRREQUIREDSINCESTRICTSUMSYSTEM_VERSIONTARGETTYPEUNLINKUNTILVIOLATIONSWORKSPACE
Operators
=: Equal to the value.<>: Not equal to the value.!=: Not equal to the value, the same as <>.<: Less than the value.<=: Less than or equal to the value.>: Greater than the value.>=: Greater than or equal to the value.LIKE: Matches a text pattern, case-blind; % stands for any run of characters and _ for one.NOT LIKE: Does not match the text pattern.IN: Equal to one of the listed values.NOT IN: Equal to none of the listed values.BETWEEN: Between the two values, both included.NOT BETWEEN: Outside the two values.IS NULL: The field has no value.IS NOT NULL: The field has a value.AND: Both conditions hold.OR: Either condition holds.NOT: The condition does not hold.LINKED TO: The record is linked to the given record, through any relationship or the one named after VIA, within DEPTH steps.ABOUT: Ranks the rows by meaning: ABOUT '<text>' keeps the rows whose meaning is close to the text, best first, with their relevance; one per read, FROM <model> or FROM WORKSPACE() (every content model, five rows unless LIMIT); the reply names the threshold used and what was held back.NEAREST TO: Ranks the rows by meaning against a record: NEAREST TO <code> uses that record's stored meaning, the record itself first when it is a row of the read; one per read, FROM <model> or FROM WORKSPACE().
Pseudo-columns
code: The 40-digit code of the record version a row serves; WHERE code = <code> reads one record.nexsus_code: Another name for code.version: The version number of the record version a row serves; it filters and sorts.valid_from: The instant the record version a row serves was written; it filters by instant or by whole UTC day and sorts.meaning_line: The sentence the record version a row serves carries, composed when it was written; it filters as text (=, <>, LIKE, IN) and sorts, and it is withheld when the read masks any value of the row.relevance: The similarity of a row to the search, 0 to 1, served on a ranked read only (WHERE ABOUT or NEAREST TO); filtered by relevance >= <x> alone, which replaces the default threshold for that read.
Worked examples
select
Tool: nexsus_query
SELECT * FROM example_items LIMIT 10Answered
Tool: nexsus_query
SELECT label, amount FROM example_items ORDER BY amount DESCAnswered
writes
Tool: nexsus_write
INSERT INTO example_items (label, amount) VALUES ('first', 10)Answered
Tool: nexsus_write
DELETE FROM example_items WHERE label = 'first'Answered
filters
Tool: nexsus_query
SELECT * FROM example_items WHERE amount > 5 AND label LIKE 'f%'Answered
Tool: nexsus_query
SELECT * FROM example_items WHERE amount BETWEEN 1 AND 100 AND label IS NOT NULLAnswered
semantic
Tool: nexsus_query
SELECT label, relevance FROM example_items WHERE ABOUT 'first item' AND relevance >= 0.3Answered
Tool: nexsus_query
SELECT label, relevance FROM example_items WHERE NEAREST TO <code>Refused: NEAREST_SEED_NOT_SEARCHABLE
Tool: nexsus_query
SELECT * FROM WORKSPACE() WHERE ABOUT 'first item' LIMIT 5Answered
temporal
Tool: nexsus_query
SELECT code, version, valid_from FROM example_items WHERE valid_from >= '2026-01-01'Answered
Tool: nexsus_query
SELECT * FROM CHANGES() LIMIT 5Answered
analytics
Tool: nexsus_query
SELECT COUNT(*) FROM example_itemsAnswered
Tool: nexsus_query
SELECT label, SUM(amount) AS total FROM example_items GROUP BY labelAnswered
refusals
govern
Tool: nexsus_govern
SHOW GRANTSAnswered
Tool: nexsus_reference
DESCRIBE governAnswered
This page is evidence for Persistence, under the promise Always there:
This page is evidence for Sovereignty, under the promise Yours:
This page is evidence for Neutrality, under the promise Yours:
This page is evidence for Truth, under the promise Provable:
This page is evidence for Auditability, under the promise Provable:
This page is evidence for Transparency, under the promise Provable: