Skip to content

GuardedRawQuerySpec

Defined in: packages/client/src/index.ts:1261

A guarded query whose builder MAY embed a raw sql template fragment (ADR-0021). A raw fragment can name a lazy relation as a bare/unquoted identifier the compiled-SQL scan cannot see, so declare those relations in use — they are activated and awaited before the query runs. Pure-Drizzle reads need no use (the scan detects every relation): pass the builder callback directly to client.query.

TRegistry extends SyncTableRegistry

TRows extends readonly unknown[]

build: GuardedQueryFn<TRegistry, TRows>

Defined in: packages/client/src/index.ts:1263


optional use?: readonly SyncTableName<TRegistry>[]

Defined in: packages/client/src/index.ts:1262