69 Commits

Author SHA1 Message Date
Dmitriy Ryajov
d02f2e7380
Proper dispose (#60)
* cleanup error handling

* properly dipose statements and connections

* db should be var now

* autodispose db
2024-01-15 20:00:42 -08:00
Tomasz Bekas
3c4daf4198 Fix review comments 2024-01-10 16:54:14 +01:00
Tomasz Bekas
0d1ca4b2cd
Bump nim to 1.6.16 2023-12-20 15:21:26 +01:00
Tomasz Bekas
b692737eed Remove ConcurrentDatastore type 2023-12-20 10:55:59 +01:00
Tomasz Bekas
a6ab178092 Fix broken tests 2023-12-20 10:16:28 +01:00
gmega
18d0833141 explicitly annotate iterator exception effects so it does not default to raises: [Exception] 2023-12-20 08:50:15 +01:00
Tomasz Bekas
3d901cb658
Move modify methods to the Datastore interface 2023-12-19 15:49:44 +01:00
Tomasz Bekas
a62c91bb6b Return err from modify fn 2023-12-11 12:29:38 +01:00
Tomasz Bekas
f41bd9528e
Remove methods taking non-async functions 2023-12-04 13:39:43 +01:00
Tomasz Bekas
3d38850afc
Update docs 2023-11-27 17:09:49 +01:00
Tomasz Bekas
4c5ced6633 ModifyGet operations 2023-11-21 19:51:23 +01:00
Tomasz Bekas
3770d0d1a0
Remove semicolon 2023-11-21 13:31:18 +01:00
Tomasz Bekas
52bbe9d429
Concurrent datastore interface & sqlite implementation 2023-11-15 14:28:20 +01:00
Ben Bierens
0cde8aeb67
enables stylecheck (#40) 2023-03-09 10:24:44 +01:00
Dmitriy Ryajov
44c198b96a
rework contains to return a bool (#39) 2022-12-02 16:25:44 -06:00
Dmitriy Ryajov
9d49c8016e
Several fixes and missing features (#38)
* shorten lines

* only return data when `query.value == true`

* test `query.value = false`

* close mounted ds

* allow passing dispose to query iter constructor

* fix fs querying

* use currentSourcePath

* remove `dsobj` extensions from directories

* don't return error on missing key delete

* return `DatastoreKeyNotFound` on empty `get`

* return `DatastoreKeyNotFound` on missing sql key
2022-11-22 15:23:23 -06:00
Dmitriy Ryajov
6c06a3b095
Adding batching capabilities (#37)
* adding batch entry

* add batched put and delete

* add batched tests

* adding batching capabilities to remaining stores

* open db in readonly mode

* make naming consistent

* release prepared statements

* don't use deprecated add

* check file exists on test exit

* remove unused var
2022-09-30 08:24:26 -06:00
Dmitriy Ryajov
308b5c08be
Better fsds path sanitization (#31)
* add better path sanytizing

* rebase master

* Bugfixed and moved all checks into path()

* added check for empty basename in order to avoid bug in isValidFilename
* refactored - all filename checks are moved into path() function that constructs this filename

Co-authored-by: Bulat-Ziganshin <bulat.ziganshin@gmail.com>
2022-09-29 11:56:24 -06:00
Dmitriy Ryajov
f5dadd93be
Adding mounted store (#33)
* adding monted store

* misc spelling

* adding mounted store tests to suite

* split out key

* relaxed key initialization

* always mount and lookup by path

* cleaned up and reorged tests

* test lookup by path

* add re-exports

* more re-exports

* fix warnings and re-exports
2022-09-21 18:13:50 -06:00
Dmitriy Ryajov
446de6f978
Fsds query (#32)
* add basic query capabilities to fsds

* rename common tests

* make query tests common

* sanitize key

* check it's possible to query keys at same level
2022-09-20 18:18:33 -06:00
Dmitriy Ryajov
02167bb69e
Add proper sqlite query support (#30)
* Add query support for sqlite backend

* basic tests with in memory ds

* remove `close` default implementation
2022-09-20 14:41:54 -06:00
Dmitriy Ryajov
e6430b6b85
close db 2022-09-20 09:51:28 -06:00
Dmitriy Ryajov
a3781edc6a
remove path sanitization for now, address in upcoming pr 2022-09-20 09:16:56 -06:00
Dmitriy Ryajov
bb387650ab
exclude windows from protected dirs checking 2022-09-19 23:19:38 -06:00
Dmitriy Ryajov
b4b90485ef
wip 2022-09-19 23:11:47 -06:00
Dmitriy Ryajov
29577b6dd7
paths are already sanitized, removing allowed 2022-09-19 23:01:10 -06:00
Dmitriy Ryajov
309ac94f21
test invalid char on windows 2022-09-19 22:40:46 -06:00
Dmitriy Ryajov
fc842663bb
implement close method for sqlite 2022-09-19 22:40:01 -06:00
Dmitriy Ryajov
68f3f86cd9
fix invalid identation on nim 1.6.6 2022-09-19 22:31:24 -06:00
Dmitriy Ryajov
1dfc30f64a
more valid chars 2022-09-19 22:28:58 -06:00
Dmitriy Ryajov
5f6acbd88d
add numbers as allowed chars 2022-09-19 22:27:08 -06:00
Dmitriy Ryajov
17c4ff92a4
use proper os separator depending on OS 2022-09-19 22:21:10 -06:00
Dmitriy Ryajov
f9cfab5cbc
commend out query for now 2022-09-19 17:29:32 -06:00
Dmitriy Ryajov
c0f6e38fda
cleanup tiered ds 2022-09-19 17:13:34 -06:00
Dmitriy Ryajov
7f9c319b98
export sqlds 2022-09-19 17:13:20 -06:00
Dmitriy Ryajov
ec4015a404
proper query iterator interface 2022-09-19 17:13:11 -06:00
Dmitriy Ryajov
60e0ea5573
get rid of null datastore 2022-09-19 17:12:52 -06:00
Dmitriy Ryajov
2680789884
missing key should return appropriate error 2022-09-19 17:12:34 -06:00
Dmitriy Ryajov
5e30230a9f
default implementation for close 2022-09-19 17:12:16 -06:00
Dmitriy Ryajov
4d43447ef2
add sql top level export 2022-09-19 15:53:24 -06:00
Dmitriy Ryajov
bdc10c27fd
rename tired datastore 2022-09-19 15:53:13 -06:00
Dmitriy Ryajov
9fcf719d0f
rename null datastore 2022-09-19 15:53:00 -06:00
Dmitriy Ryajov
24d161d4b4
more cleanup 2022-09-19 15:52:46 -06:00
Dmitriy Ryajov
437ae2e035
add proper query interface 2022-09-19 15:52:34 -06:00
Dmitriy Ryajov
b380d09d6b
rename fsstore to fsds 2022-09-19 15:52:00 -06:00
Dmitriy Ryajov
13bc02f595
split out and cleanup sql lite store 2022-09-16 21:14:31 -06:00
Dmitriy Ryajov
2390839406
rename and cleanup fs store 2022-09-16 21:13:25 -06:00
Dmitriy Ryajov
b150b2f922
cleanup key 2022-09-16 21:12:49 -06:00
Dmitriy Ryajov
78653d9dd4
wip 2022-09-12 12:30:52 -06:00
Dmitriy Ryajov
ed6842b743
simplify key api 2022-09-10 13:50:05 -06:00