From d8ef5dd93aff0490258d38885d0b1077163acad6 Mon Sep 17 00:00:00 2001 From: Conrad Ludgate Date: Tue, 26 Apr 2022 18:03:13 +0100 Subject: [PATCH] fix db range query (#351) --- atuin-client/src/database.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/atuin-client/src/database.rs b/atuin-client/src/database.rs index 14f01cd..cfd63a3 100644 --- a/atuin-client/src/database.rs +++ b/atuin-client/src/database.rs @@ -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?;