Comparing version 0.3.12 to 0.3.13
@@ -139,3 +139,8 @@ "use strict"; | ||
pragma(source, options) { | ||
throw new Error("not implemented"); | ||
if (options == null) options = {}; | ||
if (typeof source !== 'string') throw new TypeError('Expected first argument to be a string'); | ||
if (typeof options !== 'object') throw new TypeError('Expected second argument to be an options object'); | ||
const simple = options['simple']; | ||
const stmt = this.prepare(`PRAGMA ${source}`, this, true); | ||
return simple ? stmt.pluck().get() : stmt.all(); | ||
} | ||
@@ -142,0 +147,0 @@ |
{ | ||
"name": "libsql", | ||
"version": "0.3.12", | ||
"version": "0.3.13", | ||
"description": "A better-sqlite3 compatible API for libSQL that supports Bun, Deno, and Node", | ||
@@ -73,10 +73,10 @@ "os": [ | ||
"optionalDependencies": { | ||
"@libsql/darwin-arm64": "0.3.12", | ||
"@libsql/darwin-x64": "0.3.12", | ||
"@libsql/linux-arm64-gnu": "0.3.12", | ||
"@libsql/linux-arm64-musl": "0.3.12", | ||
"@libsql/linux-x64-gnu": "0.3.12", | ||
"@libsql/linux-x64-musl": "0.3.12", | ||
"@libsql/win32-x64-msvc": "0.3.12" | ||
"@libsql/darwin-arm64": "0.3.13", | ||
"@libsql/darwin-x64": "0.3.13", | ||
"@libsql/linux-arm64-gnu": "0.3.13", | ||
"@libsql/linux-arm64-musl": "0.3.13", | ||
"@libsql/linux-x64-gnu": "0.3.13", | ||
"@libsql/linux-x64-musl": "0.3.13", | ||
"@libsql/win32-x64-msvc": "0.3.13" | ||
} | ||
} |
@@ -142,3 +142,9 @@ "use strict"; | ||
pragma(source, options) { | ||
throw new Error("not implemented"); | ||
if (options == null) options = {}; | ||
if (typeof source !== 'string') throw new TypeError('Expected first argument to be a string'); | ||
if (typeof options !== 'object') throw new TypeError('Expected second argument to be an options object'); | ||
const simple = options['simple']; | ||
return this.prepare(`PRAGMA ${source}`, this, true).then(async (stmt) => { | ||
return simple ? await stmt.pluck().get() : await stmt.all(); | ||
}); | ||
} | ||
@@ -145,0 +151,0 @@ |
34952
788