From cc47a6d65c94fed5bd607a1438907f3fe1a33199 Mon Sep 17 00:00:00 2001 From: Philipinho <16838612+Philipinho@users.noreply.github.com> Date: Thu, 23 Apr 2026 12:39:33 +0100 Subject: [PATCH] refactor(base): drop prepared binding now that loader sql inlines uuids --- apps/server/src/core/base/query-cache/collection-loader.ts | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/apps/server/src/core/base/query-cache/collection-loader.ts b/apps/server/src/core/base/query-cache/collection-loader.ts index ba97ca0c..33b4852d 100644 --- a/apps/server/src/core/base/query-cache/collection-loader.ts +++ b/apps/server/src/core/base/query-cache/collection-loader.ts @@ -49,11 +49,8 @@ export class CollectionLoader { // Bulk load via CREATE TABLE AS SELECT. JSONB extraction happens // server-side via the base_cell_* helpers; DuckDB streams typed // columns over COPY BINARY into its vectorized insert path. - const sql = buildLoaderSql(specs); - const prepared = await connection.prepare(sql); - prepared.bindVarchar(1, baseId); - prepared.bindVarchar(2, workspaceId); - await prepared.run(); + const sql = buildLoaderSql(specs, baseId, workspaceId); + await connection.run(sql); // Release the PG connection held by the ATTACH — we're done with // Postgres; all subsequent queries run purely against the local table.