From fc842663bb253ba12243ad80031e34070a911bef Mon Sep 17 00:00:00 2001 From: Dmitriy Ryajov Date: Mon, 19 Sep 2022 22:40:01 -0600 Subject: [PATCH] implement close method for sqlite --- datastore/sql/sqliteds.nim | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/datastore/sql/sqliteds.nim b/datastore/sql/sqliteds.nim index 4b79391..24d23c6 100644 --- a/datastore/sql/sqliteds.nim +++ b/datastore/sql/sqliteds.nim @@ -68,6 +68,10 @@ method get*(self: SQLiteDatastore, key: Key): Future[?!seq[byte]] {.async.} = method put*(self: SQLiteDatastore, key: Key, data: seq[byte]): Future[?!void] {.async.} = return self.db.putStmt.exec((key.id, @data, timestamp())) +method close*(self: SQLiteDatastore): Future[?!void] {.async.} = + self.db.close() + return success() + # iterator query*( # self: SQLiteDatastore, # query: Query): Future[QueryResponse] =