Metakit / @doeixd/metakit/sql

SqlOptions

interface · packages/metakit/src/sql.ts:66

interface SqlOptions<D extends SqlDialect = SqlDialect> {
  readonly dialect?: D
  readonly rowPrefix?: Path.AnyPath
  readonly column?: ColumnName
  readonly env?: Readonly<Record<string, unknown>>
  readonly foreign?: ForeignLowerings
  readonly table?: string
  readonly relations?: RelationTables
}

Members

SqlOptions.dialect

property · packages/metakit/src/sql.ts:68

readonly dialect?: D

Default postgres; it also types what the statement binds (SqlParam).

SqlOptions.rowPrefix

property · packages/metakit/src/sql.ts:74

readonly rowPrefix?: Path.AnyPath

The slice of the environment that is the row: a path under it is a column, any other must be given in env. Default row; Path.root() reads every path as a column.

SqlOptions.column

property · packages/metakit/src/sql.ts:75

readonly column?: ColumnName

SqlOptions.env

property · packages/metakit/src/sql.ts:76

readonly env?: Readonly<Record<string, unknown>>

SqlOptions.foreign

property · packages/metakit/src/sql.ts:82

readonly foreign?: ForeignLowerings

The SQL of each foreign operation called, from lowerings(...) in @doeixd/metakit/operation/sql; a call it has no lowering of for the dialect is refused by its id@version.

SqlOptions.table

property · packages/metakit/src/sql.ts:84

readonly table?: string

The table of the row the predicate is asked of, which a subquery over its related rows names.

SqlOptions.relations

property · packages/metakit/src/sql.ts:85

readonly relations?: RelationTables