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;
}>;
类型声明
列
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;
}>;
};
columns.access_token
access_token: DefaultSQLiteColumn<{
columnType: "SQLiteText";
data: string;
dataType: "string";
notNull: boolean;
}>;
类型声明
列类型
columnType: "SQLiteText";
数据
data: string;
数据类型
dataType: "string";
非空
notNull: boolean;
columns.expires_at
expires_at: DefaultSQLiteColumn<{
columnType: "SQLiteInteger";
data: number;
dataType: "number";
notNull: boolean;
}>;
类型声明
列类型
columnType: "SQLiteInteger";
数据
data: number;
数据类型
dataType: "number";
非空
notNull: boolean;
columns.id_token
id_token: DefaultSQLiteColumn<{
columnType: "SQLiteText";
data: string;
dataType: "string";
notNull: boolean;
}>;
类型声明
列类型
columnType: "SQLiteText";
数据
data: string;
数据类型
dataType: "string";
非空
notNull: boolean;
columns.provider
provider: DefaultSQLiteColumn<{
columnType: "SQLiteText";
data: string;
dataType: "string";
notNull: true;
}>;
类型声明
列类型
columnType: "SQLiteText";
数据
data: string;
数据类型
dataType: "string";
非空
notNull: true;
columns.providerAccountId
providerAccountId: DefaultSQLiteColumn<{
columnType: "SQLiteText";
data: string;
dataType: "string";
notNull: true;
}>;
类型声明
列类型
columnType: "SQLiteText";
数据
data: string;
数据类型
dataType: "string";
非空
notNull: true;
columns.refresh_token
refresh_token: DefaultSQLiteColumn<{
columnType: "SQLiteText";
data: string;
dataType: "string";
notNull: boolean;
}>;
类型声明
列类型
columnType: "SQLiteText";
数据
data: string;
数据类型
dataType: "string";
非空
notNull: boolean;
columns.scope
scope: DefaultSQLiteColumn<{
columnType: "SQLiteText";
data: string;
dataType: "string";
notNull: boolean;
}>;
类型声明
列类型
columnType: "SQLiteText";
数据
data: string;
数据类型
dataType: "string";
非空
notNull: boolean;
columns.session_state
session_state: DefaultSQLiteColumn<{
columnType: "SQLiteText";
data: string;
dataType: "string";
notNull: boolean;
}>;
类型声明
列类型
columnType: "SQLiteText";
数据
data: string;
数据类型
dataType: "string";
非空
notNull: boolean;
columns.token_type
token_type: DefaultSQLiteColumn<{
columnType: "SQLiteText";
data: string;
dataType: "string";
notNull: boolean;
}>;
类型声明
列类型
columnType: "SQLiteText";
数据
data: string;
数据类型
dataType: "string";
非空
notNull: boolean;
columns.type
type: DefaultSQLiteColumn<{
columnType: "SQLiteText";
data: string;
dataType: "string";
notNull: true;
}>;
类型声明
columnType
columnType: "SQLiteText";
data
data: string;
dataType
dataType: "string";
notNull
notNull: true;
columns.userId
userId: DefaultSQLiteColumn<{
columnType: "SQLiteText";
data: string;
dataType: "string";
notNull: true;
}>;
类型声明
columnType
columnType: "SQLiteText";
data
data: string;
dataType
dataType: "string";
notNull
notNull: true;
dialect
dialect: "sqlite";
name
name: string;
schema
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;
}>;
类型声明
columns
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;
}>;
};
columns.counter
counter: DefaultSQLiteColumn<{
columnType: "SQLiteInteger";
data: number;
dataType: "number";
notNull: true;
}>;
类型声明
columnType
columnType: "SQLiteInteger";
data
data: number;
dataType
dataType: "number";
notNull
notNull: true;
columns.credentialBackedUp
credentialBackedUp: DefaultSQLiteColumn<{
columnType: "SQLiteBoolean";
data: boolean;
dataType: "boolean";
notNull: true;
}>;
类型声明
columnType
columnType: "SQLiteBoolean";
data
data: boolean;
dataType
dataType: "boolean";
notNull
notNull: true;
columns.credentialDeviceType
credentialDeviceType: DefaultSQLiteColumn<{
columnType: "SQLiteText";
data: string;
dataType: "string";
notNull: true;
}>;
类型声明
columnType
columnType: "SQLiteText";
data
data: string;
dataType
dataType: "string";
notNull
notNull: true;
columns.credentialID
credentialID: DefaultSQLiteColumn<{
columnType: "SQLiteText";
data: string;
dataType: "string";
notNull: true;
}>;
类型声明
columnType
columnType: "SQLiteText";
data
data: string;
dataType
dataType: "string";
notNull
notNull: true;
columns.credentialPublicKey
credentialPublicKey: DefaultSQLiteColumn<{
columnType: "SQLiteText";
data: string;
dataType: "string";
notNull: true;
}>;
类型声明
columnType
columnType: "SQLiteText";
data
data: string;
dataType
dataType: "string";
notNull
notNull: true;
columns.providerAccountId
providerAccountId: DefaultSQLiteColumn<{
columnType: "SQLiteText";
data: string;
dataType: "string";
notNull: true;
}>;
类型声明
columnType
columnType: "SQLiteText";
data
data: string;
dataType
dataType: "string";
notNull
notNull: true;
columns.transports
transports: DefaultSQLiteColumn<{
columnType: "SQLiteText";
data: string;
dataType: "string";
notNull: false;
}>;
类型声明
columnType
columnType: "SQLiteText";
data
data: string;
dataType
dataType: "string";
notNull
notNull: false;
columns.userId
userId: DefaultSQLiteColumn<{
columnType: "SQLiteText";
data: string;
dataType: "string";
notNull: true;
}>;
类型声明
columnType
columnType: "SQLiteText";
data
data: string;
dataType
dataType: "string";
notNull
notNull: true;
dialect
dialect: "sqlite";
name
name: string;
schema
schema: string | undefined;
DefaultSQLiteSchema
type DefaultSQLiteSchema: {
accountsTable: DefaultSQLiteAccountsTable;
authenticatorsTable: DefaultSQLiteAuthenticatorTable;
sessionsTable: DefaultSQLiteSessionsTable;
usersTable: DefaultSQLiteUsersTable;
verificationTokensTable: DefaultSQLiteVerificationTokenTable;
};
类型声明
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;
}>;
类型声明
columns
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;
}>;
};
columns.expires
expires: DefaultSQLiteColumn<{
columnType: "SQLiteTimestamp";
data: Date;
dataType: "date";
notNull: true;
}>;
类型声明
columnType
columnType: "SQLiteTimestamp";
data
data: Date;
dataType
dataType: "date";
notNull
notNull: true;
columns.sessionToken
sessionToken: DefaultSQLiteColumn<{
columnType: "SQLiteText";
data: string;
dataType: "string";
isPrimaryKey: true;
notNull: true;
}>;
类型声明
columnType
columnType: "SQLiteText";
data
data: string;
dataType
dataType: "string";
isPrimaryKey
isPrimaryKey: true;
notNull
notNull: true;
columns.userId
userId: DefaultSQLiteColumn<{
columnType: "SQLiteText";
data: string;
dataType: "string";
notNull: true;
}>;
类型声明
columnType
columnType: "SQLiteText";
data
data: string;
dataType
dataType: "string";
notNull
notNull: true;
dialect
dialect: "sqlite";
name
name: string;
schema
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;
}>;
类型声明
columns
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;
}>;
};
columns.email
email: DefaultSQLiteColumn<{
columnType: "SQLiteText";
data: string;
dataType: "string";
notNull: boolean;
}>;
类型声明
columnType
columnType: "SQLiteText";
data
data: string;
dataType
dataType: "string";
notNull
notNull: boolean;
columns.emailVerified
emailVerified: DefaultSQLiteColumn<{
columnType: "SQLiteTimestamp";
data: Date;
dataType: "date";
notNull: boolean;
}>;
类型声明
columnType
columnType: "SQLiteTimestamp";
data
data: Date;
dataType
dataType: "date";
notNull
notNull: boolean;
columns.id
id: DefaultSQLiteColumn<{
columnType: "SQLiteText";
data: string;
dataType: "string";
isPrimaryKey: true;
notNull: true;
}>;
类型声明
columnType
columnType: "SQLiteText";
data
data: string;
dataType
dataType: "string";
isPrimaryKey
isPrimaryKey: true;
notNull
notNull: true;
columns.image
image: DefaultSQLiteColumn<{
columnType: "SQLiteText";
data: string;
dataType: "string";
notNull: boolean;
}>;
类型声明
columnType
columnType: "SQLiteText";
data
data: string;
dataType
dataType: "string";
notNull
notNull: boolean;
columns.name
name: DefaultSQLiteColumn<{
columnType: "SQLiteText";
data: string;
dataType: "string";
notNull: boolean;
}>;
类型声明
columnType
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;
}>;
类型声明
列
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;
}>;
};
columns.expires
expires: DefaultSQLiteColumn<{
columnType: "SQLiteTimestamp";
data: Date;
dataType: "date";
notNull: true;
}>;
类型声明
列类型
columnType: "SQLiteTimestamp";
数据
data: Date;
数据类型
dataType: "date";
非空
notNull: true;
columns.identifier
identifier: DefaultSQLiteColumn<{
columnType: "SQLiteText";
data: string;
dataType: "string";
notNull: true;
}>;
类型声明
列类型
columnType: "SQLiteText";
数据
data: string;
数据类型
dataType: "string";
非空
notNull: true;
columns.token
token: DefaultSQLiteColumn<{
columnType: "SQLiteText";
data: string;
dataType: "string";
notNull: true;
}>;
类型声明
列类型
columnType: "SQLiteText";
数据
data: string;
数据类型
dataType: "string";
非空
notNull: true;
方言
dialect: "sqlite";
名称
name: string;
架构
schema: string | undefined;
SQLiteDrizzleAdapter()
SQLiteDrizzleAdapter(client, schema?): Adapter
参数
参数 | 类型 |
---|---|
客户端 | BaseSQLiteDatabase <"sync" | "async" , any , any , ExtractTablesWithRelations <any >> |
模式 ? | DefaultSQLiteSchema |
返回值
defineTables()
defineTables(schema): Required<DefaultSQLiteSchema>
参数
参数 | 类型 |
---|---|
模式 | Partial <DefaultSQLiteSchema > |