Skip to content

Commit

Permalink
no point in running regexp if sql has no "?"
Browse files Browse the repository at this point in the history
  • Loading branch information
ianharrigan committed Nov 30, 2023
1 parent 7cf5088 commit 258b549
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/sqlite/impl/cpp/SqliteDatabase.hx
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,9 @@ class SqliteDatabase extends DatabaseBase {

private function prepareStatement(sql:String, param:Dynamic = null):NativeStatement {
var stmt = _nativeDB.prepare(sql);
if (sql.indexOf("?") == -1) {
return stmt;
}

var params = [];
if (param != null) {
Expand Down

0 comments on commit 258b549

Please sign in to comment.