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(
|
let res = sqlx::query(
|
||||||
"select * from history where timestamp >= ?1 and timestamp <= ?2 order by timestamp asc",
|
"select * from history where timestamp >= ?1 and timestamp <= ?2 order by timestamp asc",
|
||||||
)
|
)
|
||||||
.bind(from)
|
.bind(from.timestamp_nanos())
|
||||||
.bind(to)
|
.bind(to.timestamp_nanos())
|
||||||
.map(Self::query_history)
|
.map(Self::query_history)
|
||||||
.fetch_all(&self.pool)
|
.fetch_all(&self.pool)
|
||||||
.await?;
|
.await?;
|
||||||
|
|
Loading…
Reference in a new issue