A shortcut for defining database-generated columns. The type
is the same for all selects, inserts and updates but the
column is optional for inserts and updates.
The implementation:
// The update type is `S` instead of `S | undefined` because // updates are always optional --> no need to specify optionality. typeGenerated<S> = ColumnType<S, S | undefined, S>
A shortcut for defining database-generated columns. The type is the same for all selects, inserts and updates but the column is optional for inserts and updates.
The implementation: