mirror of
https://github.com/shishantbiswas/bknd.git
synced 2026-03-15 20:17:22 +00:00
fix d1 introspect issue by excluding _cf_METADATA
This commit is contained in:
@@ -12,7 +12,7 @@ export type D1ConnectionConfig = {
|
||||
class CustomD1Dialect extends D1Dialect {
|
||||
override createIntrospector(db: Kysely<any>): DatabaseIntrospector {
|
||||
return new SqliteIntrospector(db, {
|
||||
excludeTables: ["_cf_KV"],
|
||||
excludeTables: ["_cf_KV", "_cf_METADATA"],
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -32,6 +32,10 @@ export class D1Connection extends SqliteConnection {
|
||||
super(kysely, {}, plugins);
|
||||
}
|
||||
|
||||
get client(): D1Database {
|
||||
return this.config.binding;
|
||||
}
|
||||
|
||||
protected override async batch<Queries extends QB[]>(
|
||||
queries: [...Queries],
|
||||
): Promise<{
|
||||
|
||||
@@ -14,6 +14,6 @@
|
||||
"devDependencies": {
|
||||
"@cloudflare/workers-types": "^4.20240620.0",
|
||||
"typescript": "^5.5.3",
|
||||
"wrangler": "^3.108.1"
|
||||
"wrangler": "^4.4.0"
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user