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.

Through history

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 ].

Statement kinds

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

NameForm
RENAME_TORENAME TO name_literal
SET_TYPESET TYPE type_token
SET_REQUIREDSET REQUIRED bool_literal
SET_INDEXEDSET INDEXED bool_literal
SET_DISPLAY_ORDERSET DISPLAY ORDER integer_literal
SET_TARGET_MODELSET TARGET MODEL model_ref
SET_PURPOSESET PURPOSE string_literal
SET_ALLOWED_VALUESSET ALLOWED VALUES ( <(> scalar_literal ( <,> scalar_literal )* <)> | NULL )
SET_INTENTSET 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

NameForm
CASCADECASCADE (acknowledgment of the identical reach)
EXPECT_REACHEXPECT REACH value
DEPTHDEPTH value
LIMITLIMIT value

PREVIEW_ARCHIVE_MODEL

Tool: nexsus_query

PREVIEW ARCHIVE MODEL model

Previews: ARCHIVE_MODEL

PREVIEW_CLOSE

Tool: nexsus_query

PREVIEW CLOSE close_code

Previews: ADVANCE_CLOSE

PREVIEW_REASSIGN

Tool: nexsus_query

PREVIEW REASSIGN reassign_body

Previews: REASSIGN

Clause forms

NameForm
FIELD_ADDRESSEDfield addressed relationship population TO target
RELATIONSHIP_ADDRESSEDrelationship addressed relationship population TO target
EDGE_ADDRESSEDedge addressed relationship population TO target
OUTBOUND_SEToutbound set relationship population TO target
INBOUND_SETinbound 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

NameForm
CASCADECASCADE (acknowledgment of the identical reach)
EXPECT_REACHEXPECT REACH value
STRICTSTRICT value
DEPTHDEPTH value
LIMITLIMIT value

PREVIEW_RESTORE_FIELD

Tool: nexsus_query

PREVIEW RESTORE FIELD field_ref ( <,> property_assignment )*

Clause forms

NameForm
RENAME_TORENAME TO name_literal
SET_TYPESET TYPE type_token
SET_REQUIREDSET REQUIRED bool_literal
SET_INDEXEDSET INDEXED bool_literal
SET_DISPLAY_ORDERSET DISPLAY ORDER integer_literal
SET_TARGET_MODELSET TARGET MODEL model_ref
SET_PURPOSESET PURPOSE string_literal
SET_ALLOWED_VALUESSET ALLOWED VALUES ( <(> scalar_literal ( <,> scalar_literal )* <)> | NULL )
SET_INTENTSET 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

NameForm
SCHEMA_AS_OFFOR SYSTEM_VERSION AS OF instant
AGGREGATECOUNT | SUM | AVG | MIN | MAX ( payload_column ) [ GROUP BY payload_column ] [ HAVING aggregate_predicate ]
CHANGES_WINDOWSELECT * FROM CHANGES(model) SINCE instant [ UNTIL instant ] [ LIMIT integer ]

SHOW_FIELDS

Tool: nexsus_query

SHOW FIELDS [ FROM | IN ] model

SHOW_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

NameForm
CASCADECASCADE (acknowledgment of the identical reach)
EXPECT_REACHEXPECT REACH value

INSERT

Tool: nexsus_write

INSERT INTO model (field) VALUES (value)

REASSIGN

Tool: nexsus_write

REASSIGN reassign_body

Clause forms

NameForm
FIELD_ADDRESSEDfield addressed relationship population TO target
RELATIONSHIP_ADDRESSEDrelationship addressed relationship population TO target
EDGE_ADDRESSEDedge addressed relationship population TO target
OUTBOUND_SEToutbound set relationship population TO target
INBOUND_SETinbound set relationship population TO target

RESTORE

Tool: nexsus_write

RESTORE FROM model WHERE predicate [ CASCADE ] [ STRICT ] [ EXPECT REACH fingerprint ]

Clause forms

NameForm
CASCADECASCADE (acknowledgment of the identical reach)
EXPECT_REACHEXPECT REACH value
STRICTSTRICT value

UPDATE

Tool: nexsus_write

UPDATE record_coordinate SET field = literal

nexsus_evolve

ALTER_FIELD

Tool: nexsus_evolve

ALTER FIELD field_ref property_assignment ( <,> property_assignment )* [ EXPECT VERSION integer ]

Clause forms

NameForm
RENAME_TORENAME TO name_literal
SET_TYPESET TYPE type_token
SET_REQUIREDSET REQUIRED bool_literal
SET_INDEXEDSET INDEXED bool_literal
SET_DISPLAY_ORDERSET DISPLAY ORDER integer_literal
SET_TARGET_MODELSET TARGET MODEL model_ref
SET_PURPOSESET PURPOSE string_literal
SET_ALLOWED_VALUESSET ALLOWED VALUES ( <(> scalar_literal ( <,> scalar_literal )* <)> | NULL )
SET_INTENTSET INTENT intent_literal
SET_RELATIONSHIP_INTENTSET RELATIONSHIP INTENT token

ALTER_FLOOR

Tool: nexsus_evolve

ALTER FLOOR floor ( SET PURPOSE text | RENAME TO floor )

Clause forms

NameForm
SET_PURPOSESET PURPOSE text
RENAME_TORENAME 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

