@gjsify/sqlite 0.4.23 → 0.4.24
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./_virtual/_rolldown/runtime.js";import{OutOfRangeError as e}from"./errors.js";function convertValue(t,n){if(t==null)return null;if(typeof t==`number`){if(Number.isInteger(t)&&!Number.isSafeInteger(t)){if(!n)throw new e(`Value is too large to be represented as a JavaScript number: ${t}`);return BigInt(t)}return n&&Number.isInteger(t)?BigInt(t):t}if(typeof t==`bigint`){if(!n){if(t>BigInt(2**53-1)||t<BigInt(-(2**53-1)))throw new e(`Value is too large to be represented as a JavaScript number: ${t}`);return Number(t)}return t}
|
|
1
|
+
import"./_virtual/_rolldown/runtime.js";import{OutOfRangeError as e}from"./errors.js";function convertValue(t,n){if(t==null)return null;if(typeof t==`number`){if(Number.isInteger(t)&&!Number.isSafeInteger(t)){if(!n)throw new e(`Value is too large to be represented as a JavaScript number: ${t}`);return BigInt(t)}return n&&Number.isInteger(t)?BigInt(t):t}if(typeof t==`bigint`){if(!n){if(t>BigInt(2**53-1)||t<BigInt(-(2**53-1)))throw new e(`Value is too large to be represented as a JavaScript number: ${t}`);return Number(t)}return t}if(typeof t==`string`||t instanceof Uint8Array)return t;let r=t;return typeof r.toArray==`function`?new Uint8Array(r.toArray()):t}function readRow(e,t,n){let r=e.get_n_columns();if(n.returnArrays){let i=[];for(let a=0;a<r;a++){let r=e.get_value_at(a,t);i.push(convertValue(r,n.readBigInts))}return i}let i=Object.create(null);for(let a=0;a<r;a++){let r=e.get_column_name(a);i[r]=convertValue(e.get_value_at(a,t),n.readBigInts)}return i}function readAllRows(e,t){let n=e.get_n_rows(),r=[];for(let i=0;i<n;i++){let n=readRow(e,i,t);n!==void 0&&r.push(n)}return r}function readFirstRow(e,t){if(e.get_n_rows()!==0)return readRow(e,0,t)}export{readAllRows,readFirstRow,readRow};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gjsify/sqlite",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.24",
|
|
4
4
|
"description": "Node.js sqlite module for Gjs using libgda",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"module": "lib/esm/index.js",
|
|
@@ -34,8 +34,8 @@
|
|
|
34
34
|
"libgda"
|
|
35
35
|
],
|
|
36
36
|
"devDependencies": {
|
|
37
|
-
"@gjsify/cli": "^0.4.
|
|
38
|
-
"@gjsify/unit": "^0.4.
|
|
37
|
+
"@gjsify/cli": "^0.4.24",
|
|
38
|
+
"@gjsify/unit": "^0.4.24",
|
|
39
39
|
"@types/node": "^25.9.1",
|
|
40
40
|
"typescript": "^6.0.3"
|
|
41
41
|
},
|