@1auth/store-sql 0.0.0-alpha.23 → 0.0.0-alpha.25
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/index.js +3 -3
- package/package.json +2 -2
package/index.js
CHANGED
|
@@ -74,7 +74,7 @@ export const makeSqlParts = (filters = {}, values = {}, fields = []) => {
|
|
|
74
74
|
const insert =
|
|
75
75
|
'("' + keys.join('", "') + '") VALUES (' + insertParts.join(', ') + ')'
|
|
76
76
|
|
|
77
|
-
const update = updateParts.join(', ')
|
|
77
|
+
const update = '"' + updateParts.join('", "') + '"'
|
|
78
78
|
|
|
79
79
|
parameters = parameters.concat(Object.values(values))
|
|
80
80
|
|
|
@@ -83,11 +83,11 @@ export const makeSqlParts = (filters = {}, values = {}, fields = []) => {
|
|
|
83
83
|
.map((key) => {
|
|
84
84
|
if (Array.isArray(filters[key])) {
|
|
85
85
|
let sql = filters[key].map((v, vidx) => '$' + idx++).join(',')
|
|
86
|
-
sql = key + ' IN (' + sql + ')'
|
|
86
|
+
sql = '"' + key + '" IN (' + sql + ')'
|
|
87
87
|
parameters = parameters.concat(filters[key])
|
|
88
88
|
return sql
|
|
89
89
|
}
|
|
90
|
-
const sql = key + ' = $' + idx++
|
|
90
|
+
const sql = '"' + key + '" = $' + idx++
|
|
91
91
|
parameters.push(filters[key])
|
|
92
92
|
return sql
|
|
93
93
|
})
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@1auth/store-sql",
|
|
3
|
-
"version": "0.0.0-alpha.
|
|
3
|
+
"version": "0.0.0-alpha.25",
|
|
4
4
|
"description": "",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"engines": {
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
"url": "https://github.com/willfarrell/1auth/issues"
|
|
49
49
|
},
|
|
50
50
|
"homepage": "https://github.com/willfarrell/1auth",
|
|
51
|
-
"gitHead": "
|
|
51
|
+
"gitHead": "c41c3d7565270a42f4919a759400bafc8ed77aca",
|
|
52
52
|
"peerDependencies": {
|
|
53
53
|
"@aws-sdk/client-dynamodb": "^3.0.0",
|
|
54
54
|
"@aws-sdk/util-dynamodb": "^3.0.0",
|