all repos — litestore @ b2b18e78abb6a965031ebfa8036aa1fe962c69cd

A minimalist nosql document store.

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

b2b18e78abb6a965031ebfa8036aa1fe962c69cd

parent

d610aee2dab4df248dd01904e7514b789c31d7e1

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])