Releases: JuliaDatabases/LMDB.jl
Releases · JuliaDatabases/LMDB.jl
Release list
v3.0.0
LMDB v3.0.0
Breaking changes: Upgrade to LMDB 1.0, whose on-disk format is incompatible with LMDB 0.9
Merged pull requests:
v2.0.0
LMDB v2.0.0
Revival of LMDB.jl, fixing many issues and adding a new mid-level API for more direct access to LMDB's features (i.e., where the Dict doesn't suffice, but without having to drop down to the C API).
Breaking changes:
- The minimum Julia version is now 1.10.
- The factory functions
create(),environment(path),start(env),open(env, path),open(txn),open(txn, dbi)have been replaced by constructors:LMDB.Environment(path; mapsize, maxreaders, maxdbs, flags, mode),LMDB.Transaction(env; flags, parent),LMDB.Database(txn, name; flags),LMDB.Cursor(txn, dbi). - The
DBIstruct was renamed toDatabase. - Only
LMDBDictandLMDBErrorare exported. Everything else moved to @public, so the wrapper types and operations are reached asLMDB.Environment,LMDB.Transaction,LMDB.Database,LMDB.Cursor,LMDB.set!,LMDB.sync,LMDB.info,LMDB.seek!, etc. - The whole 1.x cursor iteration surface is gone:
LMDBIterator,ReturnKeys,ReturnValues,ReturnBoth,ReturnValueSize,DirectoryLister,Base.iterate(cur, K, V),keys(cur, T; prefix),values(cur, T; prefix), andget(cur, key, T, op::MDB_cursor_op). Replaced by either iteration overLMDBDict(which is now <:AbstractDict) or, at the cursor level, explicit positioning withLMDB.seek!/LMDB.seek_range!/LMDB.next!/LMDB.prev!/ the_dup/_nodup variants plusLMDB.key(cur, K)/LMDB.value(cur, V)/LMDB.item(cur, K, V). For bulk traversal, useLMDB.walk(f, cur; from). tryget(txn, dbi, key, T)is replaced byLMDB.get(txn, dbi, key, T, nothing), which is the canonicalBase.get(d, k, default)shape. The throwing formLMDB.get(txn, dbi, key, T)and the new default-formLMDB.get(txn, dbi, key, T, default)are the two read primitives.- The custom typed-decode extension point
_mbd_unpack(T, ::MDB_val)is gone. OverrideBase.read(io::IO, ::Type{T})instead. Base.keys(d::LMDBDict; prefix)andBase.values(d::LMDBDict; prefix)no longer return a collected Vector; they now return the standardKeySet/ValueIteratorviews fromAbstractDict. For prefix-scoped collected results, useLMDB.scan_keys(d; prefix),LMDB.scan_values(d; prefix), orLMDB.scan(d; prefix)for pairs.Base.empty(d::LMDBDict)andBase.copy(d::LMDBDict)now throwArgumentError: anLMDBDictneeds an on-disk directory, so there's no path-less zero-argument form. UseDict(d)for an in-memory snapshot orBase.copy(d.env, path)for an on-disk clone.info(env)previously returned anMDB_envinfoC struct withme_-prefixed fields. It now returns aNamedTuplewithmapaddr,mapsize,last_pgno,last_txnid,maxreaders,numreaders.put!(txn, dbi, key, val)returns nothing instead of aCintstatus.delete!(txn, dbi, key)returnsBool(true if removed, false ifMDB_NOTFOUND) instead of throwing on missing. The optional val argument no longer has aC_NULLdefault; usedelete!(txn, dbi, key, val)forDUPSORT-specific dup removal.LMDB.LibLMDBsubmodule is gone. C bindings live directly inLMDBnow, reachable asLMDB.mdb_env_open,LMDB.MDB_val,LMDB.MDB_NOTFOUND, etc.env[:Unknown]andenv[:Unknown] = vnow throwArgumentErrorinstead of warning and returning a meaningless zero.
For an example, what looked like this in 1.0:
env = create()
env[:MapSize] = 1 << 30
open(env, "/tmp/db")
start(env) do txn
dbi = open(txn)
put!(txn, dbi, "k", "v")
v = tryget(txn, dbi, "k", String) # → Union{String,Nothing}
end
close(env)... now looks like:
LMDB.Environment("/tmp/db"; mapsize = 1 << 30) do env
LMDB.Transaction(env) do txn
LMDB.Database(txn) do dbi
put!(txn, dbi, "k", "v")
v = LMDB.get(txn, dbi, "k", String, nothing)
end
end
endMerged pull requests:
- Bump to Julia 1.10 and update CI. (#49) (@maleadt)
- Fix correctness bugs (#50) (@maleadt)
- Modernize Clang.jl-generated bindings. (#51) (@maleadt)
- Improve wrappers (#52) (@maleadt)
- Add a high-level API (#53) (@maleadt)
- Improve LMDBDict (#54) (@maleadt)
- Switch typed-read extension point to Base.read(::MDBValueIO, T). (#55) (@maleadt)
- Extend documentation (#56) (@maleadt)
- Improve tests (#57) (@maleadt)
- Get rid of some LLMisms. (#58) (@maleadt)
- Improve test coverage (#59) (@maleadt)
- Audit exports. (#60) (@maleadt)
- NFC clean-ups. (#61) (@maleadt)
- Bump codecov/codecov-action from 5 to 6 (#63) (@dependabot[bot])
- Bump julia-actions/cache from 2 to 3 (#64) (@dependabot[bot])
- Bump actions/checkout from 4 to 6 (#65) (@dependabot[bot])
- Bump JLL version. (#66) (@maleadt)
- Improvements to new Julia API (#67) (@maleadt)
Closed issues:
v1.0.0
LMDB v1.0.0
Closed issues:
- Source file URLS in documentation seem to be local to the build machine (#21)
- type piracy in
convertcauses ambiguity errors (#29) - Warning fails to show (#30)
Merged pull requests:
- Don't check the
Manifest.tomlfile into source control (#31) (@DilumAluthge) - Add the
get!(d::LMDBDict, key, default),get(f::Function, d::LMDBDict, key), andget!(f::Function, d::LMDBDict, key)methods (#32) (@DilumAluthge) - Change all occurences of
warn(...)to@warn(...)(#33) (@DilumAluthge) - Don't extend
Base.convert; instead, define a separatembd_unpackfunction (#34) (@DilumAluthge) - Update Project.toml (#36) (@meggart)
v0.2.1
v0.2.0
LMDB v0.2.0
Closed issues:
- Segfaults (#1)
- Fails to build on OS X (#2)
- add project to Projects using Docile / Lexicon (#3)
- Problems building LMDB (#4)
- Parallel access? (#5)
- Get rid of C wrapper code (#6)
- Wrap cursor in an interator (#7)
- pointer to invalid memory in MDBValue? (#12)
- unable to store types other than Number, String, and Array (#13)
- tag a release? (#17)
- Failing to build on Gitlab's CI runner (#20)
- Info about upcoming removal of packages in the General registry (#22)
- Julia can't find library (#25)
Merged pull requests:
- tweaks and typos (#8) (@catawbasam)
- make it Julia 0.5 compatible (#10) (@tanmaykm)
- option to delete all values,
Base.dropdeprecation, avoidPkg.dir(#11) (@tanmaykm) - Fix deprecated types in 0.7 & improve MDBValue type handling (#14) (@wildart)
- use Int32 instead of int32 (#16) (@tanmaykm)
- Key Iterator & 1.0 compatibility (#19) (@madsciencetist)
- WIP: Update the package (#27) (@meggart)