Skip to content

Commit

Permalink
fix(south-sql): fix sqlite param query with better-sqlite3
Browse files Browse the repository at this point in the history
  • Loading branch information
burgerni10 authored and Nicolas Burger committed Sep 6, 2022
1 parent e004a52 commit 783e11d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/south/SQL/SQL.class.js
Original file line number Diff line number Diff line change
Expand Up @@ -438,10 +438,10 @@ class SQL extends ProtocolHandler {
const stmt = await database.prepare(adaptedQuery)
const preparedParameters = {}
if (this.query.indexOf('@StartTime') !== -1) {
preparedParameters['@StartTime'] = startTime
preparedParameters.StartTime = startTime.getTime()
}
if (this.query.indexOf('@EndTime') !== -1) {
preparedParameters['@EndTime'] = endTime
preparedParameters.EndTime = endTime.getTime()
}

data = await stmt.all(preparedParameters)
Expand Down

0 comments on commit 783e11d

Please sign in to comment.