Skip to content

Commit 6c994a8

Browse files
committed
Closes #358
Fix string insertion.
1 parent e618e3f commit 6c994a8

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/Core/Application/Session/Session.cc

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,10 @@ class SessionTraceDB : public SessionBackEnd
236236
{
237237
std::cout << "DB consume: " << statement << std::endl;
238238
//TODO: use Parameters
239-
std::string stmt = "INSERT INTO Trace VALUES (" + statement + ")";
239+
std::string dequoted(statement);
240+
dequoted.erase(std::remove(dequoted.begin(), dequoted.end(), '\"'), dequoted.end());
241+
dequoted.erase(std::remove(dequoted.begin(), dequoted.end(), '\''), dequoted.end());
242+
std::string stmt = "INSERT INTO Trace VALUES ('" + statement + "')";
240243
std::string error;
241244
return db_.run_sql_statement(stmt, error);
242245
}

0 commit comments

Comments
 (0)