all repos — litestore @ e013a7134f9250bb02be6cda2aa27d40541549e5

A minimalist nosql document store.

Fixed non-gcsafe functionn; other fixes.
h3rald h3rald@h3rald.com
Sun, 06 Sep 2020 11:20:21 +0200
commit

e013a7134f9250bb02be6cda2aa27d40541549e5

parent

354c435b42fc235a4e8d0b62a5e86ef961eecbba

M src/litestore.nim.cfgsrc/litestore.nim.cfg

@@ -1,5 +1,9 @@

---passL:"-lpthread" define:release +threads:on + +@if nimHasWarningObservableStores: + warning[ObservableStores]: off +@end # https://blog.filippo.io/easy-windows-and-linux-cross-compilers-for-macos/
M src/litestorepkg/lib/types.nimsrc/litestorepkg/lib/types.nim

@@ -16,14 +16,14 @@ import

config type - EDatastoreExists* = object of Exception - EDatastoreDoesNotExist* = object of Exception - EDatastoreUnavailable* = object of Exception - EInvalidTag* = object of Exception - EDirectoryNotFound* = object of Exception - EFileNotFound* = object of Exception - EFileExists* = object of Exception - EInvalidRequest* = object of Exception + EDatastoreExists* = object of CatchableError + EDatastoreDoesNotExist* = object of CatchableError + EDatastoreUnavailable* = object of CatchableError + EInvalidTag* = object of CatchableError + EDirectoryNotFound* = object of CatchableError + EFileNotFound* = object of CatchableError + EFileExists* = object of CatchableError + EInvalidRequest* = object of CatchableError ConfigFiles* = object auth*: string config*: string
M src/litestorepkg/lib/utils.nimsrc/litestorepkg/lib/utils.nim

@@ -344,7 +344,7 @@ # found at: https://github.com/rads/sqlite-okapi-bm25

# which is covered by the MIT License # http://opensource.org/licenses/MIT # the following code shall also be covered by the same MIT License -let okapi_bm25f_kb*: Create_function_func_func = proc (pCtx: Pcontext, nVal: int32, apVal: PValueArg) {.cdecl.} = +proc okapi_bm25f_kb*(pCtx: Pcontext, nVal: int32, apVal: PValueArg) {.cdecl.} = var matchinfo = cast[ptr UncheckedArray[int32]](value_blob(apVal[0])) # Setting the default values and ignoring argument based inputs so the extra # arguments can be the column weights instead.
M test/http_api.nimtest/http_api.nim

@@ -1,4 +1,4 @@

-import unittest, json, httpclient, strutils, os, times +import unittest, json, httpclient, strutils, times suite "LiteStore HTTP API":

@@ -59,7 +59,7 @@ ids = newSeq[string](0)

test "GET info": - check(info("datastore_version") == %1) + check(info("datastore_version") == %2) test "POST document": var rpost = jpost("docs", contents[0])