Remote / foldkit-remote-drizzle

returning

const · packages/remote-drizzle/src/index.ts:202

const returning: ((
  binding: AnyEntityBinding,
  fields: readonly string[],
) => {
  readonly columns: Record<string, AnyColumn>
  readonly patches: (
    rows: ReadonlyArray<Record<string, unknown>>,
  ) => ReadonlyArray<NormalizedPatch>
}) & {
  row: (
    binding: AnyEntityBinding,
    id: string,
  ) => Effect.Effect<
    ReadonlyArray<NormalizedPatch>,
    RemoteServerError,
    DrizzleDatabase
  >
}

The returning columns for fields and the normalization of the rows they yield, paired so a mutation cannot select one set of columns and normalize another.