Skip to content

Commit ea6cc98

Browse files
committed
Logs
1 parent fc30cc5 commit ea6cc98

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

machines/send-native-query.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,14 +120,17 @@ module.exports = {
120120
// Process SQL template, escaping bindings.
121121
// This converts `$1`, `$2`, etc. into the escaped binding.
122122
sql = sql.replace(/\$[1-9][0-9]*/g, function (substr){
123+
123124
// e.g. `'$3'` => `'3'` => `3` => `2`
124125
var idx = +( substr.slice(1) ) - 1;
126+
// console.log('idx:',idx);
125127

126128
// If no such binding exists, then just leave the original
127129
// template string (e.g. "$3") alone.
128130
if (idx >= bindings.length) {
129131
return substr;
130132
}
133+
// console.log('bindings[idx]:',bindings[idx]);
131134

132135
// But otherwise, replace it with the escaped binding.
133136
return inputs.connection.escape(bindings[idx]);

0 commit comments

Comments
 (0)