Remote / foldkit-remote-drizzle

EntityBinding

interface · packages/remote-drizzle/src/binding.ts:102

interface EntityBinding<
  Name extends string,
  Table extends DrizzleTable,
  F extends Schema.Struct.Fields = Schema.Struct.Fields,
  Relations extends Record<string, RelationBinding> = Record<
    string,
    RelationBinding
  >,
> extends EntityDescriptor<Name, F> {
  readonly table: Table
  readonly columns: Readonly<Record<string, AnyColumn>>
  readonly relations: Relations
  readonly computed: Readonly<Record<string, ComputedConfig>>
  readonly visible?: Visible | undefined
}

In the guides

Members

EntityBinding.table

property · packages/remote-drizzle/src/binding.ts:108

readonly table: Table

EntityBinding.columns

property · packages/remote-drizzle/src/binding.ts:109

readonly columns: Readonly<Record<string, AnyColumn>>

EntityBinding.relations

property · packages/remote-drizzle/src/binding.ts:110

readonly relations: Relations

EntityBinding.computed

property · packages/remote-drizzle/src/binding.ts:111

readonly computed: Readonly<Record<string, ComputedConfig>>

EntityBinding.visible

property · packages/remote-drizzle/src/binding.ts:118

readonly visible?: Visible | undefined

Which rows a principal may see at all; undefined for every row. It is on the binding because a table is read four ways (by id, as the children of a relation, as the target of a ref, through a query) and a rule on one of them would leave three open. A row it hides is, to that principal, not there.