InferModel
type InferModel<TTable extends AnyTable, TInferMode extends "select" | "insert" = "select", TConfig extends {
dbColumnNames: boolean;
} = {dbColumnNames: false;
}> = TInferMode extends "insert" ? Simplify<[Key in keyof TTable["_"]["columns"] & stringin keyof RequiredKeyOnly<MapColumnName<Key, TTable["_"]["columns"][Key], TConfig["dbColumnNames"]>, TTable["_"]["columns"][Key]>]: GetColumnData<TTable["_"]["columns"][Key], "query"> & [Key in keyof TTable["_"]["columns"] & stringin keyof OptionalKeyOnly<MapColumnName<Key, TTable["_"]["columns"][Key], TConfig["dbColumnNames"]>, TTable["_"]["columns"][Key]>]?: GetColumnData<TTable["_"]["columns"][Key], "query">> : [Key in keyof TTable["_"]["columns"] & stringin keyof MapColumnName<Key, TTable["_"]["columns"][Key], TConfig["dbColumnNames"]>]: GetColumnData<TTable["_"]["columns"][Key], "query">;§Type Parameters
§Type
§
TInferMode extends "insert" ? Simplify<[Key in keyof TTable["_"]["columns"] & stringin keyof RequiredKeyOnly<MapColumnName<Key, TTable["_"]["columns"][Key], TConfig["dbColumnNames"]>, TTable["_"]["columns"][Key]>]: GetColumnData<TTable["_"]["columns"][Key], "query"> & [Key in keyof TTable["_"]["columns"] & stringin keyof OptionalKeyOnly<MapColumnName<Key, TTable["_"]["columns"][Key], TConfig["dbColumnNames"]>, TTable["_"]["columns"][Key]>]?: GetColumnData<TTable["_"]["columns"][Key], "query">> : [Key in keyof TTable["_"]["columns"] & stringin keyof MapColumnName<Key, TTable["_"]["columns"][Key], TConfig["dbColumnNames"]>]: GetColumnData<TTable["_"]["columns"][Key], "query">
[src]