Releases: luposlip/nd-db
v0.9.0-beta1 - True laziness & CSV support
This version adds true laziness (#14) and CSV/TSV file database support (#11).
This is the first beta version of the new v0.9.0, that has a lot of refactoring behind the scenes, but keeps the same public API.
True laziness
To use the true lazy lazy-ids
and lazy-docs
you'll have to either delete your pre-v0.9.0 .nddbmeta
files, or upgrade them.
You may prefer to upgrade if the databases they represent are really big (because then indexing might take a while).
To upgrade the .nddbmeta
files, you simply call nd-db.convert/upgrade-nddbmeta!
from a repl. The function takes a db
value parameter and takes care of the rest.
CSV Support
CSV databases are just as simple to use, and takes up less space than the other data formats, because they don't replicate the keys for every document.
You need an additional parameter to create a database value based on CSV (or TSV): :col-separator
:
(nd-db.core/db :filename "some-data.csv" :col-separator ";" :id-path :id)
Parsing defaults to a parser that simply parses column data as numbers or strings - nothing else. But you can pass your own column parser like this:
(nd-db.core/db :filename "some-data.csv" :col-separator ";" :id-path :id :col-parser my-col-parser-fn)
Refer to unit tests for more info.
To see what's needed before the final release of v0.9.0
, check out this pull request: #15
v0.9.0-alpha3
The new .nddbmeta
format for version v0.9.0
and forward, will not only make a lazy seq of documents available. Now even the index can be lazily read.
Also the indexes are now generated in parallel - meaning 2/3 faster than before (on a mbp m1 pro).
Did lots of refactoring so far - more is needed before the final release.
Introducing lazy-docs
Maintenance update
Updated nippy
v0.7.1 - bugfix release
Downgraded nippy.
Projects using nd-db
0.7.0 couldn't compile nd-db
with nippy
version 3.2.0
.
v0.7.0 - portable databases - and more
This releases makes it possible to move the database (and serialized index) to another folder, without the need for generating a new index (which might be a bit time consuming for huge databases of multiple GBs).
Furthermore you can now use the new optional keyword parameter syntax, as well as the old well known map parameter.
See the README
and unit tests for examples.
Changes:
- Make serialized databases portable (not bound to a specific filesystem path)
- Support for clojure 1.11 keyword function parameters: https://clojure.org/news/2021/03/18/apis-serving-people-and-programs
- Update dependencies
v0.6.3 - upgrade to Clojure 1.11
- Upgrade Clojure 1.10.3 -> 1.11.1
- Upgraded other dependencies
- Minor optimizations
v0.6.2 - fix issue w/indexing
Fix issue when creating index for ndjson/ndedn
v0.6.1 - avoid a reflective call
Eliminate a reflective call when serializing the database.
v0.6.0 - introducing .ndnippy!
Now you can use .ndnippy
as database format. It's MUCH faster to load than
.ndjson
and .ndedn
, meaning better query times. Particularly when querying multiple documents at once.
Also a new util
namespace lets you convert from .ndjson
and .ndedn
to .ndnippy
.
.ndnippy
- like .ndedn
isn't really a standard. But it probably should be. I implemented the encoding for
.ndnippy
myself, it's somewhat naive, but really fast anyhow. If you have ideas on how to make it even
fast, let me know. Because version 0.6.0
introduces the .ndnippy
format, it may change several times in the
future, possibly making old .ndnippy
files incompatible with new versions. Now you're warned. Thankfully the
generation of new .ndnippy
files is quite fast.
NB: .ndnippy
isn't widely used, and probably isn't a good format for distribution, unless you can distribute
this nd-db
library with it!