lib/sqlite
DefaultSQLiteAccountsTable
type DefaultSQLiteAccountsTable = SQLiteTableWithColumns<{ columns: { access_token: DefaultSQLiteColumn<{ columnType: "SQLiteText"; data: string; dataType: "string"; notNull: boolean; }>; expires_at: DefaultSQLiteColumn<{ columnType: "SQLiteInteger"; data: number; dataType: "number"; notNull: boolean; }>; id_token: DefaultSQLiteColumn<{ columnType: "SQLiteText"; data: string; dataType: "string"; notNull: boolean; }>; provider: DefaultSQLiteColumn<{ columnType: "SQLiteText"; data: string; dataType: "string"; notNull: true; }>; providerAccountId: DefaultSQLiteColumn<{ columnType: "SQLiteText"; data: string; dataType: "string"; notNull: true; }>; refresh_token: DefaultSQLiteColumn<{ columnType: "SQLiteText"; data: string; dataType: "string"; notNull: boolean; }>; scope: DefaultSQLiteColumn<{ columnType: "SQLiteText"; data: string; dataType: "string"; notNull: boolean; }>; session_state: DefaultSQLiteColumn<{ columnType: "SQLiteText"; data: string; dataType: "string"; notNull: boolean; }>; token_type: DefaultSQLiteColumn<{ columnType: "SQLiteText"; data: string; dataType: "string"; notNull: boolean; }>; type: DefaultSQLiteColumn<{ columnType: "SQLiteText"; data: string; dataType: "string"; notNull: true; }>; userId: DefaultSQLiteColumn<{ columnType: "SQLiteText"; data: string; dataType: "string"; notNull: true; }>; }; dialect: "sqlite"; name: string; schema: string | undefined; }>;
DefaultSQLiteAuthenticatorTable
type DefaultSQLiteAuthenticatorTable = SQLiteTableWithColumns<{ columns: { counter: DefaultSQLiteColumn<{ columnType: "SQLiteInteger"; data: number; dataType: "number"; notNull: true; }>; credentialBackedUp: DefaultSQLiteColumn<{ columnType: "SQLiteBoolean"; data: boolean; dataType: "boolean"; notNull: true; }>; credentialDeviceType: DefaultSQLiteColumn<{ columnType: "SQLiteText"; data: string; dataType: "string"; notNull: true; }>; credentialID: DefaultSQLiteColumn<{ columnType: "SQLiteText"; data: string; dataType: "string"; notNull: true; }>; credentialPublicKey: DefaultSQLiteColumn<{ columnType: "SQLiteText"; data: string; dataType: "string"; notNull: true; }>; providerAccountId: DefaultSQLiteColumn<{ columnType: "SQLiteText"; data: string; dataType: "string"; notNull: true; }>; transports: DefaultSQLiteColumn<{ columnType: "SQLiteText"; data: string; dataType: "string"; notNull: false; }>; userId: DefaultSQLiteColumn<{ columnType: "SQLiteText"; data: string; dataType: "string"; notNull: true; }>; }; dialect: "sqlite"; name: string; schema: string | undefined; }>;
DefaultSQLiteSchema
type DefaultSQLiteSchema = { accountsTable: DefaultSQLiteAccountsTable; authenticatorsTable: DefaultSQLiteAuthenticatorTable; sessionsTable: DefaultSQLiteSessionsTable; usersTable: DefaultSQLiteUsersTable; verificationTokensTable: DefaultSQLiteVerificationTokenTable; };
Type declaration
accountsTable
accountsTable: DefaultSQLiteAccountsTable;
authenticatorsTable?
optional authenticatorsTable: DefaultSQLiteAuthenticatorTable;
sessionsTable?
optional sessionsTable: DefaultSQLiteSessionsTable;
usersTable
usersTable: DefaultSQLiteUsersTable;
verificationTokensTable?
optional verificationTokensTable: DefaultSQLiteVerificationTokenTable;
DefaultSQLiteSessionsTable
type DefaultSQLiteSessionsTable = SQLiteTableWithColumns<{ columns: { expires: DefaultSQLiteColumn<{ columnType: "SQLiteTimestamp"; data: Date; dataType: "date"; notNull: true; }>; sessionToken: DefaultSQLiteColumn<{ columnType: "SQLiteText"; data: string; dataType: "string"; isPrimaryKey: true; notNull: true; }>; userId: DefaultSQLiteColumn<{ columnType: "SQLiteText"; data: string; dataType: "string"; notNull: true; }>; }; dialect: "sqlite"; name: string; schema: string | undefined; }>;
DefaultSQLiteUsersTable
type DefaultSQLiteUsersTable = SQLiteTableWithColumns<{ columns: { email: DefaultSQLiteColumn<{ columnType: "SQLiteText"; data: string; dataType: "string"; notNull: boolean; }>; emailVerified: DefaultSQLiteColumn<{ columnType: "SQLiteTimestamp"; data: Date; dataType: "date"; notNull: boolean; }>; id: DefaultSQLiteColumn<{ columnType: "SQLiteText"; data: string; dataType: "string"; isPrimaryKey: true; notNull: true; }>; image: DefaultSQLiteColumn<{ columnType: "SQLiteText"; data: string; dataType: "string"; notNull: boolean; }>; name: DefaultSQLiteColumn<{ columnType: "SQLiteText"; data: string; dataType: "string"; notNull: boolean; }>; }; dialect: "sqlite"; name: string; schema: string | undefined; }>;
DefaultSQLiteVerificationTokenTable
type DefaultSQLiteVerificationTokenTable = SQLiteTableWithColumns<{ columns: { expires: DefaultSQLiteColumn<{ columnType: "SQLiteTimestamp"; data: Date; dataType: "date"; notNull: true; }>; identifier: DefaultSQLiteColumn<{ columnType: "SQLiteText"; data: string; dataType: "string"; notNull: true; }>; token: DefaultSQLiteColumn<{ columnType: "SQLiteText"; data: string; dataType: "string"; notNull: true; }>; }; dialect: "sqlite"; name: string; schema: string | undefined; }>;
defineTables()
function defineTables(schema): Required<DefaultSQLiteSchema>
Parameters
Parameter | Type |
---|---|
schema | Partial <DefaultSQLiteSchema > |
Returns
SQLiteDrizzleAdapter()
function SQLiteDrizzleAdapter(client, schema?): Adapter
Parameters
Parameter | Type |
---|---|
client | BaseSQLiteDatabase <"sync" | "async" , any , any > |
schema ? | DefaultSQLiteSchema |