Skip to content

Commit

Permalink
Version 0.11.0
Browse files Browse the repository at this point in the history
  • Loading branch information
tonsky committed Apr 30, 2015
1 parent e16341c commit 9074375
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 22 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,4 @@ perf
release-js/datascript*.js
release-js/npm-*
web/target-cljs
release.clj
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
# 0.11.0

- Fixed `init_db` in js (issue #73)
- Preliminary work for Clojure port (PR #70, #71)
- [ BREAKING ] DS now requires CLJS 0.0-3196 or later

# 0.10.0

- New parser for query and rules
Expand Down
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,13 @@ For more examples, see [our acceptance test suite](test/datascript/test/).

```clj
:dependencies [
[org.clojure/clojurescript "0.0-2985"]
[datascript "0.10.0"]
[org.clojure/clojurescript "0.0-3211"]
[datascript "0.11.0"]
]
```

_Note:_ DataScript 0.11.0 and later will only work with CLJS 0.0-3196 and later

```clj
(require '[datascript :as d])

Expand Down Expand Up @@ -119,11 +121,9 @@ For more examples, see [our acceptance test suite](test/datascript/test/).
DataScript can be used from any JS engine without additional dependencies:

```
<script src="datascript-0.10.0.min.js"></script>
<script src="https://github.com/tonsky/datascript/releases/download/0.11.0/datascript-0.11.0.min.js"></script>
```

[Download datascript-0.10.0.min.js](https://github.com/tonsky/datascript/releases/download/0.10.0/datascript-0.10.0.min.js), 69k gzipped.

or as a CommonJS module ([npm page](https://www.npmjs.org/package/datascript)):

```
Expand Down
2 changes: 1 addition & 1 deletion project.clj
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
(defproject datascript "0.10.0"
(defproject datascript "0.11.0"
:description "An implementation of Datomic in-memory database and Datalog query engine in ClojureScript"
:license {:name "Eclipse"
:url "http://www.eclipse.org/legal/epl-v10.html"}
Expand Down
3 changes: 2 additions & 1 deletion release-js/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "datascript",
"version": "0.10.0",
"version": "0.11.0",
"description": "Immutable in-memory triplestore with Datalog queries",
"homepage": "https://github.com/tonsky/datascript",
"author": "Nikita Prokopov (https://github.com/tonsky)",
Expand All @@ -18,6 +18,7 @@
"Nikita Prokopov (https://github.com/tonsky)",
"David Thomas Hume (https://github.com/dthume)",
"montyxcantsin (https://github.com/montyxcantsin)",
"Ben Fleis (https://github.com/benfleis)",
"Gijs Stuurman (https://github.com/thegeez)",
"Yevgeny Armor (https://github.com/izirku)",
"Kevin Lynagh (https://github.com/lynaghk)",
Expand Down
2 changes: 1 addition & 1 deletion release-js/wrapper.prefix
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Datascript v0.10.0
* Datascript v0.11.0
*
* Copyright 2014-2015 Nikita Prokopov
*
Expand Down
15 changes: 1 addition & 14 deletions src/datascript/core.cljc
Original file line number Diff line number Diff line change
Expand Up @@ -90,23 +90,10 @@

;; fast versions without nil checks

;; see http://dev.clojure.org/jira/browse/CLJS-892
(defn- compare-keywords-quick [a b]
(cond
(identical? (.-fqn a) (.-fqn b)) 0
(and (not (.-ns a)) (.-ns b)) -1
(.-ns a) (if-not (.-ns b)
1
(let [nsc (garray/defaultCompare (.-ns a) (.-ns b))]
(if (zero? nsc)
(garray/defaultCompare (.-name a) (.-name b))
nsc)))
:default (garray/defaultCompare (.-name a) (.-name b))))

(defn- cmp-attr-quick [a1 a2]
;; either both are keywords or both are strings
(if (keyword? a1)
(compare-keywords-quick a1 a2)
(-compare a1 a2)
(garray/defaultCompare a1 a2)))

(defn- cmp-val-quick [o1 o2]
Expand Down

0 comments on commit 9074375

Please sign in to comment.