kysely
    Preparing search index...

    Type Alias ColumnType<SelectType, InsertType, UpdateType>

    This type can be used to specify a different type for select, insert and update operations.

    Also see the Generated type.

    The next example defines a number column that is optional in inserts and updates. All columns are always optional in updates so therefore we don't need to specify undefined for the update type. The type below is useful for all kinds of database generated columns like identifiers. The Generated type is actually just a shortcut for the type in this example:

    type GeneratedNumber = ColumnType<number, number | undefined, number>
    

    The above example makes the column optional in inserts and updates, but you can still choose to provide the column. If you want to prevent insertion/update you can se the type as never:

    type ReadonlyNumber = ColumnType<number, never, never>
    

    Here's one more example where the type is different for each different operation:

    type UnupdateableDate = ColumnType<Date, string, never>
    

    Type Parameters

    Index

    Properties

    __insert__: InsertType
    __select__: SelectType
    __update__: UpdateType