@sqb/sqljs 4.11.2 → 4.12.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/README.md +9 -24
- package/cjs/sqljs-connection.js +3 -4
- package/esm/sqljs-connection.js +3 -4
- package/package.json +7 -6
package/README.md
CHANGED
|
@@ -18,12 +18,12 @@ SQB is an extensible, multi-dialect SQL query builder and Database connection wr
|
|
|
18
18
|
|
|
19
19
|
## Main goals
|
|
20
20
|
|
|
21
|
-
-
|
|
22
|
-
-
|
|
23
|
-
-
|
|
24
|
-
-
|
|
25
|
-
-
|
|
26
|
-
-
|
|
21
|
+
- Single code base for any sql based database
|
|
22
|
+
- Powerful and simplified query coding scheme
|
|
23
|
+
- Fast applications with low memory requirements
|
|
24
|
+
- Let applications work with large data tables efficiently
|
|
25
|
+
- Support latest JavaScript language standards
|
|
26
|
+
- Lightweight and extensible framework.
|
|
27
27
|
|
|
28
28
|
You can report bugs and discuss features on the [GitHub issues](https://github.com/sqbjs/sqb/issues) page
|
|
29
29
|
|
|
@@ -39,40 +39,25 @@ $ npm install @sqb/sqljs --save
|
|
|
39
39
|
|
|
40
40
|
## Node Compatibility
|
|
41
41
|
|
|
42
|
-
-
|
|
42
|
+
- node >= 16.x
|
|
43
43
|
|
|
44
44
|
### License
|
|
45
45
|
|
|
46
46
|
SQB is available under [MIT](LICENSE) license.
|
|
47
47
|
|
|
48
48
|
[npm-image]: https://img.shields.io/npm/v/@sqb/sqljs.svg
|
|
49
|
-
|
|
50
49
|
[npm-url]: https://npmjs.org/package/@sqb/sqljs
|
|
51
|
-
|
|
52
50
|
[travis-image]: https://img.shields.io/travis/sqbjs/@sqb/sqljs/master.svg
|
|
53
|
-
|
|
54
51
|
[travis-url]: https://travis-ci.org/sqbjs/@sqb/sqljs
|
|
55
|
-
|
|
56
52
|
[coveralls-image]: https://img.shields.io/coveralls/sqbjs/@sqb/sqljs/master.svg
|
|
57
|
-
|
|
58
53
|
[coveralls-url]: https://coveralls.io/r/sqbjs/@sqb/sqljs
|
|
59
|
-
|
|
60
54
|
[downloads-image]: https://img.shields.io/npm/dm/@sqb/sqljs.svg
|
|
61
|
-
|
|
62
55
|
[downloads-url]: https://npmjs.org/package/@sqb/sqljs
|
|
63
|
-
|
|
64
56
|
[gitter-image]: https://badges.gitter.im/sqbjs/@sqb/sqljs.svg
|
|
65
|
-
|
|
66
57
|
[gitter-url]: https://gitter.im/sqbjs/@sqb/sqljs?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge
|
|
67
|
-
|
|
68
58
|
[dependencies-image]: https://david-dm.org/sqbjs/@sqb/sqljs/status.svg
|
|
69
|
-
|
|
70
|
-
[dependencies-url]:https://david-dm.org/sqbjs/@sqb/sqljs
|
|
71
|
-
|
|
59
|
+
[dependencies-url]: https://david-dm.org/sqbjs/@sqb/sqljs
|
|
72
60
|
[devdependencies-image]: https://david-dm.org/sqbjs/@sqb/sqljs/dev-status.svg
|
|
73
|
-
|
|
74
|
-
[devdependencies-url]:https://david-dm.org/sqbjs/@sqb/sqljs?type=dev
|
|
75
|
-
|
|
61
|
+
[devdependencies-url]: https://david-dm.org/sqbjs/@sqb/sqljs?type=dev
|
|
76
62
|
[quality-image]: http://npm.packagequality.com/shield/@sqb/sqljs.png
|
|
77
|
-
|
|
78
63
|
[quality-url]: http://packagequality.com/#?package=@sqb/sqljs
|
package/cjs/sqljs-connection.js
CHANGED
|
@@ -91,9 +91,8 @@ class SqljsConnection {
|
|
|
91
91
|
}
|
|
92
92
|
return out;
|
|
93
93
|
}
|
|
94
|
-
else
|
|
95
94
|
// Emulate update ... returning
|
|
96
|
-
if (m[1].toLowerCase() === 'update') {
|
|
95
|
+
else if (m[1].toLowerCase() === 'update') {
|
|
97
96
|
const m2 = query.sql.match(/where (.+)/);
|
|
98
97
|
query = { ...query };
|
|
99
98
|
query.sql = sql + (m2 ? ' where ' + m2[1] : '');
|
|
@@ -132,7 +131,7 @@ class SqljsConnection {
|
|
|
132
131
|
fieldName: v,
|
|
133
132
|
dataType: 'any',
|
|
134
133
|
jsType: 'any',
|
|
135
|
-
_inf: { name: v }
|
|
134
|
+
_inf: { name: v },
|
|
136
135
|
};
|
|
137
136
|
result.push(o);
|
|
138
137
|
}
|
|
@@ -142,5 +141,5 @@ class SqljsConnection {
|
|
|
142
141
|
exports.SqljsConnection = SqljsConnection;
|
|
143
142
|
function assertDefined(d) {
|
|
144
143
|
if (d == null)
|
|
145
|
-
throw new Error(
|
|
144
|
+
throw new Error('Invalid data');
|
|
146
145
|
}
|
package/esm/sqljs-connection.js
CHANGED
|
@@ -88,9 +88,8 @@ export class SqljsConnection {
|
|
|
88
88
|
}
|
|
89
89
|
return out;
|
|
90
90
|
}
|
|
91
|
-
else
|
|
92
91
|
// Emulate update ... returning
|
|
93
|
-
if (m[1].toLowerCase() === 'update') {
|
|
92
|
+
else if (m[1].toLowerCase() === 'update') {
|
|
94
93
|
const m2 = query.sql.match(/where (.+)/);
|
|
95
94
|
query = { ...query };
|
|
96
95
|
query.sql = sql + (m2 ? ' where ' + m2[1] : '');
|
|
@@ -129,7 +128,7 @@ export class SqljsConnection {
|
|
|
129
128
|
fieldName: v,
|
|
130
129
|
dataType: 'any',
|
|
131
130
|
jsType: 'any',
|
|
132
|
-
_inf: { name: v }
|
|
131
|
+
_inf: { name: v },
|
|
133
132
|
};
|
|
134
133
|
result.push(o);
|
|
135
134
|
}
|
|
@@ -138,5 +137,5 @@ export class SqljsConnection {
|
|
|
138
137
|
}
|
|
139
138
|
function assertDefined(d) {
|
|
140
139
|
if (d == null)
|
|
141
|
-
throw new Error(
|
|
140
|
+
throw new Error('Invalid data');
|
|
142
141
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sqb/sqljs",
|
|
3
3
|
"description": "SQB serialization extension for sql.js driver",
|
|
4
|
-
"version": "4.
|
|
4
|
+
"version": "4.12.0",
|
|
5
5
|
"author": "Panates",
|
|
6
6
|
"contributors": [
|
|
7
7
|
"Eray Hanoglu <e.hanoglu@panates.com>",
|
|
@@ -30,19 +30,20 @@
|
|
|
30
30
|
"clean": "npm run clean:src | npm run clean:dist | npm run clean:cover",
|
|
31
31
|
"clean:src": "ts-cleanup -s src --all",
|
|
32
32
|
"clean:dist": "rimraf ../../build/sqljs",
|
|
33
|
-
"clean:cover": "rimraf ../../coverage/sqljs"
|
|
33
|
+
"clean:cover": "rimraf ../../coverage/sqljs",
|
|
34
|
+
"format": "prettier . --write --log-level=warn"
|
|
34
35
|
},
|
|
35
36
|
"dependencies": {
|
|
36
37
|
"putil-promisify": "^1.10.1"
|
|
37
38
|
},
|
|
38
39
|
"devDependencies": {
|
|
39
40
|
"@types/sql.js": "^1.4.9",
|
|
40
|
-
"sql.js": "^1.10.
|
|
41
|
+
"sql.js": "^1.10.3"
|
|
41
42
|
},
|
|
42
43
|
"peerDependencies": {
|
|
43
|
-
"@sqb/builder": "^4.
|
|
44
|
-
"@sqb/connect": "^4.
|
|
45
|
-
"@sqb/sqlite-dialect": "^4.
|
|
44
|
+
"@sqb/builder": "^4.12.0",
|
|
45
|
+
"@sqb/connect": "^4.12.0",
|
|
46
|
+
"@sqb/sqlite-dialect": "^4.12.0",
|
|
46
47
|
"sql.js": "^1.8.0"
|
|
47
48
|
},
|
|
48
49
|
"engines": {
|