2019-01-06 22:06:26 +00:00
|
|
|
import strutils
|
2018-12-27 02:59:06 +00:00
|
|
|
|
2019-01-06 22:06:26 +00:00
|
|
|
type DbBackend = enum
|
|
|
|
sqlite,
|
|
|
|
rocksdb,
|
|
|
|
lmdb
|
|
|
|
|
|
|
|
const
|
|
|
|
nimbus_db_backend* {.strdefine.} = "rocksdb"
|
|
|
|
dbBackend = parseEnum[DbBackend](nimbus_db_backend)
|
|
|
|
|
|
|
|
when dbBackend == sqlite:
|
2019-01-11 09:31:02 +00:00
|
|
|
import eth_trie/backends/sqlite_backend as database_backend
|
2019-01-06 22:06:26 +00:00
|
|
|
elif dbBackend == rocksdb:
|
2019-01-11 09:31:02 +00:00
|
|
|
import eth_trie/backends/rocksdb_backend as database_backend
|
2019-01-06 22:06:26 +00:00
|
|
|
elif dbBackend == lmdb:
|
2019-01-11 09:31:02 +00:00
|
|
|
import eth_trie/backends/lmdb_backend as database_backend
|
2018-12-27 02:59:06 +00:00
|
|
|
|
|
|
|
export database_backend
|