Protected_Protected_ProtecteddialectProtected ReadonlyoptionsProtected ReadonlynodeIn-memory registry of node/edge models defined through the builder.
Protected ReadonlyedgeReadonlynameThe name of the dialect
ReadonlylibraryThe database library or driver being used
ProtecteddefaultVariable name node properties are addressed through in generated queries.
Create a stored procedure (alias for createStoredProcedure)
Stored procedure options
Drop a stored procedure (alias for dropStoredProcedure)
Name of the stored procedure
Optionaloptions: DropStoredProcedureOptions
Drop options
Rename a column (default throws error)
Add a foreign key (default throws error)
Optional_options: anyBulk insert records (default implementation)
Optional_options: anyCreate a fulltext index (default throws error)
Optional_options: { parser?: string; comment?: string }Create a spatial index (default throws error)
Optional_options: { storage?: string; srid?: number }List all schemas in the database
Generate SQL for creating a database (default implementation)
Database creation options
Generate SQL for dropping a database
Database name to drop
Generate SQL for creating a savepoint
Optionalname: string
Savepoint name (optional, will be generated if not provided)
Generate SQL for releasing a savepoint
Savepoint name to release
Generate SQL for rolling back to a savepoint
Savepoint name to rollback to
Create a PostgreSQL extension (only supported in PostgreSQL)
Optional_options: CreateExtensionOptionsDrop a PostgreSQL extension (only supported in PostgreSQL)
Optional_options: DropExtensionOptionsGet all installed PostgreSQL extensions (only supported in PostgreSQL)
Array of extension information
Check if a PostgreSQL extension is installed (only supported in PostgreSQL)
True if the extension is installed
Create a PostgreSQL enum type (only supported in PostgreSQL)
Optional_options: CreateEnumTypeOptionsDrop a PostgreSQL type (only supported in PostgreSQL)
Optional_options: DropTypeOptionsCreate a PostgreSQL domain (only supported in PostgreSQL)
Optional_options: CreateDomainOptionsDrop a PostgreSQL domain (only supported in PostgreSQL)
Optional_options: DropDomainOptionsOptional_opts: { ifExists?: boolean; cascade?: boolean }Create a user mapping (default throws error)
Optional_options: anyDrop a user mapping (default throws error)
Optional_options: anyOptional_opts: FdwImportForeignSchemaOptionsOptional_options: anyOptional_options: anyOptional_host: stringOptional_options: anyOptional_options: anyOptional_options: anyOptional_options: anyBuild a JSON/JSONB path query Default implementation using common JSON extraction syntax
The JSON/JSONB column name
The JSON path to access (e.g., 'key' or 'key.subkey')
Optionalvalue: unknown
The value to compare against (optional)
The comparison operator to use (defaults to =)
SQL fragment and values for the JSON query
ProtectedformatFormat a value for SQL based on its type
ProtectedformatFormat a date for SQL
Replace placeholders in SQL with actual values Supports both named (:param) and positional (?) placeholders Properly escapes values to prevent SQL injection
Optionalreplacements: unknown[] | Record<string, unknown>ProtectedreplaceReplace positional (?) placeholders with escaped values
ProtectedreplaceReplace named (:param) placeholders with escaped values
ProtectedescapeEscape a replacement value for safe inclusion in SQL
ProtectedparseProtectedgetGet the isolation level SQL
OptionalisolationLevel: stringProtectedresolveResolve the 'all' include option to actual include configurations
ProtectedgenerateGenerate column list with proper aliasing to avoid duplicates
Optionalattributes: string[] | { include?: string[]; exclude?: string[] }Optionalincludes: { tableName: string; alias: string }[]ProtectedflattenFlatten nested includes to handle 'all' option
Get the current connection
Check if connected
Object-mode streaming: runs the query and pushes one row (or mapped
model instance) per chunk. Graph drivers don't share a common cursor
API, so this buffers the driver result and re-emits it — correct and
dialect-agnostic, matching the Model.findAllStream() contract.
Optionaloptions: StreamOptionsValues are parameterized, so escape is only a defensive fallback.
Escape an identifier (table name, column name, etc.)
The identifier to escape
Quote an identifier (column name, table name)
The identifier to quote
Quote a table name
The table name to quote
Optional_schema: string
Optional schema to prefix the table with
Coarse property-type name; graph stores are largely schemaless.
ProtectedrunRun a compiled statement, forwarding its params as query bindings.
Optionaloptions: QueryOptionsProtectedparamPositional param array for the SQL-shaped { sql, values } contract.
ProtectedrequirerandomOrderTerm, raising GraphCapabilityError when unsupported.
ProtectednormalizeTolerant Order -> [field, dir][] normalizer.
Also understands the asc() / desc() / random() order helpers from
src/operators.ts. They arrive as plain OrderExpression objects, so
without an explicit branch they fell through the $col/column check
below and were dropped silently — the helpers simply did nothing on
every graph dialect. random() becomes a 'RANDOM' term with no field,
which each compile* translates (or refuses) in its own language.
Optionalorder: OrderProtectedmapMap ORM include entries into graph traversal steps.
Optionalinclude: any[]Build a WHERE clause from a WhereOptions object
The where options
Optional_options: BuildOptions
Build options
Build an ORDER BY clause
The order options
Optional_options: BuildOptions
Build options
Build a LIMIT/OFFSET clause
Optionallimit: string | number
Limit value
Optionaloffset: string | number
Offset value
Build an INSERT query
Table name
Values to insert
Optional_options: InsertOptions
Query options
Build an UPDATE query
Table name
Values to update
Where clause
Optional_options: UpdateOptions
Query options
Build a DELETE query
Table name
Where clause
Optionaloptions: DeleteOptions
Query options
Build a SELECT query
Select options
Build an UPSERT query (insert or update on conflict)
Table name
Values to insert/update
Optionaloptions: UpsertQueryOptions
Upsert options
Build an increment query
Table name
Fields to increment
Where clause
Optionaloptions: { by?: number }
Query options (by: number)
ProtectedidentityIdentity property/properties for a label (defaults to id).
"CREATE TABLE" for a graph store = declare a node label and materialize
its schema hints: unique/primary-key columns become uniqueness
constraints, references columns become association edges, and indexed
columns become property indexes. Nodes themselves stay schemaless.
Optional_options: TableOptionsDrop a table
Name of the table
Optional_options: DropTableOptions
Additional options
Add an index to a table
Name of the table
Name of the index
Fields to index
Optional_options: IndexOptions
Index options
Create an index on a table with full options support
Name of the table
Index definition
Remove an index from a table
Name of the table
Name of the index
Drop an index from a table
Name of the table
Name of the index
Optional_options: DropIndexOptions
Drop options
Create a constraint on a table
Name of the table
Constraint definition
Drop a constraint from a table
Name of the table
Name of the constraint
Optional_options: DropConstraintOptions
Drop options
Add a constraint to a table
Remove a constraint from a table
Show all tables in the database
Show all views in the database
Show constraints for a table
Show indexes for a table
Describe a table (get column information)
Name of the table
Create a schema
Show all schemas in the database
Add a column to a table
Name of the table
Name of the new column
Column definition
Remove a column from a table
Name of the table
Name of the column to remove
Change a column definition
Name of the table
Name of the column to change
New column definition
Add comment to a table
Add comment to a column
Register a node model (label + property schema + associations).
Register an edge/relationship model between two node labels.
Create a node and return the driver result.
Find nodes matching a spec, returning the driver rows.
Update nodes matching a filter.
Delete nodes matching a filter (detaching their edges).
Optionalwhere: WhereOptionsMaterialize an ORM association write as a graph edge: matches the two endpoints by filter and connects them with the association's edge label.
Walk an association/edge from matching start node(s) — an include/join as a graph traversal.
Create a partitioned table (PostgreSQL 10+)
Create a partition for an existing partitioned table (PostgreSQL 10+)
Attach a partition to a partitioned table (PostgreSQL 11+)
Detach a partition from a partitioned table (PostgreSQL 11+)
Drop a partition (PostgreSQL 10+)
Create a database view
Optional_options: ViewOptionsDrop a database view
Optional_options: DropViewOptionsCreate a materialized view (PostgreSQL only)
Refresh a materialized view (PostgreSQL only)
Optional_options: RefreshOptionsDrop a materialized view (PostgreSQL only)
Optional_options: DropMaterializedViewOptionsCheck if a materialized view exists (PostgreSQL only)
True if the materialized view exists
Drop a stored procedure
Optional_options: DropStoredProcedureOptionsExecute a stored procedure
Query result
Check if a stored procedure exists
Optional_schema: stringTrue if the stored procedure exists
Drop a trigger
Optional_options: DropTriggerOptionsCheck if a trigger exists
True if the trigger exists
Drop a sequence (PostgreSQL)
Optional_options: DropSequenceOptionsGet next value from a sequence (PostgreSQL)
Next sequence value
Check if a sequence exists (PostgreSQL)
True if the sequence exists
Drop a policy (PostgreSQL RLS)
Optional_options: DropPolicyOptionsEnable row-level security on a table (PostgreSQL)
Optional_schema: stringDisable row-level security on a table (PostgreSQL)
Optional_schema: stringCheck if a policy exists (PostgreSQL RLS)
True if the policy exists
Create a partial index (index with WHERE clause)
Create an expression index
Create an identity column
Create a computed column
Rename a table
Current table name
New table name
Change owner of a table or view
Create a foreign data wrapper (PostgreSQL)
Drop a foreign data wrapper (PostgreSQL)
Create a foreign server (PostgreSQL)
Drop a foreign server (PostgreSQL)
Create a foreign table (PostgreSQL)
Create a security policy (MSSQL Row-Level Security)
Drop a security policy (MSSQL Row-Level Security)
ProtectedrandomTinkerPop shuffles with order().by(shuffle) — shuffle is a
comparator token, not a property name, so it is emitted as a bare
.by(shuffle) step (never quoted like a property key).
Connect to the database
Disconnect from the database
Execute a raw query
The SQL query string
Optionaloptions: QueryOptions
Query options
Get database version
Begin a new transaction
Optional_options: TransactionOptions
Transaction options
Commit a transaction
The transaction to commit
Rollback a transaction
The transaction to rollback
Render a normalized predicate tree into this dialect's filter syntax.
Compile a node find/match (+ include traversals) into a graph query.
Compile a node create (INSERT-equivalent).
Compile a node update (SET-equivalent) over a filter.
Compile a node delete over a filter (detach also removes its edges).
Compile an upsert (MERGE-equivalent) keyed on conflictKeys.
Compile a numeric increment of one or more properties.
Compile edge creation between two matched endpoints (association write).
Compile a (possibly variable-length) traversal from a start node.
Compile creation of a node-label constraint (unique / exists / key).
Optional_name: stringCompile dropping a named node-label constraint.
Compile creation of an index over node-label properties.
Optional_name: stringCompile a query listing all node labels in the store.
Abstract base class for database dialects Provides common functionality for all dialect implementations