Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

datascript

Package Overview
Dependencies
Maintainers
1
Versions
112
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

datascript - npm Package Versions

1
12

0.13.0

Diff

Changelog

Source

0.13.0

  • [ BREAKING ] Main namespace to include is now datascript.core, not datascript
  • [ BREAKING ] Old datascript.core (internal namespace) was renamed to datascript.db
  • [ BREAKING ] datascript.shim (internal namespace) was renamed to datascript.arrays

Motivations:

  • Usage of top-level namespaces is discouraged and even generates a warning in CLJS.
  • Better sooner than later.
  • 0.13 seems like a great number for this sort of release.

Migration procedure:

  • Just change (require '[datascript :as d]) to (require '[datascript.core :as d]) and you’re good to go.

For the sake of easy migration, there’re no other changes in this release. Just renamings.

tonsky
published 0.12.2 •

Changelog

Source

0.12.2

  • Fix null pointer exception when contains? is called with an entity (PR #114, thx Kevin Lynagh)
tonsky
published 0.12.1 •

Changelog

Source

0.12.1

  • db-init respects :db/index property
tonsky
published 0.12.0 •

Changelog

Source

0.12.0

[ BREAKING ] Introducing new :db/index schema attribute:

  • Attributes are not put to AVET by default anymore

  • Following attributes are put to AVET:

    • :db/index true
    • :db/unique :db.unique/identity
    • :db/unique :db.unique/value
    • :db/valueType :db.type/ref
  • All attributes put to AVET should be comparable. Note: maps and list are not comparable by default, vectors are compared value-by-value

  • [ BREAKING ] Min/max aggregation functions will only work on a comaparable values

Benefits:

  • You can finally store any trash easily and reliably in DataScript database: maps, vectors, functions, JS objects. It doesn’t even have to be comparable. Just do not mark it as :db/index and do not make it :db.cardinality/many
  • Faster transactions. There’s ⅓ less indexes to fill
  • Good defaults. Most cases where you’ll probably use AVET (lookup by value)—lookup refs, external ids, references—they are all indexed by default

Caveats:

  • Your code may break (see below)
  • Queries can do lookup by value event without :db/index attribute, but it’ll be slower

Migration procedure:

  • Check your code for datoms, seek-datoms calls with :avet index, and index-range call
  • Check your queries to see if they utilize AVET index. It happens when you use this pattern: [?free-var <constant-attr> <constant-value>]
  • Mark necessary attributes with :db/index true in the schema
tonsky
published 0.11.6 •

Changelog

Source

0.11.6

  • msec argument to squuid (#95, #97)
  • lookup refs in JS API pull, pull_many, entity (#94, thx Matt Senior)
  • fix in Pull API for reverse non-component attributes (#91, thx Matt Senior)
  • Node.js and Browser repls for dev profile (#93)
  • Preconditions to validate db/conn arguments (#101)
  • Id allocation bug (#66)
tonsky
published 0.11.5 •

Changelog

Source

0.11.5

  • Ported BTSet to JVM
  • BTSet and BTSetIter implement ChunkedSeq
  • New benchmark runner

This release brings a significant performance boost for JVM version of DataScript (numbers are in comparison to JS/v8 version):

  • queries with single clause, no join: ~5–6 times faster
  • queries with joins: ~3–4.5 times faster
  • transact: ~3 times faster
  • init-db: ~3–4 times faster
  • rules: ~3-4 times faster
tonsky
published 0.11.4 •

Changelog

Source

0.11.4

Experimental support for Clojure on JVM:

  • sorted-set instead of BTSet
  • polymorphic get lookup in query
  • no sorting optimisation for init-db

Performance numbers so far (raw data):

  • queries with single clause, no join: 30–50% faster
  • queries with joins: ~50% slower
  • transact: ~3.5–4 times faster
  • init-db: ~2–2.5 times slower
  • rules: ~2–5 times faster
  • db equiv: ~5 times slower
  • db hash: ~10 times slower
tonsky
published 0.11.3 •

Changelog

Source

0.11.3

  • Fixed UUID constructor warning under CLJS 0.0-3291 and later
tonsky
published 0.11.2 •

Changelog

Source

0.11.2

  • Support reverse attribute refs in combination with wildcards (issue #80)
  • *.cljc sources do not conflict with Clojure now. Code compiles under [lein-cljsbuild "1.0.6"]
tonsky
published 0.11.1 •

Changelog

Source

0.11.1

  • Return nil from entity when passed nil eid (issue #75)
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc