nexusql 0.9.4 → 0.9.6
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/dist/cli.js +9 -1
- package/dist/cli.js.map +1 -1
- package/dist/index.js +9 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -3216,7 +3216,7 @@ var Database = class _Database {
|
|
|
3216
3216
|
async installExtensions(extensions) {
|
|
3217
3217
|
for (const ext of extensions) {
|
|
3218
3218
|
try {
|
|
3219
|
-
await this.exec(`CREATE EXTENSION IF NOT EXISTS
|
|
3219
|
+
await this.exec(`CREATE EXTENSION IF NOT EXISTS ${ext};`);
|
|
3220
3220
|
const result = await this.queryParams(
|
|
3221
3221
|
`SELECT EXISTS(SELECT 1 FROM pg_extension WHERE extname = $1) as exists`,
|
|
3222
3222
|
[ext]
|
|
@@ -3427,6 +3427,14 @@ async function gen(options = {}) {
|
|
|
3427
3427
|
}
|
|
3428
3428
|
spinner.succeed("Installed db extensions");
|
|
3429
3429
|
spinner.start("Loading schema into temp database...");
|
|
3430
|
+
if (targetSql.toLowerCase().includes("vector")) {
|
|
3431
|
+
const vectorLines = targetSql.split("\n").filter(
|
|
3432
|
+
(line) => line.toLowerCase().includes("vector")
|
|
3433
|
+
);
|
|
3434
|
+
console.log("\n[DEBUG] SQL lines with 'vector':");
|
|
3435
|
+
vectorLines.forEach((line) => console.log(" ", line.trim()));
|
|
3436
|
+
console.log("");
|
|
3437
|
+
}
|
|
3430
3438
|
await tempDb.exec(targetSql);
|
|
3431
3439
|
spinner.succeed("Loaded schema into temp database");
|
|
3432
3440
|
if (options.verbose) {
|