SQLiteTableFn< TTableName extends string, TColumnsMap extends Record< string, SQLiteColumnBuilderBase< ColumnBuilderBaseConfig<ColumnDataType, string>, object, >, >,>( name: TTableName, columns: TColumnsMap, extraConfig?: ( self: { [Key in string | number | symbol]: SQLiteColumn< { baseColumn: (
Omit<TColumnsMap[Key]["_"], "name"> & { name: (...)
[(...)
]["name"] extends "" ? Assume<Key, string> : (...)
[(...)
]["name"]; } )
extends { baseBuilder: U } ? Column< { baseColumn: U["_"] extends { baseBuilder: U } ? (
Column<{ name: U["_"]["name"]; tableName: TTableName; dataType: U["_"]["dataType"]; columnType: U["_"]["columnType"]; data: U["_"] extends { $type: infer U; } ? U : U["_"]["data"]; ... 9 more ...; generated: U["_"] extends { ...; } ? unknown extends G ? undefined : G extends undefined ? undefined : G : undefined; },...
)
: never; columnType: U["_"]["columnType"]; data: U["_"] extends { $type: U } ? U : (...)
[(...)
]["data"]; dataType: U["_"]["dataType"]; driverParam: U["_"]["driverParam"]; enumValues: U["_"]["enumValues"]; generated: U["_"] extends { generated: G } ? unknown extends G ? undefined : (...)
extends (...)
? (...)
: (...)
: undefined; hasDefault: U["_"] extends { hasDefault: true } ? true : false; hasRuntimeDefault: U["_"] extends { hasRuntimeDefault: true } ? true : false; identity: U["_"] extends { identity: "always" } ? "always" : (...)
[(...)
] extends { identity: ...
} ? "byDefault" : undefined; isAutoincrement: U["_"] extends { isAutoincrement: true } ? true : false; isPrimaryKey: U["_"] extends { isPrimaryKey: true } ? true : false; name: U["_"]["name"]; notNull: U["_"] extends { notNull: true } ? true : false; tableName: TTableName; }, {}, { [K in string | number | symbol]: Omit< (...)
[(...)
], | (...)
| (...)
| (...)
| (...)
| (...)
| (...)
| (...)
| (...)
| (...)
| (...)
| (...)
| (...)
| (...)
| (...)
| (...)
| (...)
| (...)
, >[K] }, > : never; columnType: (
Omit<TColumnsMap[Key]["_"], "name"> & { name: (...)
[(...)
]["name"] extends "" ? Assume<Key, string> : (...)
[(...)
]["name"]; } )
["columnType"]; data: (
Omit<TColumnsMap[Key]["_"], "name"> & { name: (...)
[(...)
]["name"] extends "" ? Assume<Key, string> : (...)
[(...)
]["name"]; } )
extends { $type: U } ? U : (
Omit<(...)
[(...)
]["_"], "name"> & { name: (...)
[(...)
] extends "" ? Assume<(...)
, (...)
> : (...)
[(...)
]; } )
["data"]; dataType: (
Omit<TColumnsMap[Key]["_"], "name"> & { name: (...)
[(...)
]["name"] extends "" ? Assume<Key, string> : (...)
[(...)
]["name"]; } )
["dataType"]; driverParam: (
Omit<TColumnsMap[Key]["_"], "name"> & { name: (...)
[(...)
]["name"] extends "" ? Assume<Key, string> : (...)
[(...)
]["name"]; } )
["driverParam"]; enumValues: (
Omit<TColumnsMap[Key]["_"], "name"> & { name: (...)
[(...)
]["name"] extends "" ? Assume<Key, string> : (...)
[(...)
]["name"]; } )
["enumValues"]; generated: (
Omit<TColumnsMap[Key]["_"], "name"> & { name: (...)
[(...)
]["name"] extends "" ? Assume<Key, string> : (...)
[(...)
]["name"]; } )
extends { generated: G } ? unknown extends G ? undefined : G extends undefined ? undefined : G : undefined; hasDefault: (
Omit<TColumnsMap[Key]["_"], "name"> & { name: (...)
[(...)
]["name"] extends "" ? Assume<Key, string> : (...)
[(...)
]["name"]; } )
extends { hasDefault: true } ? true : false; hasRuntimeDefault: (
Omit<TColumnsMap[Key]["_"], "name"> & { name: (...)
[(...)
]["name"] extends "" ? Assume<Key, string> : (...)
[(...)
]["name"]; } )
extends { hasRuntimeDefault: true } ? true : false; identity: (
Omit<TColumnsMap[Key]["_"], "name"> & { name: (...)
[(...)
]["name"] extends "" ? Assume<Key, string> : (...)
[(...)
]["name"]; } )
extends { identity: "always" } ? "always" : (
Omit<(...)
[(...)
]["_"], "name"> & { name: (...)
[(...)
] extends "" ? Assume<(...)
, (...)
> : (...)
[(...)
]; } )
extends { identity: "byDefault" } ? "byDefault" : undefined; isAutoincrement: (
Omit<TColumnsMap[Key]["_"], "name"> & { name: (...)
[(...)
]["name"] extends "" ? Assume<Key, string> : (...)
[(...)
]["name"]; } )
extends { isAutoincrement: true } ? true : false; isPrimaryKey: (
Omit<TColumnsMap[Key]["_"], "name"> & { name: (...)
[(...)
]["name"] extends "" ? Assume<Key, string> : (...)
[(...)
]["name"]; } )
extends { isPrimaryKey: true } ? true : false; name: (
Omit<TColumnsMap[Key]["_"], "name"> & { name: (...)
[(...)
]["name"] extends "" ? Assume<Key, string> : (...)
[(...)
]["name"]; } )
["name"]; notNull: (
Omit<TColumnsMap[Key]["_"], "name"> & { name: (...)
[(...)
]["name"] extends "" ? Assume<Key, string> : (...)
[(...)
]["name"]; } )
extends { notNull: true } ? true : false; tableName: TTableName; }, {}, { [K in string | number | symbol]: Omit< Omit<(...)
[(...)
]["_"], "name"> & { name: (...)
[(...)
] extends "" ? Assume<(...)
, (...)
> : (...)
[(...)
]; }, | "dialect" | "name" | "data" | "driverParam" | "tableName" | "notNull" | "hasDefault" | "isPrimaryKey" | "isAutoincrement" | "hasRuntimeDefault" | "dataType" | "columnType" | "enumValues" | "identity" | "brand" | "baseColumn" | "generated", >[K] }, > }, ) => SQLiteTableExtraConfig,): SQLiteTableWithColumns< { columns: { [Key in string | number | symbol]: SQLiteColumn< { baseColumn: (
Omit<TColumnsMap[Key]["_"], "name"> & { name: (...)
[(...)
]["name"] extends "" ? Assume<Key, string> : (...)
[(...)
]["name"]; } )
extends { baseBuilder: U } ? Column< { baseColumn: U["_"] extends { baseBuilder: U } ? (
Column<{ name: U["_"]["name"]; tableName: TTableName; dataType: U["_"]["dataType"]; columnType: U["_"]["columnType"]; data: U["_"] extends { $type: infer U; } ? U : U["_"]["data"]; ... 9 more ...; generated: U["_"] extends { ...; } ? unknown extends G ? undefined : G extends undefined ? undefined : G : undefined; },...
)
: never; columnType: U["_"]["columnType"]; data: U["_"] extends { $type: U } ? U : (...)
[(...)
]["data"]; dataType: U["_"]["dataType"]; driverParam: U["_"]["driverParam"]; enumValues: U["_"]["enumValues"]; generated: U["_"] extends { generated: G } ? unknown extends G ? undefined : (...)
extends (...)
? (...)
: (...)
: undefined; hasDefault: U["_"] extends { hasDefault: true } ? true : false; hasRuntimeDefault: U["_"] extends { hasRuntimeDefault: true } ? true : false; identity: U["_"] extends { identity: "always" } ? "always" : (...)
[(...)
] extends { identity: ...
} ? "byDefault" : undefined; isAutoincrement: U["_"] extends { isAutoincrement: true } ? true : false; isPrimaryKey: U["_"] extends { isPrimaryKey: true } ? true : false; name: U["_"]["name"]; notNull: U["_"] extends { notNull: true } ? true : false; tableName: TTableName; }, {}, { [K in string | number | symbol]: Omit< (...)
[(...)
], | (...)
| (...)
| (...)
| (...)
| (...)
| (...)
| (...)
| (...)
| (...)
| (...)
| (...)
| (...)
| (...)
| (...)
| (...)
| (...)
| (...)
, >[K] }, > : never; columnType: (
Omit<TColumnsMap[Key]["_"], "name"> & { name: (...)
[(...)
]["name"] extends "" ? Assume<Key, string> : (...)
[(...)
]["name"]; } )
["columnType"]; data: (
Omit<TColumnsMap[Key]["_"], "name"> & { name: (...)
[(...)
]["name"] extends "" ? Assume<Key, string> : (...)
[(...)
]["name"]; } )
extends { $type: U } ? U : (
Omit<(...)
[(...)
]["_"], "name"> & { name: (...)
[(...)
] extends "" ? Assume<(...)
, (...)
> : (...)
[(...)
]; } )
["data"]; dataType: (
Omit<TColumnsMap[Key]["_"], "name"> & { name: (...)
[(...)
]["name"] extends "" ? Assume<Key, string> : (...)
[(...)
]["name"]; } )
["dataType"]; driverParam: (
Omit<TColumnsMap[Key]["_"], "name"> & { name: (...)
[(...)
]["name"] extends "" ? Assume<Key, string> : (...)
[(...)
]["name"]; } )
["driverParam"]; enumValues: (
Omit<TColumnsMap[Key]["_"], "name"> & { name: (...)
[(...)
]["name"] extends "" ? Assume<Key, string> : (...)
[(...)
]["name"]; } )
["enumValues"]; generated: (
Omit<TColumnsMap[Key]["_"], "name"> & { name: (...)
[(...)
]["name"] extends "" ? Assume<Key, string> : (...)
[(...)
]["name"]; } )
extends { generated: G } ? unknown extends G ? undefined : G extends undefined ? undefined : G : undefined; hasDefault: (
Omit<TColumnsMap[Key]["_"], "name"> & { name: (...)
[(...)
]["name"] extends "" ? Assume<Key, string> : (...)
[(...)
]["name"]; } )
extends { hasDefault: true } ? true : false; hasRuntimeDefault: (
Omit<TColumnsMap[Key]["_"], "name"> & { name: (...)
[(...)
]["name"] extends "" ? Assume<Key, string> : (...)
[(...)
]["name"]; } )
extends { hasRuntimeDefault: true } ? true : false; identity: (
Omit<TColumnsMap[Key]["_"], "name"> & { name: (...)
[(...)
]["name"] extends "" ? Assume<Key, string> : (...)
[(...)
]["name"]; } )
extends { identity: "always" } ? "always" : (
Omit<(...)
[(...)
]["_"], "name"> & { name: (...)
[(...)
] extends "" ? Assume<(...)
, (...)
> : (...)
[(...)
]; } )
extends { identity: "byDefault" } ? "byDefault" : undefined; isAutoincrement: (
Omit<TColumnsMap[Key]["_"], "name"> & { name: (...)
[(...)
]["name"] extends "" ? Assume<Key, string> : (...)
[(...)
]["name"]; } )
extends { isAutoincrement: true } ? true : false; isPrimaryKey: (
Omit<TColumnsMap[Key]["_"], "name"> & { name: (...)
[(...)
]["name"] extends "" ? Assume<Key, string> : (...)
[(...)
]["name"]; } )
extends { isPrimaryKey: true } ? true : false; name: (
Omit<TColumnsMap[Key]["_"], "name"> & { name: (...)
[(...)
]["name"] extends "" ? Assume<Key, string> : (...)
[(...)
]["name"]; } )
["name"]; notNull: (
Omit<TColumnsMap[Key]["_"], "name"> & { name: (...)
[(...)
]["name"] extends "" ? Assume<Key, string> : (...)
[(...)
]["name"]; } )
extends { notNull: true } ? true : false; tableName: TTableName; }, {}, { [K in string | number | symbol]: Omit< Omit<(...)
[(...)
]["_"], "name"> & { name: (...)
[(...)
] extends "" ? Assume<(...)
, (...)
> : (...)
[(...)
]; }, | "dialect" | "name" | "data" | "driverParam" | "tableName" | "notNull" | "hasDefault" | "isPrimaryKey" | "isAutoincrement" | "hasRuntimeDefault" | "dataType" | "columnType" | "enumValues" | "identity" | "brand" | "baseColumn" | "generated", >[K] }, > }; dialect: "sqlite"; name: TTableName; schema: TSchema; },>
Deprecated
The third parameter of sqliteTable is changing and will only accept an array instead of an object
Example
Deprecated version:
New API: