Files
simply_based/CHANGELOG.md

2.7 KiB

Changelog

0.1.1 (unreleased, branch code-review-fixes)

Independent code review against live Couchbase 8.0.1 CE (see SIMPLY_BASED_REVIEW.md). Fixes:

  • Embedded documents: fixed SystemStackError (infinite mutual recursion) when accessing embedded collections loaded from the database; rebuilt EmbeddedClass.all/.count (they referenced silently-dropped raw JS views — .all returned [] and .count raised NoMethodError); the spec exclusion for embedding was broken (filtered a tag no example carried) — basic embedded flows now run green, only reverse lookups stay excluded, honestly tagged.
  • Store#view raises SimplyBased::UnsupportedView for view declarations the N1QL translation cannot honour (:conditions / :emit_value / list functions) instead of silently returning unfiltered results.
  • N1QL identifier quoting hardened (quote_ident rejects backtick smuggling); index predicates quote class names as proper string literals.
  • ensure_index warns when index creation is swallowed (was fully silent while every subsequent query fell back to a primary scan); bookkeeping is mutex-guarded.
  • bulk_load / bulk_destroy now use batched KV multi-operations (get_multi / remove_multi) — previously one KV round trip per document despite the "batched KV" claim.
  • Counter#increment follows Redis INCR/INCRBY semantics (first increment of a missing key returns the delta; it used to return 0 and undercount by one). Decrement's unsigned clamp-at-zero divergence is documented and tested.
  • Lock#release requires the CAS handle (nil used to delete any lock unconditionally); force_release! added; acquire validates a positive ttl.
  • Deterministic tree ordering: tree queries tie-break equal positions by created_at and document id (was the main source of the "flaky ancestry" failures).
  • The adapter-contract shared examples are now actually included by a spec; added multi-threaded concurrency specs (counters, locks, CAS conflicts).

0.1.0

  • Initial release: a Couchbase-native ActiveModel ORM, API-compatible with simply_couch. include SimplyBased::Model.
    • SimplyBased::Store: KV documents, N1QL/SQL++ finders, CAS-as-_rev optimistic concurrency. No CouchDB design documents or JavaScript views.
    • Associations (belongs_to / has_many / has_one / has_and_belongs_to_many) served by N1QL + lazily-created GSIs instead of hand-written map/reduce.
    • Redis replacements on the same cluster: Counter (atomic), Cache (ActiveSupport::Cache::Store over KV+TTL), Lock (insert-if-absent + CAS).
    • Ancestry/trees via materialized path (path_ids) in plain N1QL.
    • Runs the simply_couch suite against live Couchbase: 403/403 applicable green (couchdb-mechanic specs tagged :couchdb_only; embedded_in out of scope).