Skip to content

Releases: vbasky/somnia

somnia v0.4.1

06 Jun 01:13

Choose a tag to compare

Changed

  • README — bumped version strings and badge references from 0.3 to 0.4;
    added then_select usage example. (crates.io README was stale in 0.4.0.)

somnia v0.4.0

06 Jun 00:31

Choose a tag to compare

Added

  • then_select on CREATE/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-up SELECT as a ;-separated batch. Available on Create<T>,
    Update<T>, and Delete<T>.

somnia v0.3.1

05 Jun 22:29

Choose a tag to compare

Changed (0.3.1)

  • crates.io README — the somnia crate's own README.md (what crates.io
    renders) now mirrors the repo README: banner, current somnia = "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

05 Jun 22:15

Choose a tag to compare

The P0 correctness fixes from the roadmap. Two are breaking at
the serialization/type-bound level, hence the minor bump.

Fixed

  • Record-id key escapingThing literals and RELATE now 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.
  • INSERT renders inlineInsert::to_surrealql now serializes the queued
    record(s) as object literals (INSERT INTO t { … } / [ … ]) instead of an
    unbound $data placeholder that never resolved.

Changed

  • (Breaking) Geometry is GeoJSONPoint/LineString/Polygon now
    serialize/deserialize as GeoJSON objects ({ "type", "coordinates" }) instead
    of bare coordinate arrays, so SurrealDB stores them as geometry. They also
    gained query-literal support. Any data persisted in the old array form must be
    migrated.
  • (Breaking) Insert::to_surrealql now requires T: 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

05 Jun 15:07

Choose a tag to compare

Changed (0.2.2)

  • License is now Apache-2.0 only (was the dual MIT OR Apache-2.0).
    Consolidated to a single LICENSE file so GitHub detects the license, and
    updated the license field and all READMEs accordingly.

somnia v0.2.1

05 Jun 14:52

Choose a tag to compare

Added

  • SurrealRecord derive macro is now re-exported from the somnia umbrella
    crate (somnia::SurrealRecord). Users no longer need somnia-derive as an
    explicit dependency — a single somnia = "0.2" in Cargo.toml is sufficient.

Changed

  • README examples now use domain-agnostic Post/Comment models instead of
    media-specific Asset/AssetVersion.

somnia v0.2.0

05 Jun 14:29

Choose a tag to compare

Fixed

  • SurrealDB datetime/uuid literal compatibility — datetime values now render
    as d'…' and UUIDs as u'…', matching SurrealDB 2.0+ syntax. Previously they
    rendered as bare quoted strings, so a filter like created_at > <datetime>
    compared a datetime field against a string and silently mismatched.
  • somnia-cli exit codes — running somnia with no subcommand (or
    somnia migration with 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) Key conversions are now idiomatic — the key-inference logic
    moved into From<&str>/From<String> and a new FromStr impl (so
    "abc".parse::<Key>() works). The inherent Key::from_str method (and its
    #[allow(clippy::should_implement_trait)]) was removed; use Key::from(...)
    or .parse() instead. Inference behaviour is unchanged.

somnia v0.1.1

05 Jun 13:58

Choose a tag to compare

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), but diskann does 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/homepage URLs to https://github.com/vbasky/somnia.

Fixed

  • Green CI: applied rustfmt, and configured cargo-deny for the dependency
    tree — scoped BUSL-1.1 exceptions for the SurrealDB crates and a documented
    ignore for RUSTSEC-2023-0071 (transitive rsa, no upstream fix).