Remote / foldkit-remote-drizzle

CompileTarget

interface · packages/remote-drizzle/src/target.ts:29

interface CompileTarget {
  readonly table: Table
  readonly columns: Record<string, AnyColumn>
  readonly next?: Readonly<Record<string, AnyColumn | SQL>>
  readonly operators?: BindingOperators | undefined
  readonly context?: ExprContext | undefined
  readonly relations?: Readonly<Record<string, StoredRelation>> | undefined
  readonly reach?:
    | ((owner: EntityIdentity<string>) => Option.Option<CompileTarget>)
    | undefined
  readonly visibleOf?:
    ((owner: EntityIdentity<string>) => Option.Option<SQL>) | undefined
}

What a binding has to offer to be compiled against: a column per field key, and the table, whose dialect decides how text folds.

Members

CompileTarget.table

property · packages/remote-drizzle/src/target.ts:30

readonly table: Table

CompileTarget.columns

property · packages/remote-drizzle/src/target.ts:31

readonly columns: Record<string, AnyColumn>

CompileTarget.next

property · packages/remote-drizzle/src/target.ts:38

readonly next?: Readonly<Record<string, AnyColumn | SQL>>

Each field as the row a write would leave holds it, where a rule over a change reads one (Next): a moved or computed field is its expression, and a field it does not name is its column, which a write that leaves the field alone leaves as it is.

CompileTarget.operators

property · packages/remote-drizzle/src/target.ts:43

readonly operators?: BindingOperators | undefined

How primitive operators are run: in SQL, and in memory for a predicate decided from the input alone. Both kernels when not given.

CompileTarget.context

property · packages/remote-drizzle/src/target.ts:49

readonly context?: ExprContext | undefined

What Expr.viewer and Expr.now read for this request: the server's viewer of the principal, and its clock. A body reading either is refused where none is given.

CompileTarget.relations

property · packages/remote-drizzle/src/target.ts:51

readonly relations?: Readonly<Record<string, StoredRelation>> | undefined

Its one relations, by key: a path leaves this table by one stored here ({ field }).

CompileTarget.reach

property · packages/remote-drizzle/src/target.ts:53

readonly reach?:
  | ((owner: EntityIdentity<string>) => Option.Option<CompileTarget>)
  | undefined

The binding of each Entity a path or an exists may reach, by identity; bind sets it.

CompileTarget.visibleOf

property · packages/remote-drizzle/src/target.ts:59

readonly visibleOf?:
  ((owner: EntityIdentity<string>) => Option.Option<SQL>) | undefined

The rows this request's reader may see of each table reached: its visible, resolved for the principal. A body that reaches another table is refused without it, rather than read rows its reader may not see.