Releases: vbasky/somnia
Releases · vbasky/somnia
somnia v0.4.1
Changed
- README — bumped version strings and badge references from
0.3to0.4;
addedthen_selectusage example. (crates.io README was stale in 0.4.0.)
somnia v0.4.0
Added
then_selectonCREATE/UPDATE/DELETE— replaces the manual
Batch::new().push(mut).push(select).to_surrealql()pattern with a single
method chain:create.then_select(select). Joins any mutation statement with
a follow-upSELECTas a;-separated batch. Available onCreate<T>,
Update<T>, andDelete<T>.
somnia v0.3.1
Changed (0.3.1)
- crates.io README — the
somniacrate's ownREADME.md(what crates.io
renders) now mirrors the repo README: banner, currentsomnia = "0.3"usage,
and absolute URLs for the banner/links so they resolve on crates.io. Docs only;
no code changes.
somnia v0.3.0
The P0 correctness fixes from the roadmap. Two are breaking at
the serialization/type-bound level, hence the minor bump.
Fixed
- Record-id key escaping —
Thingliterals andRELATEnow backtick-quote
UUID and non-identifier string keys (e.g.asset:`0190a-…`), so they
parse as a record id instead of an arithmetic expression. Integer and
simple-identifier keys are unchanged. INSERTrenders inline —Insert::to_surrealqlnow serializes the queued
record(s) as object literals (INSERT INTO t { … }/[ … ]) instead of an
unbound$dataplaceholder that never resolved.
Changed
- (Breaking) Geometry is GeoJSON —
Point/LineString/Polygonnow
serialize/deserialize as GeoJSON objects ({ "type", "coordinates" }) instead
of bare coordinate arrays, so SurrealDB stores them asgeometry. They also
gained query-literal support. Any data persisted in the old array form must be
migrated. - (Breaking)
Insert::to_surrealqlnow requiresT: Serialize(it
serializes the record inline).
Added
- Homebrew tap — releases now publish a formula to
vbasky/homebrew-somnia
(brew tap vbasky/somnia && brew install somnia).
somnia v0.2.2
Changed (0.2.2)
- License is now Apache-2.0 only (was the dual
MIT OR Apache-2.0).
Consolidated to a singleLICENSEfile so GitHub detects the license, and
updated thelicensefield and all READMEs accordingly.
somnia v0.2.1
Added
SurrealRecordderive macro is now re-exported from thesomniaumbrella
crate (somnia::SurrealRecord). Users no longer needsomnia-deriveas an
explicit dependency — a singlesomnia = "0.2"in Cargo.toml is sufficient.
Changed
- README examples now use domain-agnostic
Post/Commentmodels instead of
media-specificAsset/AssetVersion.
somnia v0.2.0
Fixed
- SurrealDB datetime/uuid literal compatibility — datetime values now render
asd'…'and UUIDs asu'…', matching SurrealDB 2.0+ syntax. Previously they
rendered as bare quoted strings, so a filter likecreated_at > <datetime>
compared adatetimefield against astringand silently mismatched. somnia-cliexit codes — runningsomniawith no subcommand (or
somnia migrationwith no subcommand) now prints help and exits 0 instead
of clap's default exit code 2. Showing help/usage is not an error; genuine
parse errors (unknown subcommand, missing required argument) still exit 2.
Changed
- (Breaking)
Keyconversions are now idiomatic — the key-inference logic
moved intoFrom<&str>/From<String>and a newFromStrimpl (so
"abc".parse::<Key>()works). The inherentKey::from_strmethod (and its
#[allow(clippy::should_implement_trait)]) was removed; useKey::from(...)
or.parse()instead. Inference behaviour is unchanged.
somnia v0.1.1
Release-engineering and metadata patch — no library API changes.
Changed
- Corrected the declared minimum supported Rust version to 1.95 (was an
optimistic 1.75). The SurrealDB 3.x dependency tree requires it:roaring
declares 1.90 (the highest declared MSRV), butdiskanndoes not actually
compile below 1.95 (it hits rust-lang/rust#100013 on older toolchains), so
1.95 is the true floor. - Fixed the
repository/homepageURLs tohttps://github.com/vbasky/somnia.
Fixed
- Green CI: applied
rustfmt, and configuredcargo-denyfor the dependency
tree — scoped BUSL-1.1 exceptions for the SurrealDB crates and a documented
ignore for RUSTSEC-2023-0071 (transitiversa, no upstream fix).