Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Accounting for drivers that do not implement escape

  • Loading branch information...
commit 0d7ba4209f75c18d1b6d509a08b1330390952570 1 parent e28a967
@mariano authored
Showing with 5 additions and 1 deletion.
  1. +5 −1 query.cc
View
6 query.cc
@@ -1434,7 +1434,11 @@ std::string node_db::Query::value(v8::Local<v8::Value> value, bool inArray, bool
v8::String::Utf8Value currentString(value->ToString());
std::string string = *currentString;
if (escape) {
- currentStream << this->connection->quoteString << this->connection->escape(string) << this->connection->quoteString;
+ try {
+ currentStream << this->connection->quoteString << this->connection->escape(string) << this->connection->quoteString;
+ } catch(node_db::Exception& exception) {
+ currentStream << this->connection->quoteString << string << this->connection->quoteString;
+ }
} else {
currentStream << string;
}
Please sign in to comment.
Something went wrong with that request. Please try again.