@hamak/smart-data-dico 1.24.0 → 1.24.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/backend/dist/server.mjs +5 -2
- package/package.json +1 -1
package/backend/dist/server.mjs
CHANGED
|
@@ -165858,6 +165858,7 @@ var import_express29 = __toESM(require_express2(), 1);
|
|
|
165858
165858
|
|
|
165859
165859
|
// backend/src/services/sql/sqlRunService.ts
|
|
165860
165860
|
init_uuid();
|
|
165861
|
+
init_logger();
|
|
165861
165862
|
|
|
165862
165863
|
// backend/src/services/sql/connectionCache.ts
|
|
165863
165864
|
var ConnectionCache = class {
|
|
@@ -166516,7 +166517,9 @@ var SqlRunService = class {
|
|
|
166516
166517
|
assertReadOnlySelect(sql);
|
|
166517
166518
|
const conn = this.cache.get(packageName);
|
|
166518
166519
|
if (!conn) throw new NoConnectionError(packageName);
|
|
166519
|
-
const
|
|
166520
|
+
const stmt = sql.trim().replace(/\s*;\s*$/, "");
|
|
166521
|
+
logger.debug(`SQL run [${conn.dialect}] on "${packageName}"`, { sql: stmt });
|
|
166522
|
+
const cursor = await this.getExecutor(conn.dialect).open(conn, stmt, { timeoutMs: this.timeoutMs });
|
|
166520
166523
|
try {
|
|
166521
166524
|
const first2 = await cursor.fetch(chunk ?? this.defaultChunk);
|
|
166522
166525
|
if (first2.done) {
|
|
@@ -166524,7 +166527,7 @@ var SqlRunService = class {
|
|
|
166524
166527
|
return { resultId: null, columns: cursor.columns, rows: first2.rows, done: true, dialect: conn.dialect };
|
|
166525
166528
|
}
|
|
166526
166529
|
const id = this.genId();
|
|
166527
|
-
await this.registry.add(id, { cursor, dialect: conn.dialect, packageName, columns: cursor.columns, sql });
|
|
166530
|
+
await this.registry.add(id, { cursor, dialect: conn.dialect, packageName, columns: cursor.columns, sql: stmt });
|
|
166528
166531
|
return { resultId: id, columns: cursor.columns, rows: first2.rows, done: false, dialect: conn.dialect };
|
|
166529
166532
|
} catch (e) {
|
|
166530
166533
|
await cursor.close();
|