vsql-node 0.0.0-stage → 1.0.0
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/LICENSE +21 -0
- package/README.md +203 -2
- package/binding.gyp +61 -0
- package/index.d.ts +133 -0
- package/internal/amalgamation/LICENSE +21 -0
- package/internal/amalgamation/LICENSE-V +21 -0
- package/internal/amalgamation/afunix.h +26 -0
- package/internal/amalgamation/atomic.h +571 -0
- package/internal/amalgamation/core_windows.c +25 -0
- package/internal/amalgamation/core_windows.h +9 -0
- package/internal/amalgamation/execute_capture_nix.c +7 -0
- package/internal/amalgamation/execute_capture_nix.h +266 -0
- package/internal/amalgamation/gc/cord.h +426 -0
- package/internal/amalgamation/gc/cord_pos.h +151 -0
- package/internal/amalgamation/gc/ec.h +91 -0
- package/internal/amalgamation/gc/gc.h +2826 -0
- package/internal/amalgamation/gc/gc_allocator.h +480 -0
- package/internal/amalgamation/gc/gc_backptr.h +109 -0
- package/internal/amalgamation/gc/gc_config_macros.h +548 -0
- package/internal/amalgamation/gc/gc_disclaim.h +85 -0
- package/internal/amalgamation/gc/gc_gcj.h +123 -0
- package/internal/amalgamation/gc/gc_inline.h +261 -0
- package/internal/amalgamation/gc/gc_mark.h +516 -0
- package/internal/amalgamation/gc/gc_pthread_redirects.h +140 -0
- package/internal/amalgamation/gc/gc_tiny_fl.h +107 -0
- package/internal/amalgamation/gc/gc_typed.h +196 -0
- package/internal/amalgamation/gc/gc_version.h +55 -0
- package/internal/amalgamation/gc/javaxfc.h +76 -0
- package/internal/amalgamation/gc/leak_detector.h +120 -0
- package/internal/amalgamation/gc.c +45932 -0
- package/internal/amalgamation/gc.h +4 -0
- package/internal/amalgamation/gc_boehm_helpers.c +64 -0
- package/internal/amalgamation/gc_debugger_linux.h +61 -0
- package/internal/amalgamation/getrandom_linux.h +33 -0
- package/internal/amalgamation/ipv6_v6only.h +5 -0
- package/internal/amalgamation/libvsql.c +27 -0
- package/internal/amalgamation/libvsql.h +1772 -0
- package/internal/amalgamation/libvsql_linux_amd64.c +106591 -0
- package/internal/amalgamation/libvsql_linux_arm64.c +106571 -0
- package/internal/amalgamation/libvsql_macos_amd64.c +106728 -0
- package/internal/amalgamation/libvsql_macos_arm64.c +106708 -0
- package/internal/amalgamation/libvsql_windows_amd64.c +108235 -0
- package/internal/amalgamation/segfault_handler_nix.c +56 -0
- package/internal/amalgamation/segfault_handler_nix.h +449 -0
- package/internal/amalgamation/segfault_handler_windows.h +52 -0
- package/internal/amalgamation/thread_helper.c +12 -0
- package/internal/amalgamation/thread_helper.h +96 -0
- package/internal/amalgamation/ticks_windows.c +3 -0
- package/internal/amalgamation/ticks_windows.h +31 -0
- package/internal/amalgamation/ticks_windows_api.h +6 -0
- package/internal/amalgamation/vsql_runtime.c +14 -0
- package/internal/amalgamation/vsql_runtime_linux.c +6 -0
- package/internal/amalgamation/vsql_runtime_macos.c +6 -0
- package/internal/amalgamation/vsql_runtime_windows.c +6 -0
- package/lib/binding.js +13 -0
- package/lib/connection.js +492 -0
- package/lib/convert.js +213 -0
- package/lib/errors.js +17 -0
- package/lib/index.js +41 -0
- package/libvsql_flags.gypi +30 -0
- package/package.json +45 -4
- package/prebuilds/darwin-arm64/vsql-node.glibc.node +0 -0
- package/prebuilds/darwin-x64/vsql-node.glibc.node +0 -0
- package/prebuilds/linux-arm64/vsql-node.glibc.node +0 -0
- package/prebuilds/linux-x64/vsql-node.glibc.node +0 -0
- package/prebuilds/win32-x64/vsql-node.glibc.node +0 -0
- package/src/binding.c +773 -0
- package/src/runtime.c +20 -0
package/lib/convert.js
ADDED
|
@@ -0,0 +1,213 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
// Converting parameters to the values that lib.execute binds, and the values
|
|
4
|
+
// of columns to JavaScript.
|
|
5
|
+
|
|
6
|
+
const lib = require('./binding');
|
|
7
|
+
|
|
8
|
+
const BIGINT_MIN = -(2n ** 63n);
|
|
9
|
+
const BIGINT_MAX = 2n ** 63n - 1n;
|
|
10
|
+
|
|
11
|
+
// SqlValue is a parameter that's sent as a particular SQL type, from numeric,
|
|
12
|
+
// date, time or timestamp. vsql can't cast a CHARACTER VARYING to these types,
|
|
13
|
+
// so a string can't be used for them.
|
|
14
|
+
class SqlValue {
|
|
15
|
+
constructor(type, parameterType, columnSize, decimalDigits, value) {
|
|
16
|
+
this.type = type;
|
|
17
|
+
this.value = value;
|
|
18
|
+
this.param = [lib.SQL_CHAR, parameterType, columnSize, decimalDigits, value];
|
|
19
|
+
Object.freeze(this);
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
toString() {
|
|
23
|
+
return this.value;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
const numericRe = /^([+-]?)(\d*)(?:\.(\d*))?$/;
|
|
28
|
+
|
|
29
|
+
// numeric is a NUMERIC with the precision and scale of its digits, from a
|
|
30
|
+
// string (such as "-12.50"), number or bigint.
|
|
31
|
+
function numeric(value) {
|
|
32
|
+
const s = String(value);
|
|
33
|
+
const m = (typeof value === 'string' || typeof value === 'number' || typeof value === 'bigint')
|
|
34
|
+
&& numericRe.exec(s);
|
|
35
|
+
if (!m || (m[2] === '' && !m[3])) {
|
|
36
|
+
throw new RangeError(`invalid NUMERIC: ${JSON.stringify(s)}`);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
// vsql counts at least one digit before the decimal point (so 0.25 is
|
|
40
|
+
// NUMERIC(3, 2)).
|
|
41
|
+
const sign = m[1] === '-' ? '-' : '';
|
|
42
|
+
const integer = m[2].replace(/^0+(?=\d)/, '') || '0';
|
|
43
|
+
const fraction = m[3] || '';
|
|
44
|
+
const precision = (integer.replace(/^0+/, '').length || 1) + fraction.length;
|
|
45
|
+
|
|
46
|
+
return new SqlValue('NUMERIC', lib.SQL_NUMERIC, precision, fraction.length,
|
|
47
|
+
sign + integer + (fraction && `.${fraction}`));
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
const dateRe = /^\d{4}-\d{2}-\d{2}$/;
|
|
51
|
+
const timeRe = /^(\d{2}:\d{2}:\d{2})(?:\.(\d{1,6}))?(Z|[+-]\d{2}:?\d{2})?$/;
|
|
52
|
+
const timestampRe = /^(\d{4}-\d{2}-\d{2})[T ](\d{2}:\d{2}:\d{2})(?:\.(\d{1,6}))?(Z|[+-]\d{2}:?\d{2})?$/;
|
|
53
|
+
|
|
54
|
+
function checkString(type, s, re) {
|
|
55
|
+
const m = typeof s === 'string' && re.exec(s);
|
|
56
|
+
if (!m) {
|
|
57
|
+
throw new RangeError(`invalid ${type}: ${JSON.stringify(s)}`);
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
return m;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
// offset is a time zone offset as vsql reads it (such as "+05:30"), from
|
|
64
|
+
// "Z", "+0530" or "+05:30".
|
|
65
|
+
function offset(s) {
|
|
66
|
+
if (s === 'Z') {
|
|
67
|
+
return '+00:00';
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
return s.length === 5 ? `${s.slice(0, 3)}:${s.slice(3)}` : s;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
// date is a DATE, from "YYYY-MM-DD".
|
|
74
|
+
function date(s) {
|
|
75
|
+
checkString('DATE', s, dateRe);
|
|
76
|
+
|
|
77
|
+
return new SqlValue('DATE', lib.SQL_TYPE_DATE, s.length, 0, s);
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
// time is a TIME, from "HH:MM:SS" with up to 6 fractional digits. It's WITH
|
|
81
|
+
// TIME ZONE if it has an offset (such as "+05:30" or "Z").
|
|
82
|
+
function time(s) {
|
|
83
|
+
const [, hms, fraction = '', zone] = checkString('TIME', s, timeRe);
|
|
84
|
+
const value = hms + (fraction && `.${fraction}`);
|
|
85
|
+
if (zone === undefined) {
|
|
86
|
+
return new SqlValue('TIME', lib.SQL_TYPE_TIME, value.length, fraction.length, value);
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
const withZone = value + offset(zone);
|
|
90
|
+
return new SqlValue('TIME WITH TIME ZONE', lib.SQL_TYPE_TIME_WITH_TIMEZONE, withZone.length,
|
|
91
|
+
fraction.length, withZone);
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
// timestamp is a TIMESTAMP, from "YYYY-MM-DD HH:MM:SS" (or with a "T") with up
|
|
95
|
+
// to 6 fractional digits. It's WITH TIME ZONE if it has an offset (such as
|
|
96
|
+
// "+05:30" or "Z").
|
|
97
|
+
function timestamp(s) {
|
|
98
|
+
const [, ymd, hms, fraction = '', zone] = checkString('TIMESTAMP', s, timestampRe);
|
|
99
|
+
const value = `${ymd} ${hms}${fraction && `.${fraction}`}`;
|
|
100
|
+
if (zone === undefined) {
|
|
101
|
+
return new SqlValue('TIMESTAMP', lib.SQL_TYPE_TIMESTAMP, value.length, fraction.length, value);
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
const withZone = value + offset(zone);
|
|
105
|
+
return new SqlValue('TIMESTAMP WITH TIME ZONE', lib.SQL_TYPE_TIMESTAMP_WITH_TIMEZONE,
|
|
106
|
+
withZone.length, fraction.length, withZone);
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
// toParams is the parameters for lib.execute, from an array of values.
|
|
110
|
+
function toParams(params) {
|
|
111
|
+
if (params === undefined) {
|
|
112
|
+
return [];
|
|
113
|
+
}
|
|
114
|
+
if (!Array.isArray(params)) {
|
|
115
|
+
throw new TypeError('the parameters must be an array (named parameters are not supported)');
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
return params.map((value, i) => {
|
|
119
|
+
try {
|
|
120
|
+
return toParam(value);
|
|
121
|
+
} catch (e) {
|
|
122
|
+
e.message = `parameter ${i + 1}: ${e.message}`;
|
|
123
|
+
throw e;
|
|
124
|
+
}
|
|
125
|
+
});
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
// toParam is an array of [valueType, parameterType, columnSize, decimalDigits,
|
|
129
|
+
// value] for lib.execute. The value is sent as an SQL type, which is cast to
|
|
130
|
+
// the type it's used as. A columnSize of 0 for a string is its number of
|
|
131
|
+
// characters.
|
|
132
|
+
function toParam(value) {
|
|
133
|
+
// The type doesn't matter for a NULL, since it's cast to the type it's used
|
|
134
|
+
// as.
|
|
135
|
+
if (value === null || value === undefined) {
|
|
136
|
+
return [lib.SQL_CHAR, lib.SQL_VARCHAR, 1, 0, null];
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
switch (typeof value) {
|
|
140
|
+
case 'boolean':
|
|
141
|
+
return [lib.SQL_CHAR, lib.SQL_BOOLEAN, 0, 0, value ? 'TRUE' : 'FALSE'];
|
|
142
|
+
|
|
143
|
+
case 'number':
|
|
144
|
+
if (Number.isSafeInteger(value)) {
|
|
145
|
+
return [lib.SQL_BIGINT, lib.SQL_BIGINT, 0, 0, value];
|
|
146
|
+
}
|
|
147
|
+
return [lib.SQL_DOUBLE, lib.SQL_DOUBLE, 0, 0, value];
|
|
148
|
+
|
|
149
|
+
case 'bigint':
|
|
150
|
+
if (value >= BIGINT_MIN && value <= BIGINT_MAX) {
|
|
151
|
+
return [lib.SQL_BIGINT, lib.SQL_BIGINT, 0, 0, value];
|
|
152
|
+
}
|
|
153
|
+
return numeric(value).param;
|
|
154
|
+
|
|
155
|
+
case 'string':
|
|
156
|
+
return [lib.SQL_CHAR, lib.SQL_VARCHAR, 0, 0, value];
|
|
157
|
+
|
|
158
|
+
default:
|
|
159
|
+
break;
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
if (value instanceof SqlValue) {
|
|
163
|
+
return value.param;
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
if (value instanceof Date) {
|
|
167
|
+
const iso = Number.isNaN(value.getTime()) ? '' : value.toISOString();
|
|
168
|
+
if (iso.length !== 24) {
|
|
169
|
+
throw new RangeError(`invalid Date: ${value}`);
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
// "YYYY-MM-DDTHH:MM:SS.mmmZ" is "YYYY-MM-DD HH:MM:SS.mmm+00:00".
|
|
173
|
+
return timestamp(iso).param;
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
if (ArrayBuffer.isView(value) || value instanceof ArrayBuffer) {
|
|
177
|
+
throw new TypeError("vsql doesn't have a binary type");
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
const type = typeof value === 'object' ? value.constructor?.name ?? 'object' : typeof value;
|
|
181
|
+
throw new TypeError(`unsupported type ${type}`);
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
// A value WITH TIME ZONE ends with an offset such as "+0530", which is
|
|
185
|
+
// "+05:30" in ISO 8601 (and for Date.parse).
|
|
186
|
+
function withTimeZone(s) {
|
|
187
|
+
return `${s.slice(0, -2)}:${s.slice(-2)}`;
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
// For each data type (from lib.describeCol): its name, how lib.fetch reads it
|
|
191
|
+
// (see binding.c) and the function that converts that to its JavaScript value
|
|
192
|
+
// (null if it doesn't need to be converted). A BIGINT is read as 'I', or 'b'
|
|
193
|
+
// for a connection with { bigint: true }.
|
|
194
|
+
const types = new Map([
|
|
195
|
+
[lib.SQL_SMALLINT, ['SMALLINT', 'i', null]],
|
|
196
|
+
[lib.SQL_INTEGER, ['INTEGER', 'i', null]],
|
|
197
|
+
[lib.SQL_BIGINT, ['BIGINT', 'I', null]],
|
|
198
|
+
[lib.SQL_REAL, ['REAL', 'r', null]],
|
|
199
|
+
[lib.SQL_FLOAT, ['DOUBLE PRECISION', 'd', null]],
|
|
200
|
+
[lib.SQL_DOUBLE, ['DOUBLE PRECISION', 'd', null]],
|
|
201
|
+
[lib.SQL_DECIMAL, ['DECIMAL', 's', null]],
|
|
202
|
+
[lib.SQL_NUMERIC, ['NUMERIC', 's', null]],
|
|
203
|
+
[lib.SQL_CHAR, ['CHARACTER', 's', null]],
|
|
204
|
+
[lib.SQL_VARCHAR, ['CHARACTER VARYING', 's', null]],
|
|
205
|
+
[lib.SQL_BOOLEAN, ['BOOLEAN', 'o', null]],
|
|
206
|
+
[lib.SQL_TYPE_DATE, ['DATE', 's', null]],
|
|
207
|
+
[lib.SQL_TYPE_TIME, ['TIME', 's', null]],
|
|
208
|
+
[lib.SQL_TYPE_TIME_WITH_TIMEZONE, ['TIME WITH TIME ZONE', 's', withTimeZone]],
|
|
209
|
+
[lib.SQL_TYPE_TIMESTAMP, ['TIMESTAMP', 's', null]],
|
|
210
|
+
[lib.SQL_TYPE_TIMESTAMP_WITH_TIMEZONE, ['TIMESTAMP WITH TIME ZONE', 's', withTimeZone]],
|
|
211
|
+
]);
|
|
212
|
+
|
|
213
|
+
module.exports = { SqlValue, numeric, date, time, timestamp, toParams, types };
|
package/lib/errors.js
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
// VsqlError is an error from vsql. Errors from the driver itself (such as using
|
|
4
|
+
// a closed connection, or a value that can't be a parameter) are a TypeError
|
|
5
|
+
// or RangeError instead.
|
|
6
|
+
class VsqlError extends Error {
|
|
7
|
+
// sqlstate is the SQLSTATE of the error (such as "42P01" for an undefined
|
|
8
|
+
// table), which is also the code.
|
|
9
|
+
constructor(sqlstate, message) {
|
|
10
|
+
super(`${message} (SQLSTATE ${sqlstate})`);
|
|
11
|
+
this.name = 'VsqlError';
|
|
12
|
+
this.sqlstate = sqlstate;
|
|
13
|
+
this.code = sqlstate;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
module.exports = { VsqlError };
|
package/lib/index.js
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
// vsql-node is a driver for vsql (https://github.com/elliotchance/vsql), a
|
|
4
|
+
// single file or in-memory SQL database. libvsql (the vsql library) is compiled
|
|
5
|
+
// into the package, so nothing else needs to be installed.
|
|
6
|
+
//
|
|
7
|
+
// const vsql = require('vsql-node');
|
|
8
|
+
//
|
|
9
|
+
// const db = vsql.connect('test.vsql');
|
|
10
|
+
// db.run('CREATE TABLE foo (x INTEGER)');
|
|
11
|
+
// db.run('INSERT INTO foo (x) VALUES (?)', [123]);
|
|
12
|
+
// db.all('SELECT x FROM foo'); // [{ X: 123 }]
|
|
13
|
+
// db.close();
|
|
14
|
+
//
|
|
15
|
+
// The API is synchronous: each call runs vsql on the calling thread. See the
|
|
16
|
+
// README for transactions, parameters and the JavaScript type of each column
|
|
17
|
+
// type.
|
|
18
|
+
|
|
19
|
+
const { Connection, Statement } = require('./connection');
|
|
20
|
+
const { SqlValue, numeric, date, time, timestamp } = require('./convert');
|
|
21
|
+
const { VsqlError } = require('./errors');
|
|
22
|
+
|
|
23
|
+
// connect opens a connection to a database file (which is created if it
|
|
24
|
+
// doesn't exist), or ":memory:" for a database that only exists for the life
|
|
25
|
+
// of the connection. With { bigint: true }, a BIGINT column is a bigint
|
|
26
|
+
// (otherwise it's a number, and a RangeError if it doesn't fit).
|
|
27
|
+
function connect(database, options) {
|
|
28
|
+
return new Connection(database, options);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
module.exports = {
|
|
32
|
+
connect,
|
|
33
|
+
Connection,
|
|
34
|
+
Statement,
|
|
35
|
+
VsqlError,
|
|
36
|
+
SqlValue,
|
|
37
|
+
numeric,
|
|
38
|
+
date,
|
|
39
|
+
time,
|
|
40
|
+
timestamp,
|
|
41
|
+
};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# Generated by scripts/update-amalgamation.sh. DO NOT EDIT.
|
|
2
|
+
#
|
|
3
|
+
# The defines and libraries that V used to build libvsql, from the
|
|
4
|
+
# vsql_OS_ARCH.mk files of the amalgamation.
|
|
5
|
+
{
|
|
6
|
+
'target_defaults': {
|
|
7
|
+
'conditions': [
|
|
8
|
+
['OS=="linux" and target_arch=="x64"', {
|
|
9
|
+
'defines': ['USE_MMAP=1', 'USE_MUNMAP=1', 'HANDLE_FORK=1', 'GC_THREADS=1', 'THREAD_LOCAL_ALLOC=1', 'GC_BUILTIN_ATOMIC=1', 'ALL_INTERIOR_POINTERS=1', 'V_GCBOEHM_NATIVE'],
|
|
10
|
+
'libraries': ['-ldl', '-lpthread', '-lm'],
|
|
11
|
+
}],
|
|
12
|
+
['OS=="linux" and target_arch=="arm64"', {
|
|
13
|
+
'defines': ['USE_MMAP=1', 'USE_MUNMAP=1', 'HANDLE_FORK=1', 'GC_THREADS=1', 'THREAD_LOCAL_ALLOC=1', 'GC_BUILTIN_ATOMIC=1', 'ALL_INTERIOR_POINTERS=1', 'V_GCBOEHM_NATIVE'],
|
|
14
|
+
'libraries': ['-ldl', '-lpthread', '-lm'],
|
|
15
|
+
}],
|
|
16
|
+
['OS=="mac" and target_arch=="x64"', {
|
|
17
|
+
'defines': ['USE_MMAP=1', 'USE_MUNMAP=1', 'HANDLE_FORK=1', 'GC_THREADS=1', 'THREAD_LOCAL_ALLOC=1', 'GC_BUILTIN_ATOMIC=1', 'ALL_INTERIOR_POINTERS=1', 'MPROTECT_VDB=1', 'LARGE_CONFIG=1', 'V_GCBOEHM_NATIVE'],
|
|
18
|
+
'libraries': ['-ldl', '-lpthread', '-lm'],
|
|
19
|
+
}],
|
|
20
|
+
['OS=="mac" and target_arch=="arm64"', {
|
|
21
|
+
'defines': ['USE_MMAP=1', 'USE_MUNMAP=1', 'HANDLE_FORK=1', 'GC_THREADS=1', 'THREAD_LOCAL_ALLOC=1', 'GC_BUILTIN_ATOMIC=1', 'ALL_INTERIOR_POINTERS=1', 'MPROTECT_VDB=1', 'LARGE_CONFIG=1', 'V_GCBOEHM_NATIVE'],
|
|
22
|
+
'libraries': ['-ldl', '-lpthread', '-lm'],
|
|
23
|
+
}],
|
|
24
|
+
['OS=="win" and target_arch=="x64"', {
|
|
25
|
+
'defines': ['GC_THREADS=1', 'THREAD_LOCAL_ALLOC=1', 'GC_NOT_DLL=1', 'GC_WIN32_THREADS=1', 'NO_MSGBOX_ON_ERROR=1', 'CONSOLE_LOG=1', 'GC_BUILTIN_ATOMIC=1', 'ALL_INTERIOR_POINTERS=1', 'V_GCBOEHM_NATIVE'],
|
|
26
|
+
'libraries': ['-ldbghelp', '-luser32', '-lws2_32', '-ladvapi32', '-lbcrypt'],
|
|
27
|
+
}],
|
|
28
|
+
],
|
|
29
|
+
},
|
|
30
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,47 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vsql-node",
|
|
3
|
-
"version": "
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "A Node.js driver for vsql, a single file or in-memory SQL database.",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"vsql",
|
|
7
|
+
"sql",
|
|
8
|
+
"database",
|
|
9
|
+
"embedded"
|
|
10
|
+
],
|
|
11
|
+
"homepage": "https://github.com/elliotchance/vsql-node",
|
|
12
|
+
"bugs": "https://github.com/elliotchance/vsql-node/issues",
|
|
13
|
+
"repository": {
|
|
14
|
+
"type": "git",
|
|
15
|
+
"url": "git+https://github.com/elliotchance/vsql-node.git"
|
|
16
|
+
},
|
|
17
|
+
"license": "MIT",
|
|
18
|
+
"author": "Elliot Chance <elliotchance@gmail.com>",
|
|
19
|
+
"main": "lib/index.js",
|
|
20
|
+
"types": "index.d.ts",
|
|
21
|
+
"files": [
|
|
22
|
+
"lib",
|
|
23
|
+
"src",
|
|
24
|
+
"internal/amalgamation",
|
|
25
|
+
"prebuilds",
|
|
26
|
+
"binding.gyp",
|
|
27
|
+
"libvsql_flags.gypi",
|
|
28
|
+
"index.d.ts"
|
|
29
|
+
],
|
|
30
|
+
"engines": {
|
|
31
|
+
"node": ">=22"
|
|
32
|
+
},
|
|
33
|
+
"gypfile": true,
|
|
34
|
+
"scripts": {
|
|
35
|
+
"install": "node-gyp-build",
|
|
36
|
+
"build": "node-gyp rebuild",
|
|
37
|
+
"prebuildify": "prebuildify --napi --strip --tag-libc",
|
|
38
|
+
"test": "node --expose-gc --test"
|
|
39
|
+
},
|
|
40
|
+
"dependencies": {
|
|
41
|
+
"node-gyp-build": "^4.8.4"
|
|
42
|
+
},
|
|
43
|
+
"devDependencies": {
|
|
44
|
+
"node-gyp": "^13.1.0",
|
|
45
|
+
"prebuildify": "^6.0.1"
|
|
46
|
+
}
|
|
47
|
+
}
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|