mirror of
https://github.com/status-im/nimbus-eth1.git
synced 2025-01-11 12:54:13 +00:00
89044b84e7
- dynamically generated copyright year interval - added the db backend to the header - documented the db-backend-changing define, made it case insensitive and ensured wrong values would trigger compilation errors
20 lines
442 B
Nim
20 lines
442 B
Nim
import strutils
|
|
|
|
type DbBackend = enum
|
|
sqlite,
|
|
rocksdb,
|
|
lmdb
|
|
|
|
const
|
|
nimbus_db_backend* {.strdefine.} = "rocksdb"
|
|
dbBackend = parseEnum[DbBackend](nimbus_db_backend)
|
|
|
|
when dbBackend == sqlite:
|
|
import ./backends/sqlite_backend as database_backend
|
|
elif dbBackend == rocksdb:
|
|
import ./backends/rocksdb_backend as database_backend
|
|
elif dbBackend == lmdb:
|
|
import ./backends/lmdb_backend as database_backend
|
|
|
|
export database_backend
|