nimble search XXXX
There are definately bindings for redis and several others.
There are semi-official Redis bindings here: https://github.com/nim-lang/redis
Redis would probably be my recommended approach, as it can do replication and all sorts of fancy things. The semi-official just recently got async support too.
Thank you all !
@Stevo, can you pls provide some examples of how to use it ?
For SQLite, have a look at the doco db_sqlite
import db_sqlite, math let theDb = open(":memory:",nil,nil,nil) # # now do create tables, insert data, select data, .... # using SQL (sqlite flavoured) # theDb.exec(sql"Drop table if exists myTestTbl") theDb.exec(sql("""create table myTestTbl ( Id INTEGER PRIMARY KEY, Name VARCHAR(50) NOT NULL, i INT(11), f DECIMAL(18,10))""")) theDb.exec(sql"BEGIN") for i in 1..1000: theDb.exec(sql"INSERT INTO myTestTbl (name,i,f) VALUES (?,?,?)", "Item#" & $i, i, sqrt(i.float)) theDb.exec(sql"COMMIT") for x in theDb.fastRows(sql"select * from myTestTbl"): echo x theDb.close()