Skip to content

Commit

Permalink
Fix types in Drizzle adapter (#1655)
Browse files Browse the repository at this point in the history
  • Loading branch information
pilcrowonpaper authored Aug 5, 2024
1 parent 869c3ff commit 3036a2e
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 1 deletion.
16 changes: 16 additions & 0 deletions packages/adapter-drizzle/src/drivers/mysql.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,10 @@ export type MySQLUserTable = MySqlTableWithColumns<{
hasDefault: boolean; // must be boolean instead of any to allow default values
enumValues: any;
baseColumn: any;
isPrimaryKey: any;
isAutoincrement: any;
hasRuntimeDefault: any;
generated: any;
},
object
>;
Expand All @@ -116,6 +120,10 @@ export type MySQLSessionTable = MySqlTableWithColumns<{
driverParam: any;
hasDefault: false;
name: any;
isPrimaryKey: any;
isAutoincrement: any;
hasRuntimeDefault: any;
generated: any;
},
object
>;
Expand All @@ -130,6 +138,10 @@ export type MySQLSessionTable = MySqlTableWithColumns<{
driverParam: any;
hasDefault: false;
name: any;
isPrimaryKey: any;
isAutoincrement: any;
hasRuntimeDefault: any;
generated: any;
},
object
>;
Expand All @@ -144,6 +156,10 @@ export type MySQLSessionTable = MySqlTableWithColumns<{
driverParam: any;
hasDefault: false;
name: any;
isPrimaryKey: any;
isAutoincrement: any;
hasRuntimeDefault: any;
generated: any;
},
object
>;
Expand Down
19 changes: 18 additions & 1 deletion packages/adapter-drizzle/src/drivers/sqlite.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,8 @@ export class DrizzleSQLiteAdapter implements Adapter {
}

private async getUserFromSessionId(sessionId: string): Promise<DatabaseUser | null> {
const { _, $inferInsert, $inferSelect, getSQL, ...userColumns } = this.userTable;
const { _, $inferInsert, $inferSelect, getSQL, shouldOmitSQLParens, ...userColumns } =
this.userTable;
const result = await this.db
.select(userColumns)
.from(this.sessionTable)
Expand Down Expand Up @@ -118,6 +119,10 @@ export type SQLiteUserTable = SQLiteTableWithColumns<{
hasDefault: boolean; // must be boolean instead of any to allow default values
enumValues: any;
baseColumn: any;
isPrimaryKey: any;
isAutoincrement: any;
hasRuntimeDefault: any;
generated: any;
},
object
>;
Expand All @@ -140,6 +145,10 @@ export type SQLiteSessionTable = SQLiteTableWithColumns<{
driverParam: any;
hasDefault: false;
name: any;
isPrimaryKey: any;
isAutoincrement: any;
hasRuntimeDefault: any;
generated: any;
},
object
>;
Expand All @@ -154,6 +163,10 @@ export type SQLiteSessionTable = SQLiteTableWithColumns<{
driverParam: any;
hasDefault: false;
name: any;
isPrimaryKey: any;
isAutoincrement: any;
hasRuntimeDefault: any;
generated: any;
},
object
>;
Expand All @@ -168,6 +181,10 @@ export type SQLiteSessionTable = SQLiteTableWithColumns<{
driverParam: any;
hasDefault: false;
name: any;
isPrimaryKey: any;
isAutoincrement: any;
hasRuntimeDefault: any;
generated: any;
},
object
>;
Expand Down

0 comments on commit 3036a2e

Please sign in to comment.