Skip to content

Commit 2529a71

Browse files
committed
fix(kv): escape kv methods properly
Signed-off-by: Tobias Gurtzick <[email protected]>
1 parent 908d4c6 commit 2529a71

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

index.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -683,7 +683,8 @@ var Base = Class.extend({
683683
this._escapeDDL +
684684
table +
685685
this._escapeDDL +
686-
' ORDER BY run_on DESC, name DESC';
686+
` ORDER BY ${this.escapeDDL('run_on')} DESC,
687+
${this.escapeDDL('name')} DESC`;
687688
return this.allAsync(sql);
688689
},
689690

@@ -693,7 +694,7 @@ var Base = Class.extend({
693694
this._escapeDDL +
694695
table +
695696
this._escapeDDL +
696-
' WHERE key = ?';
697+
` WHERE ${this.escapeDDL('key')} = ?`;
697698
return this.allAsync(sql, [key]).then(([row]) => row);
698699
},
699700

@@ -743,7 +744,7 @@ var Base = Class.extend({
743744
this._escapeDDL +
744745
table +
745746
this._escapeDDL +
746-
' WHERE key = ?';
747+
` WHERE ${this.escapeDDL('key')} = ?`;
747748
return this.runSql(sql, [key]);
748749
},
749750

0 commit comments

Comments
 (0)