@1auth/store-sql 0.0.0-alpha.56 → 0.0.0-alpha.57
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 +2 -3
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -176,7 +176,7 @@ export const makeSqlParts = (
|
|
|
176
176
|
idx++
|
|
177
177
|
}
|
|
178
178
|
const insert =
|
|
179
|
-
'("' + keys.join('", "') + '") VALUES (' + insertParts.join(',
|
|
179
|
+
'("' + keys.join('", "') + '") VALUES (' + insertParts.join(',') + ')'
|
|
180
180
|
const update = updateParts.join(', ')
|
|
181
181
|
parameters = parameters.concat(Object.values(values))
|
|
182
182
|
|
|
@@ -184,8 +184,7 @@ export const makeSqlParts = (
|
|
|
184
184
|
where = where
|
|
185
185
|
.map((key) => {
|
|
186
186
|
if (Array.isArray(filters[key])) {
|
|
187
|
-
|
|
188
|
-
let sql = filters[key].map((_, idx) => getPlaceholder(idx++)).join(',')
|
|
187
|
+
let sql = filters[key].map(() => getPlaceholder(idx++)).join(',')
|
|
189
188
|
sql &&= '"' + key + '" IN (' + sql + ')'
|
|
190
189
|
parameters = parameters.concat(filters[key])
|
|
191
190
|
return sql
|