fix db range query (#351)

This commit is contained in:
Conrad Ludgate 2022-04-26 18:03:13 +01:00 committed by GitHub
parent 5926ea64bf
commit d8ef5dd93a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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?;