NameForm
ADD_COLUMNADD COLUMN field TYPE type
SET_PURPOSESET PURPOSE text

ARCHIVE_FIELD

Tool: nexsus_evolve

ARCHIVE FIELD field_ref [ EXPECT VERSION integer ]

ARCHIVE_MODEL

Tool: nexsus_evolve

ARCHIVE MODEL model

CREATE_FLOOR

Tool: nexsus_evolve

CREATE FLOOR floor [ PARENT floor ] [ PURPOSE text ]

Clause forms

NameForm
PARENTPARENT floor
PURPOSEPURPOSE 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 floor

Clause forms

NameForm
UNDERUNDER floor

MOVE_MODEL

Tool: nexsus_evolve

MOVE MODEL model TO FLOOR floor

RESTORE_FIELD

Tool: nexsus_evolve

RESTORE FIELD field_ref ( <,> property_assignment )* [ EXPECT VERSION integer ]

Clause forms

NameForm
RENAME_TORENAME TO name_literal
SET_TYPESET TYPE type_token
SET_REQUIREDSET REQUIRED bool_literal
SET_INDEXEDSET INDEXED bool_literal
SET_DISPLAY_ORDERSET DISPLAY ORDER integer_literal
SET_TARGET_MODELSET TARGET MODEL model_ref
SET_PURPOSESET PURPOSE string_literal
SET_ALLOWED_VALUESSET ALLOWED VALUES ( <(> scalar_literal ( <,> scalar_literal )* <)> | NULL )
SET_INTENTSET INTENT intent_literal

RESTORE_MODEL

Tool: nexsus_evolve

RESTORE MODEL model

nexsus_govern

ABANDON_CLOSE

Tool: nexsus_govern

ABANDON CLOSE close_code REASON text

ADVANCE_CLOSE

Tool: nexsus_govern

ADVANCE CLOSE close_code TO state [ REPAIR REASON text ]

CLOSE

Tool: nexsus_govern

CLOSE operation AT instant

GRANT_RELATION

Tool: nexsus_govern

GRANT WRITE ON RELATION relation

OPEN_CLOSE

Tool: nexsus_govern

OPEN CLOSE ON scope CUT instant GRACE integer DAYS PURPOSE text

REVOKE_RELATION

Tool: nexsus_govern

REVOKE WRITE ON RELATION relation

SHOW_CLOSE

Tool: nexsus_govern

SHOW CLOSE [ close_code ]

SHOW_GRANTS

Tool: nexsus_govern

SHOW GRANTS

nexsus_reference

DESCRIBE

Tool: nexsus_reference

DESCRIBE grammar

Keywords

Reserved

  • ADD
  • ALTER
  • ARCHIVE
  • CASCADE
  • COLUMN
  • FLOOR
  • FLOORS
  • FROM
  • INSERT
  • INTO
  • MODEL
  • ORDER
  • RESTORE
  • SELECT
  • SET
  • TO
  • VALUES
  • VERSION

Soft

  • ABANDON
  • ADVANCE
  • AFTER
  • ALLOWED
  • AS
  • ASC
  • AT
  • AVG
  • AXES
  • BETWEEN
  • BY
  • CHANGES
  • CLOSE
  • COUNT
  • CUT
  • DAYS
  • DEPTH
  • DESC
  • DIRECTION
  • DISPLAY
  • EDGE
  • EXPECT
  • FIELD
  • FOR
  • GRACE
  • GRAMMAR
  • GROUP
  • HAVING
  • HISTORY
  • HORIZON
  • IN
  • INBOUND
  • INDEXED
  • INTENT
  • INVARIANTS
  • LIKE
  • LIMIT
  • LINK
  • MAX
  • MIN
  • NOT
  • OF
  • OFFSET
  • OPEN
  • PAPERS
  • PREVIEW
  • REACH
  • REASON
  • REASSIGN
  • REFERENCES
  • REFUSALS
  • RELATIONSHIP
  • RENAME
  • REPAIR
  • REQUIRED
  • SINCE
  • STRICT
  • SUM
  • SYSTEM_VERSION
  • TARGET
  • TYPE
  • UNLINK
  • UNTIL
  • VIOLATIONS
  • WORKSPACE

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 10

Answered

Tool: nexsus_query

SELECT label, amount FROM example_items ORDER BY amount DESC

Answered

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 NULL

Answered

semantic

Tool: nexsus_query

SELECT relevance FROM example_items

Refused: PSEUDO_COLUMN_NOT_SERVED

Tool: nexsus_query

SELECT label, relevance FROM example_items WHERE ABOUT 'first item' AND relevance >= 0.3

Answered

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 5

Answered

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 5

Answered

analytics

Tool: nexsus_query

SELECT COUNT(*) FROM example_items

Answered

Tool: nexsus_query

SELECT label, SUM(amount) AS total FROM example_items GROUP BY label

Answered

refusals

Tool: nexsus_query

SELECT colour FROM example_items

Refused: UNKNOWN_FIELD_NAME

Tool: nexsus_write

SELECT * FROM example_items

Refused: WRONG_VERB

govern

Tool: nexsus_govern

SHOW GRANTS

Answered

Tool: nexsus_reference

DESCRIBE govern

Answered

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: