diff --git a/app/package.json b/app/package.json index 445cc09..361acc9 100644 --- a/app/package.json +++ b/app/package.json @@ -3,7 +3,7 @@ "type": "module", "sideEffects": false, "bin": "./dist/cli/index.js", - "version": "0.10.0", + "version": "0.10.2", "description": "Lightweight Firebase/Supabase alternative built to run anywhere — incl. Next.js, React Router, Astro, Cloudflare, Bun, Node, AWS Lambda & more.", "homepage": "https://bknd.io", "repository": { diff --git a/app/src/data/connection/sqlite/SqliteIntrospector.ts b/app/src/data/connection/sqlite/SqliteIntrospector.ts index f584050..5821bc1 100644 --- a/app/src/data/connection/sqlite/SqliteIntrospector.ts +++ b/app/src/data/connection/sqlite/SqliteIntrospector.ts @@ -28,6 +28,10 @@ export class SqliteIntrospector extends BaseIntrospector { } async getSchemaSpec() { + const ext = this.getExcludedTableNames() + .map((it) => `'${it}'`) + .join(", "); + const query = sql` SELECT m.name, m.type, m.sql, (SELECT json_group_array( @@ -56,7 +60,7 @@ export class SqliteIntrospector extends BaseIntrospector { FROM sqlite_master m WHERE m.type IN ('table', 'view') and m.name not like 'sqlite_%' - and m.name not in (${this.getExcludedTableNames().join(", ")}) + and m.name not in (${sql.raw(ext)}) `; const tables = await this.executeWithPlugins(query);