Remote / foldkit-remote-drizzle

SqlContext

interface · packages/remote-drizzle/src/operators.ts:22

interface SqlContext {
  readonly args: ReadonlyArray<SQL>
  readonly dialect: 'sqlite' | 'postgres'
  readonly collation: Option.Option<Collation>
  readonly collate: (text: SQL) => SQL
}

What an implementation is handed to build its SQL.

Members

SqlContext.args

property · packages/remote-drizzle/src/operators.ts:24

readonly args: ReadonlyArray<SQL>

Each argument, compiled: a column, a parameter (cast on Postgres where its type needs one), or a call's SQL.

SqlContext.dialect

property · packages/remote-drizzle/src/operators.ts:25

readonly dialect: 'sqlite' | 'postgres'

SqlContext.collation

property · packages/remote-drizzle/src/operators.ts:27

readonly collation: Option.Option<Collation>

The collation the call compares text under, from its operator's collation rule.

SqlContext.collate

property · packages/remote-drizzle/src/operators.ts:33

readonly collate: (text: SQL) => SQL

Text under the call's collation, as this dialect writes it: binary as collate binary (SQLite) or collate "C" (Postgres), asciiFold as collate nocase or lower(… collate "C"). Text unchanged without one.