mirror of
https://github.com/logos-storage/nim-datastore.git
synced 2026-01-02 13:43:11 +00:00
enables stylecheck (#40)
This commit is contained in:
parent
44c198b96a
commit
0cde8aeb67
@ -1,5 +1,7 @@
|
||||
--threads:on
|
||||
--tlsEmulation:off
|
||||
--styleCheck:usages
|
||||
--styleCheck:error
|
||||
|
||||
when (NimMajor, NimMinor) == (1, 2):
|
||||
switch("hint", "Processing:off")
|
||||
|
||||
@ -18,7 +18,7 @@ push: {.upraises: [].}
|
||||
type
|
||||
SQLiteDatastore* = ref object of Datastore
|
||||
readOnly: bool
|
||||
db: SQLiteDsDB
|
||||
db: SQLiteDsDb
|
||||
|
||||
proc path*(self: SQLiteDatastore): string =
|
||||
self.db.dbPath
|
||||
@ -225,12 +225,12 @@ proc new*(
|
||||
else: SQLITE_OPEN_READWRITE or SQLITE_OPEN_CREATE
|
||||
|
||||
success T(
|
||||
db: ? SQLIteDsDb.open(path, flags),
|
||||
db: ? SQLiteDsDb.open(path, flags),
|
||||
readOnly: readOnly)
|
||||
|
||||
proc new*(
|
||||
T: type SQLiteDatastore,
|
||||
db: SQLIteDsDb): ?!T =
|
||||
db: SQLiteDsDb): ?!T =
|
||||
|
||||
success T(
|
||||
db: db,
|
||||
|
||||
@ -12,7 +12,7 @@ export sqlite3_abi
|
||||
# can pass `--forceBuild:on` to the Nim compiler if a SQLite build without
|
||||
# `-DSQLITE_ENABLE_COLUMN_METADATA` option is stuck in the build cache,
|
||||
# e.g. `nimble test --forceBuild:on`
|
||||
{.passC: "-DSQLITE_ENABLE_COLUMN_METADATA".}
|
||||
{.passc: "-DSQLITE_ENABLE_COLUMN_METADATA".}
|
||||
|
||||
push: {.upraises: [].}
|
||||
|
||||
@ -44,7 +44,7 @@ proc bindParam(
|
||||
n: int,
|
||||
val: auto): cint =
|
||||
|
||||
when val is openarray[byte]|seq[byte]:
|
||||
when val is openArray[byte]|seq[byte]:
|
||||
if val.len > 0:
|
||||
# `SQLITE_TRANSIENT` "indicate[s] that the object is to be copied prior
|
||||
# to the return from sqlite3_bind_*(). The object and pointer to it
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user