Skip to content

Releases: tonsky/datascript

0.8.0

19 Jan 13:08
Compare
Choose a tag to compare
  • Find specifications: collection :find [?e ...], tuple :find [?e ?v], and scalar :find ?e .
  • Support for :db/isComponent (issue #3)
  • Support for nested maps in transact! (also fixes #38)
  • [ BREAKING ] Custom aggregate fns must be called via special syntax (aggregate keyword): (q '[:find (aggregate ?myfn ?e) :in $ ?myfn ...]). Built-in aggregates work as before: (q '[:find (count ?e) ...]
  • Return nil from entity when passed nil eid (issue #47)
  • Transaction data is now validated, with proper error messages (also fixes #48)

0.7.2

22 Dec 14:15
Compare
Choose a tag to compare
  • Fixed a bug with function call after function relation was filtered out (issue #44)

0.7.1

15 Dec 21:24
Compare
Choose a tag to compare

Fixed a bug when emtpy coll in input was not creating empty relation

0.7.0

15 Dec 15:53
Compare
Choose a tag to compare
  • BTSet and its slices (returned by datoms/seek-datoms calls) now support fast reverse iteration via reverse.
  • (datascript/datom e a v & [tx added]) call for creating new datoms
  • Added missing aggregate funs: avg, median, variance, stddev and count-distinct (issue #42, thx @montyxcantsin)
  • min and max aggregates use comparator instead of default js < comparison
  • Fixed a bug when fn inside a query on empty relation returned non-empty result
  • Filtered DB support via filter

0.6.0

29 Nov 22:43
Compare
Choose a tag to compare
  • [ BREAKING ] Entity ids and transaction ids now have to be numbers, attributes can only be keywords (strings if used from JS)
  • New method init-db for fast creation of DB from existing datoms (useful for e.g. initialization from serialized state)
  • Improved performance of transact! (~20%) and initial database population (init-db, db-from-reader, ~800%)

0.5.2

16 Nov 18:47
Compare
Choose a tag to compare
  • Externs provided via deps.cljs — no need to manually specify externs when using datascript dependency

0.5.1

06 Nov 18:19
Compare
Choose a tag to compare
  • Ability to pass inputs (predicates/functions bindings) down to rules (issues #28 #29)

0.5.0

05 Nov 12:58
Compare
Choose a tag to compare

This is breaking release with no new features, just repacked JS version of DataScript so it can be used via modern JS dependency managers:

  • Javascript version is now packaged as a proper CommonJS/RequireJS module (include via script tag still supported) (issue #39)
  • Published to npm: npmjs.org/package/datascript
  • [ BREAKING ] Javascript namespace is renamed from datascript.js to datascript

0.4.2

28 Oct 19:20
Compare
Choose a tag to compare
  • Reference transaction id inside transaction by using :db/current-tx instead of entity id (issue #32)
  • You can get id of transaction from TxReport: (get-in tx-report [:tempids :db/current-tx])
  • Ability to pass arbitrary metadata along with transaction (third argument to transact!) and read it in listener callback (:tx-meta key of TxReport) (issue #32)

0.4.1

19 Sep 08:03
Compare
Choose a tag to compare
  • Added :db.fn/cas transaction function (issue #20, thx @montyxcantsin)
  • Added get-some, get-else, misssing? query functions (issue #21, thx @montyxcantsin)
  • Fixed touch breaking entity cache (issue #17)
  • Added ground fn (issue #25)
  • Fixed query predicate/fn calls without free variables
  • Retract incoming entity references on :db.fn/retractEntity (issue #18)
  • You can now use reverse relation name when transacting entity as a map