nexusql 0.9.6 → 0.9.7
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 +3 -1
- package/dist/cli.js.map +1 -1
- package/dist/index.js +3 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -3216,7 +3216,9 @@ var Database = class _Database {
|
|
|
3216
3216
|
async installExtensions(extensions) {
|
|
3217
3217
|
for (const ext of extensions) {
|
|
3218
3218
|
try {
|
|
3219
|
-
|
|
3219
|
+
const needsQuoting = /[^a-z0-9_]/i.test(ext);
|
|
3220
|
+
const quotedExt = needsQuoting ? `"${ext}"` : ext;
|
|
3221
|
+
await this.exec(`CREATE EXTENSION IF NOT EXISTS ${quotedExt};`);
|
|
3220
3222
|
const result = await this.queryParams(
|
|
3221
3223
|
`SELECT EXISTS(SELECT 1 FROM pg_extension WHERE extname = $1) as exists`,
|
|
3222
3224
|
[ext]
|