Skip to content

Commit

Permalink
adding support for prepared statements.
Browse files Browse the repository at this point in the history
  • Loading branch information
vitaly-t committed Aug 1, 2015
1 parent efeacf6 commit 377ca9a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
13 changes: 8 additions & 5 deletions lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,14 @@ var monitor = {
throw new Error(errors.redirectParams(event));
}
var q = e.query;
var special, verbs = ['begin', 'commit', 'rollback'];
for (var i = 0; i < verbs.length; i++) {
if (q.indexOf(verbs[i]) === 0) {
special = true;
break;
var special;
if (typeof(query === 'string')) {
var verbs = ['begin', 'commit', 'rollback']
for (var i = 0; i < verbs.length; i++) {
if (q.indexOf(verbs[i]) === 0) {
special = true;
break;
}
}
}
var qText = special ? cct.special(q) : cct.query(q);
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "pg-monitor",
"version": "0.2.0",
"version": "0.2.1",
"description": "Event monitor for pg-promise.",
"main": "lib/index.js",
"homepage": "https://github.com/vitaly-t/pg-monitor",
Expand Down

0 comments on commit 377ca9a

Please sign in to comment.