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