fix db range query (#351)
This commit is contained in:
parent
5926ea64bf
commit
d8ef5dd93a
1 changed files with 2 additions and 2 deletions
|
@ -260,8 +260,8 @@ impl Database for Sqlite {
|
|||
let res = sqlx::query(
|
||||
"select * from history where timestamp >= ?1 and timestamp <= ?2 order by timestamp asc",
|
||||
)
|
||||
.bind(from)
|
||||
.bind(to)
|
||||
.bind(from.timestamp_nanos())
|
||||
.bind(to.timestamp_nanos())
|
||||
.map(Self::query_history)
|
||||
.fetch_all(&self.pool)
|
||||
.await?;
|
||||
|
|
Loading…
Reference in a new issue