ObjectStackObjectStack

Driver

Driver protocol schemas

Common Driver Options Passed to most driver methods to control behavior (transactions, timeouts, etc.)

Source: packages/spec/src/data/driver.zod.ts

TypeScript Usage

import { DriverCapabilitiesSchema, DriverConfigSchema, DriverOptionsSchema, PoolConfigSchema } from '@objectstack/spec/data';
import type { DriverCapabilities, DriverConfig, DriverOptions, PoolConfig } from '@objectstack/spec/data';

// Validate data
const result = DriverCapabilitiesSchema.parse(data);

DriverCapabilities

Properties

PropertyTypeRequiredDescription
queryDateGranularityRecord<string, boolean>optionalPer-granularity native date bucketing (day/week/month/quarter/year). Missing keys fall back to in-memory bucketing.
autonumberbooleanoptionalDriver natively generates persistent autonumber/sequence values
batchSchemaSyncbooleanoptionalSupports batched schema sync to reduce schema DDL round-trips (absence = false)
createneveroptional[REMOVED] DriverCapabilities.create was removed in @objectstack/spec 17.0.0 (#4634, ADR-0049 enforce-or-remove) — no code in any repository ever read it, so its value never changed which code path ran. CRUD is not optional for a driver: create/find/findOne/update/delete are REQUIRED IDataDriver methods and the engine calls them unconditionally. Delete the key.
readneveroptional[REMOVED] DriverCapabilities.read was removed in @objectstack/spec 17.0.0 (#4634, ADR-0049 enforce-or-remove) — no code in any repository ever read it, so its value never changed which code path ran. CRUD is not optional for a driver: reads go through the REQUIRED find/findOne/count methods, called unconditionally. Delete the key.
updateneveroptional[REMOVED] DriverCapabilities.update was removed in @objectstack/spec 17.0.0 (#4634, ADR-0049 enforce-or-remove) — no code in any repository ever read it, so its value never changed which code path ran. CRUD is not optional for a driver: update/upsert are REQUIRED IDataDriver methods, called unconditionally. Delete the key.
deleteneveroptional[REMOVED] DriverCapabilities.delete was removed in @objectstack/spec 17.0.0 (#4634, ADR-0049 enforce-or-remove) — no code in any repository ever read it, so its value never changed which code path ran. CRUD is not optional for a driver: delete is a REQUIRED IDataDriver method, called unconditionally. Delete the key.
bulkCreateneveroptional[REMOVED] DriverCapabilities.bulkCreate was removed in @objectstack/spec 17.0.0 (#4634, ADR-0049 enforce-or-remove) — no code in any repository ever read it, so its value never changed which code path ran. The bulk methods (bulkCreate/bulkUpdate/bulkDelete) are REQUIRED IDataDriver methods and the engine calls them directly; wire-level batch capability is advertised by REST discovery from the live composition (#3298), never from this record. Delete the key.
bulkUpdateneveroptional[REMOVED] DriverCapabilities.bulkUpdate was removed in @objectstack/spec 17.0.0 (#4634, ADR-0049 enforce-or-remove) — no code in any repository ever read it, so its value never changed which code path ran. The bulk methods are REQUIRED IDataDriver methods and the engine calls them directly; wire-level batch capability is advertised by REST discovery from the live composition (#3298), never from this record. Delete the key.
bulkDeleteneveroptional[REMOVED] DriverCapabilities.bulkDelete was removed in @objectstack/spec 17.0.0 (#4634, ADR-0049 enforce-or-remove) — no code in any repository ever read it, so its value never changed which code path ran. The bulk methods are REQUIRED IDataDriver methods and the engine calls them directly; wire-level batch capability is advertised by REST discovery from the live composition (#3298), never from this record. Delete the key.
transactionsneveroptional[REMOVED] DriverCapabilities.transactions was removed in @objectstack/spec 17.0.0 (#4634, ADR-0049 enforce-or-remove) — no code in any repository ever read it, so its value never changed which code path ran. Transaction use is gated on METHOD PRESENCE — driver.beginTransaction (engine.transaction(), ADR-0034 ambient transactions): a driver without the method gets the non-transactional fallback, whatever this bit claimed. Discovery's transactionalBatch capability is likewise derived from engine.transaction plus the mounted batch route, never from this bit. Delete the key.
savepointsneveroptional[REMOVED] DriverCapabilities.savepoints was removed in @objectstack/spec 17.0.0 (#4634, ADR-0049 enforce-or-remove) — no code in any repository ever read it, so its value never changed which code path ran. No savepoint code path exists in the engine — a capability bit for a feature the platform does not call is a false affordance, not documentation. Delete the key.
isolationLevelsneveroptional[REMOVED] DriverCapabilities.isolationLevels was removed in @objectstack/spec 17.0.0 (#4634, ADR-0049 enforce-or-remove) — no code in any repository ever read it, so its value never changed which code path ran. Isolation is requested per transaction via beginTransaction({ isolationLevel }); no planner ever consulted this list to decide anything. Delete the key.
queryFiltersneveroptional[REMOVED] DriverCapabilities.queryFilters was removed in @objectstack/spec 17.0.0 (#4634, ADR-0049 enforce-or-remove) — no code in any repository ever read it, so its value never changed which code path ran. find() receives the full QueryAST (where/orderBy/limit/offset) and MUST execute all of it — the "ObjectQL will filter in memory" fallback this bit's description promised was never built. Delete the key.
querySortingneveroptional[REMOVED] DriverCapabilities.querySorting was removed in @objectstack/spec 17.0.0 (#4634, ADR-0049 enforce-or-remove) — no code in any repository ever read it, so its value never changed which code path ran. find() receives the full QueryAST and MUST execute all of it — the "ObjectQL will sort in memory" fallback this bit's description promised was never built. Delete the key.
queryPaginationneveroptional[REMOVED] DriverCapabilities.queryPagination was removed in @objectstack/spec 17.0.0 (#4634, ADR-0049 enforce-or-remove) — no code in any repository ever read it, so its value never changed which code path ran. find() receives the full QueryAST and MUST execute all of it — the "ObjectQL will paginate in memory" fallback this bit's description promised was never built. Delete the key.
queryAggregationsneveroptional[REMOVED] DriverCapabilities.queryAggregations was removed in @objectstack/spec 17.0.0 (#4634, ADR-0049 enforce-or-remove) — no code in any repository ever read it, so its value never changed which code path ran. Aggregate pushdown is decided by typeof driver.aggregate === 'function' plus queryDateGranularity (engine aggregate dispatch) — never by this bit. Delete the key.
queryWindowFunctionsneveroptional[REMOVED] DriverCapabilities.queryWindowFunctions was removed in @objectstack/spec 17.0.0 (#4634, ADR-0049 enforce-or-remove) — no code in any repository ever read it, so its value never changed which code path ran. ObjectQL never plans window functions through a driver, so there was nothing for the bit to switch on. Delete the key.
querySubqueriesneveroptional[REMOVED] DriverCapabilities.querySubqueries was removed in @objectstack/spec 17.0.0 (#4634, ADR-0049 enforce-or-remove) — no code in any repository ever read it, so its value never changed which code path ran. ObjectQL never plans subqueries through a driver, so there was nothing for the bit to switch on. Delete the key.
queryCTEneveroptional[REMOVED] DriverCapabilities.queryCTE was removed in @objectstack/spec 17.0.0 (#4634, ADR-0049 enforce-or-remove) — no code in any repository ever read it, so its value never changed which code path ran. ObjectQL never plans Common Table Expressions through a driver, so there was nothing for the bit to switch on. Delete the key.
joinsneveroptional[REMOVED] DriverCapabilities.joins was removed in @objectstack/spec 17.0.0 (#4634, ADR-0049 enforce-or-remove) — no code in any repository ever read it, so its value never changed which code path ran. Related data is resolved by the engine (lookup expansion over find()), not by driver-side JOIN planning — no code consulted the bit. Delete the key.
fullTextSearchneveroptional[REMOVED] DriverCapabilities.fullTextSearch was removed in @objectstack/spec 17.0.0 (#4634, ADR-0049 enforce-or-remove) — no code in any repository ever read it, so its value never changed which code path ran. $search is compiled by the engine into an $or of $contains predicates over the searchable fields (ADR-0061) and removed from the AST before the driver sees it — no driver-side full-text path exists. Delete the key.
jsonQueryneveroptional[REMOVED] DriverCapabilities.jsonQuery was removed in @objectstack/spec 17.0.0 (#4634, ADR-0049 enforce-or-remove) — no code in any repository ever read it, so its value never changed which code path ran. No engine path ever branched on driver-side JSON querying. Delete the key.
geospatialQueryneveroptional[REMOVED] DriverCapabilities.geospatialQuery was removed in @objectstack/spec 17.0.0 (#4634, ADR-0049 enforce-or-remove) — no code in any repository ever read it, so its value never changed which code path ran. No geospatial query path exists in the platform — declaring the bit advertised a capability nothing delivers. Delete the key.
streamingneveroptional[REMOVED] DriverCapabilities.streaming was removed in @objectstack/spec 17.0.0 (#4634, ADR-0049 enforce-or-remove) — no code in any repository ever read it, and findStream, the only read this bit could describe, was itself removed in 17.0.0 (#4484): nothing ever called it, and two of its three implementations materialised the entire result set before yielding. The bit carried the same defect one level up (SqlDriver implemented findStream yet declared streaming: false; InMemoryDriver declared true over a full-table read) — which is what zero readers makes inevitable. Page large reads through find() with limit/offset. Delete the key.
jsonFieldsneveroptional[REMOVED] DriverCapabilities.jsonFields was removed in @objectstack/spec 17.0.0 (#4634, ADR-0049 enforce-or-remove) — no code in any repository ever read it, so its value never changed which code path ran. Field-type handling is negotiated per object at syncSchema time by the driver itself (e.g. SqlDriver's per-object JSON/date column tracking); no engine path consulted the bit. Delete the key.
arrayFieldsneveroptional[REMOVED] DriverCapabilities.arrayFields was removed in @objectstack/spec 17.0.0 (#4634, ADR-0049 enforce-or-remove) — no code in any repository ever read it, so its value never changed which code path ran. Field-type handling is negotiated per object at syncSchema time by the driver itself; no engine path consulted the bit. Delete the key.
vectorSearchneveroptional[REMOVED] DriverCapabilities.vectorSearch was removed in @objectstack/spec 17.0.0 (#4634, ADR-0049 enforce-or-remove) — no code in any repository ever read it, so its value never changed which code path ran. No vector read path routes through IDataDriver. When one exists it should arrive WITH its caller and its capability bit together (the honest order under enforce-or-remove), not as a dangling boolean. Delete the key.
schemaSyncneveroptional[REMOVED] DriverCapabilities.schemaSync was removed in @objectstack/spec 17.0.0 (#4634, ADR-0049 enforce-or-remove) — no code in any repository ever read it, so its value never changed which code path ran. Schema sync is gated on METHOD PRESENCE — typeof driver.syncSchema === 'function' (engine and ObjectQL plugin init). Delete the key.
migrationsneveroptional[REMOVED] DriverCapabilities.migrations was removed in @objectstack/spec 17.0.0 (#4634, ADR-0049 enforce-or-remove) — no code in any repository ever read it, so its value never changed which code path ran. No migration engine ever consulted it. Delete the key.
indexesneveroptional[REMOVED] DriverCapabilities.indexes was removed in @objectstack/spec 17.0.0 (#4634, ADR-0049 enforce-or-remove) — no code in any repository ever read it, so its value never changed which code path ran. Declared indexes are materialised by the driver itself during schema sync (SqlDriver.syncDeclaredIndexes); no engine path consulted the bit. Delete the key.
connectionPoolingneveroptional[REMOVED] DriverCapabilities.connectionPooling was removed in @objectstack/spec 17.0.0 (#4634, ADR-0049 enforce-or-remove) — no code in any repository ever read it, so its value never changed which code path ran. Pooling is configured via poolConfig and owned by the driver; getPoolStats is duck-typed where monitoring wants it. Nothing consulted the bit. Delete the key.
preparedStatementsneveroptional[REMOVED] DriverCapabilities.preparedStatements was removed in @objectstack/spec 17.0.0 (#4634, ADR-0049 enforce-or-remove) — no code in any repository ever read it, so its value never changed which code path ran. Parameterised execution is an implementation detail of the driver (execute(command, parameters)); nothing consulted the bit. Delete the key.
queryCacheneveroptional[REMOVED] DriverCapabilities.queryCache was removed in @objectstack/spec 17.0.0 (#4634, ADR-0049 enforce-or-remove) — no code in any repository ever read it, so its value never changed which code path ran. No query-cache layer keyed off it exists; DriverOptions.skipCache is a per-call hint to the driver, not a switch on this bit. Delete the key.

DriverConfig

Properties

PropertyTypeRequiredDescription
namestringDriver instance name
typeEnum<'sql' | 'nosql' | 'cache' | 'search' | 'graph' | 'timeseries'>Driver type category
capabilities{ queryDateGranularity?: Record<string, boolean>; autonumber?: boolean; batchSchemaSync?: boolean }Driver capability flags
connectionStringstringoptionalDatabase connection string (driver-specific format)
poolConfig{ min: number; max: number; idleTimeoutMillis: number; connectionTimeoutMillis: number }optionalConnection pool configuration

DriverOptions

Properties

PropertyTypeRequiredDescription
transactionanyoptionalTransaction handle
timeoutnumberoptionalTimeout in ms
skipCachebooleanoptionalBypass cache
traceContextRecord<string, string>optionalOpenTelemetry context or request ID
tenantIdstringoptionalTenant Isolation identifier
tenantIdsstring[]optionalUnion tenant access set (group posture): native read scoping widens to organization_id IN (...); inserts still stamp from tenantId
timezonestringoptionalBusiness reference timezone (IANA) for date-dependent generation, e.g. autonumber date tokens
preserveAuditbooleanoptionalHistorical import: keep a supplied updated_at instead of force-stamping now (from ExecutionContext.preserveAudit)
bypassTenantAuditbooleanoptionalSuppress the driver tenant-audit warning for a deliberately global write on a tenant-scoped object (diagnostics only — never changes what the write touches)

PoolConfig

Properties

PropertyTypeRequiredDescription
minnumberMinimum number of connections in pool
maxnumberMaximum number of connections in pool
idleTimeoutMillisnumberTime in ms before idle connection is closed
connectionTimeoutMillisnumberTime in ms to wait for available connection

On this page