Skip to content

routier-collection


routier-collection / plugins/sql-core/src / toColumnAssignments

Function: toColumnAssignments() ​

toColumnAssignments<T>(delta, schema, dialect, entity?): ColumnAssignment[]

Defined in: plugins/sql-core/src/columns.ts:124

Maps a delta to the columns it assigns.

Unknown keys are skipped rather than thrown on: a delta is data arriving from another layer, and a property that no longer exists in the schema should not take down a save that is otherwise valid. Callers that care can compare lengths.

Type Parameters ​

T ​

T extends object

Parameters ​

delta ​

Record<string, unknown>

schema ​

CompiledSchema<T>

dialect ​

SqlDialect

entity? ​

Record<string, unknown>

Returns ​

ColumnAssignment[]

Released under the MIT License.