mirror of
https://github.com/docmost/docmost.git
synced 2026-05-07 06:23:06 +08:00
refactor(base): drop prepared binding now that loader sql inlines uuids
This commit is contained in:
@@ -49,11 +49,8 @@ export class CollectionLoader {
|
|||||||
// Bulk load via CREATE TABLE AS SELECT. JSONB extraction happens
|
// Bulk load via CREATE TABLE AS SELECT. JSONB extraction happens
|
||||||
// server-side via the base_cell_* helpers; DuckDB streams typed
|
// server-side via the base_cell_* helpers; DuckDB streams typed
|
||||||
// columns over COPY BINARY into its vectorized insert path.
|
// columns over COPY BINARY into its vectorized insert path.
|
||||||
const sql = buildLoaderSql(specs);
|
const sql = buildLoaderSql(specs, baseId, workspaceId);
|
||||||
const prepared = await connection.prepare(sql);
|
await connection.run(sql);
|
||||||
prepared.bindVarchar(1, baseId);
|
|
||||||
prepared.bindVarchar(2, workspaceId);
|
|
||||||
await prepared.run();
|
|
||||||
|
|
||||||
// Release the PG connection held by the ATTACH — we're done with
|
// Release the PG connection held by the ATTACH — we're done with
|
||||||
// Postgres; all subsequent queries run purely against the local table.
|
// Postgres; all subsequent queries run purely against the local table.
|
||||||
|
|||||||
Reference in New Issue
Block a user