Skip to content

Commit 8abc908

Browse files
Merge pull request #3 from arboplatform/revert-2-PRB-1528
Revert "fix-update-without-where"
2 parents 42c6866 + f64efa1 commit 8abc908

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/postgresql.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ PostgreSQL.prototype.executeSQL = function(sql, params, options, callback) {
123123
debug('SQL: %s', sql);
124124
}
125125

126-
if (sql && sql.match(/UPDATE/i) && !sql.match(/WHERE/i) && self.settings.blockUpdateWithoutWhere) {
126+
if (sql && sql.match('UPDATE') && !sql.match('WHERE') && self.settings.blockUpdateWithoutWhere) {
127127
return process.nextTick(function() {
128128
callback(new Error(g.f('Você está executando um update sem WHERE. Corrija essa query, meu caro:',sql)));
129129
});

0 commit comments

Comments
 (0)