Skip to content

Commit f89837a

Browse files
authored
Correction on updateAll
Stupid mistake : the last field name was cut short of one char, because I thought that `[1,2,3].join('-')` was equal to `1-2-3-` but in fact, it gives `1-2-3`... I must had missed a coffee this day.
1 parent 357d4b6 commit f89837a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

batchCollection.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -161,8 +161,8 @@ exports.updateAll = function () {
161161
}
162162
}
163163
query = query + " SET " + names.join(' = ?,');
164-
query = query.substr(0, (query.length - 1));
165-
query = query + " WHERE " + idAttribute + " = ?";
164+
query = query + " = ? ";
165+
query = query + "WHERE " + idAttribute + " = ?";
166166
if (this.data.length > 0) {
167167
db = Ti.Database.open(dbName);
168168
db.execute('BEGIN IMMEDIATE TRANSACTION;');

0 commit comments

Comments
 (0)