datahike 0.7.1630
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +226 -0
- package/cljs.analyzer.api.js +427 -0
- package/cljs.analyzer.api.js.map +1 -0
- package/cljs.analyzer.impl.js +86 -0
- package/cljs.analyzer.impl.js.map +1 -0
- package/cljs.analyzer.impl.namespaces.js +219 -0
- package/cljs.analyzer.impl.namespaces.js.map +1 -0
- package/cljs.analyzer.js +7186 -0
- package/cljs.analyzer.js.map +1 -0
- package/cljs.analyzer.passes.and_or.js +141 -0
- package/cljs.analyzer.passes.and_or.js.map +1 -0
- package/cljs.analyzer.passes.js +104 -0
- package/cljs.analyzer.passes.js.map +1 -0
- package/cljs.cache.js +1145 -0
- package/cljs.cache.js.map +1 -0
- package/cljs.cache.wrapped.js +352 -0
- package/cljs.cache.wrapped.js.map +1 -0
- package/cljs.core.async.impl.buffers.js +489 -0
- package/cljs.core.async.impl.buffers.js.map +1 -0
- package/cljs.core.async.impl.channels.js +711 -0
- package/cljs.core.async.impl.channels.js.map +1 -0
- package/cljs.core.async.impl.dispatch.js +81 -0
- package/cljs.core.async.impl.dispatch.js.map +1 -0
- package/cljs.core.async.impl.ioc_helpers.js +192 -0
- package/cljs.core.async.impl.ioc_helpers.js.map +1 -0
- package/cljs.core.async.impl.protocols.js +368 -0
- package/cljs.core.async.impl.protocols.js.map +1 -0
- package/cljs.core.async.impl.timers.js +510 -0
- package/cljs.core.async.impl.timers.js.map +1 -0
- package/cljs.core.async.js +8813 -0
- package/cljs.core.async.js.map +1 -0
- package/cljs.core.js +38764 -0
- package/cljs.core.js.map +1 -0
- package/cljs.env.js +60 -0
- package/cljs.env.js.map +1 -0
- package/cljs.nodejs.js +80 -0
- package/cljs.nodejs.js.map +1 -0
- package/cljs.reader.js +462 -0
- package/cljs.reader.js.map +1 -0
- package/cljs.spec.alpha.js +5312 -0
- package/cljs.spec.alpha.js.map +1 -0
- package/cljs.spec.gen.alpha.js +2020 -0
- package/cljs.spec.gen.alpha.js.map +1 -0
- package/cljs.tagged_literals.js +103 -0
- package/cljs.tagged_literals.js.map +1 -0
- package/cljs.tools.reader.edn.js +960 -0
- package/cljs.tools.reader.edn.js.map +1 -0
- package/cljs.tools.reader.impl.commons.js +217 -0
- package/cljs.tools.reader.impl.commons.js.map +1 -0
- package/cljs.tools.reader.impl.errors.js +441 -0
- package/cljs.tools.reader.impl.errors.js.map +1 -0
- package/cljs.tools.reader.impl.inspect.js +182 -0
- package/cljs.tools.reader.impl.inspect.js.map +1 -0
- package/cljs.tools.reader.impl.utils.js +429 -0
- package/cljs.tools.reader.impl.utils.js.map +1 -0
- package/cljs.tools.reader.js +1830 -0
- package/cljs.tools.reader.js.map +1 -0
- package/cljs.tools.reader.reader_types.js +838 -0
- package/cljs.tools.reader.reader_types.js.map +1 -0
- package/cljs_env.js +18192 -0
- package/cljs_node_io.core.js +1278 -0
- package/cljs_node_io.core.js.map +1 -0
- package/cljs_node_io.file.js +918 -0
- package/cljs_node_io.file.js.map +1 -0
- package/cljs_node_io.fs.js +3911 -0
- package/cljs_node_io.fs.js.map +1 -0
- package/clojure.data.js +319 -0
- package/clojure.data.js.map +1 -0
- package/clojure.edn.js +119 -0
- package/clojure.edn.js.map +1 -0
- package/clojure.set.js +406 -0
- package/clojure.set.js.map +1 -0
- package/clojure.string.js +502 -0
- package/clojure.string.js.map +1 -0
- package/clojure.walk.js +156 -0
- package/clojure.walk.js.map +1 -0
- package/datahike.api.impl.js +621 -0
- package/datahike.api.impl.js.map +1 -0
- package/datahike.api.specification.js +85 -0
- package/datahike.api.specification.js.map +1 -0
- package/datahike.array.js +275 -0
- package/datahike.array.js.map +1 -0
- package/datahike.config.js +437 -0
- package/datahike.config.js.map +1 -0
- package/datahike.connections.js +55 -0
- package/datahike.connections.js.map +1 -0
- package/datahike.connector.js +1248 -0
- package/datahike.connector.js.map +1 -0
- package/datahike.constants.js +66 -0
- package/datahike.constants.js.map +1 -0
- package/datahike.core.js +628 -0
- package/datahike.core.js.map +1 -0
- package/datahike.datom.js +963 -0
- package/datahike.datom.js.map +1 -0
- package/datahike.db.interface.js +819 -0
- package/datahike.db.interface.js.map +1 -0
- package/datahike.db.js +3095 -0
- package/datahike.db.js.map +1 -0
- package/datahike.db.search.js +1004 -0
- package/datahike.db.search.js.map +1 -0
- package/datahike.db.transaction.js +1904 -0
- package/datahike.db.transaction.js.map +1 -0
- package/datahike.db.utils.js +642 -0
- package/datahike.db.utils.js.map +1 -0
- package/datahike.gc.js +1618 -0
- package/datahike.gc.js.map +1 -0
- package/datahike.impl.entity.js +604 -0
- package/datahike.impl.entity.js.map +1 -0
- package/datahike.index.interface.js +484 -0
- package/datahike.index.interface.js.map +1 -0
- package/datahike.index.js +50 -0
- package/datahike.index.js.map +1 -0
- package/datahike.index.persistent_set.js +1250 -0
- package/datahike.index.persistent_set.js.map +1 -0
- package/datahike.js.api.js +2211 -0
- package/datahike.js.api.js.map +1 -0
- package/datahike.lru.js +404 -0
- package/datahike.lru.js.map +1 -0
- package/datahike.pull_api.js +533 -0
- package/datahike.pull_api.js.map +1 -0
- package/datahike.query.js +11891 -0
- package/datahike.query.js.map +1 -0
- package/datahike.query_stats.js +152 -0
- package/datahike.query_stats.js.map +1 -0
- package/datahike.readers.js +166 -0
- package/datahike.readers.js.map +1 -0
- package/datahike.schema.js +251 -0
- package/datahike.schema.js.map +1 -0
- package/datahike.schema_cache.js +66 -0
- package/datahike.schema_cache.js.map +1 -0
- package/datahike.spec.js +70 -0
- package/datahike.spec.js.map +1 -0
- package/datahike.store.js +514 -0
- package/datahike.store.js.map +1 -0
- package/datahike.tools.js +436 -0
- package/datahike.tools.js.map +1 -0
- package/datahike.writer.js +3463 -0
- package/datahike.writer.js.map +1 -0
- package/datahike.writing.js +3168 -0
- package/datahike.writing.js.map +1 -0
- package/datalog.parser.impl.js +1421 -0
- package/datalog.parser.impl.js.map +1 -0
- package/datalog.parser.impl.proto.js +213 -0
- package/datalog.parser.impl.proto.js.map +1 -0
- package/datalog.parser.impl.util.js +117 -0
- package/datalog.parser.impl.util.js.map +1 -0
- package/datalog.parser.js +47 -0
- package/datalog.parser.js.map +1 -0
- package/datalog.parser.pull.js +2603 -0
- package/datalog.parser.pull.js.map +1 -0
- package/datalog.parser.type.js +7502 -0
- package/datalog.parser.type.js.map +1 -0
- package/datalog.parser.util.js +60 -0
- package/datalog.parser.util.js.map +1 -0
- package/environ.core.js +263 -0
- package/environ.core.js.map +1 -0
- package/fress.api.js +607 -0
- package/fress.api.js.map +1 -0
- package/fress.impl.adler32.js +435 -0
- package/fress.impl.adler32.js.map +1 -0
- package/fress.impl.bigint.js +185 -0
- package/fress.impl.bigint.js.map +1 -0
- package/fress.impl.buffer.js +1087 -0
- package/fress.impl.buffer.js.map +1 -0
- package/fress.impl.codes.js +105 -0
- package/fress.impl.codes.js.map +1 -0
- package/fress.impl.hopmap.js +603 -0
- package/fress.impl.hopmap.js.map +1 -0
- package/fress.impl.ranges.js +49 -0
- package/fress.impl.ranges.js.map +1 -0
- package/fress.impl.raw_input.js +837 -0
- package/fress.impl.raw_input.js.map +1 -0
- package/fress.impl.raw_output.js +653 -0
- package/fress.impl.raw_output.js.map +1 -0
- package/fress.impl.table.js +133 -0
- package/fress.impl.table.js.map +1 -0
- package/fress.reader.js +2312 -0
- package/fress.reader.js.map +1 -0
- package/fress.util.js +458 -0
- package/fress.util.js.map +1 -0
- package/fress.writer.js +2141 -0
- package/fress.writer.js.map +1 -0
- package/geheimnis.aes.js +132 -0
- package/geheimnis.aes.js.map +1 -0
- package/hasch.base64.js +42 -0
- package/hasch.base64.js.map +1 -0
- package/hasch.benc.js +201 -0
- package/hasch.benc.js.map +1 -0
- package/hasch.core.js +188 -0
- package/hasch.core.js.map +1 -0
- package/hasch.platform.js +221 -0
- package/hasch.platform.js.map +1 -0
- package/incognito.base.js +276 -0
- package/incognito.base.js.map +1 -0
- package/incognito.edn.js +54 -0
- package/incognito.edn.js.map +1 -0
- package/incognito.fressian.js +330 -0
- package/incognito.fressian.js.map +1 -0
- package/index.d.ts +660 -0
- package/is.simm.partial_cps.async.js +142 -0
- package/is.simm.partial_cps.async.js.map +1 -0
- package/is.simm.partial_cps.runtime.js +65 -0
- package/is.simm.partial_cps.runtime.js.map +1 -0
- package/is.simm.partial_cps.sequence.js +1255 -0
- package/is.simm.partial_cps.sequence.js.map +1 -0
- package/konserve.cache.js +2519 -0
- package/konserve.cache.js.map +1 -0
- package/konserve.compressor.js +502 -0
- package/konserve.compressor.js.map +1 -0
- package/konserve.core.js +8052 -0
- package/konserve.core.js.map +1 -0
- package/konserve.encryptor.js +553 -0
- package/konserve.encryptor.js.map +1 -0
- package/konserve.gc.js +541 -0
- package/konserve.gc.js.map +1 -0
- package/konserve.impl.defaults.js +8290 -0
- package/konserve.impl.defaults.js.map +1 -0
- package/konserve.impl.storage_layout.js +849 -0
- package/konserve.impl.storage_layout.js.map +1 -0
- package/konserve.memory.js +2102 -0
- package/konserve.memory.js.map +1 -0
- package/konserve.node_filestore.js +2951 -0
- package/konserve.node_filestore.js.map +1 -0
- package/konserve.protocols.js +590 -0
- package/konserve.protocols.js.map +1 -0
- package/konserve.serializers.js +562 -0
- package/konserve.serializers.js.map +1 -0
- package/konserve.store.js +2245 -0
- package/konserve.store.js.map +1 -0
- package/konserve.tiered.js +9574 -0
- package/konserve.tiered.js.map +1 -0
- package/konserve.utils.js +180 -0
- package/konserve.utils.js.map +1 -0
- package/me.tonsky.persistent_sorted_set.arrays.js +66 -0
- package/me.tonsky.persistent_sorted_set.arrays.js.map +1 -0
- package/me.tonsky.persistent_sorted_set.branch.js +2779 -0
- package/me.tonsky.persistent_sorted_set.branch.js.map +1 -0
- package/me.tonsky.persistent_sorted_set.btset.js +14196 -0
- package/me.tonsky.persistent_sorted_set.btset.js.map +1 -0
- package/me.tonsky.persistent_sorted_set.impl.node.js +324 -0
- package/me.tonsky.persistent_sorted_set.impl.node.js.map +1 -0
- package/me.tonsky.persistent_sorted_set.impl.storage.js +123 -0
- package/me.tonsky.persistent_sorted_set.impl.storage.js.map +1 -0
- package/me.tonsky.persistent_sorted_set.js +890 -0
- package/me.tonsky.persistent_sorted_set.js.map +1 -0
- package/me.tonsky.persistent_sorted_set.leaf.js +561 -0
- package/me.tonsky.persistent_sorted_set.leaf.js.map +1 -0
- package/me.tonsky.persistent_sorted_set.util.js +402 -0
- package/me.tonsky.persistent_sorted_set.util.js.map +1 -0
- package/medley.core.js +1857 -0
- package/medley.core.js.map +1 -0
- package/package.json +38 -0
- package/spec_tools.core.js +1925 -0
- package/spec_tools.core.js.map +1 -0
- package/spec_tools.data_spec.js +1291 -0
- package/spec_tools.data_spec.js.map +1 -0
- package/spec_tools.form.js +185 -0
- package/spec_tools.form.js.map +1 -0
- package/spec_tools.impl.js +362 -0
- package/spec_tools.impl.js.map +1 -0
- package/spec_tools.parse.js +427 -0
- package/spec_tools.parse.js.map +1 -0
- package/spec_tools.transform.js +288 -0
- package/spec_tools.transform.js.map +1 -0
- package/superv.async.js +8617 -0
- package/superv.async.js.map +1 -0
- package/tailrecursion.priority_map.js +994 -0
- package/tailrecursion.priority_map.js.map +1 -0
- package/taoensso.encore.js +12385 -0
- package/taoensso.encore.js.map +1 -0
- package/taoensso.timbre.appenders.core.js +239 -0
- package/taoensso.timbre.appenders.core.js.map +1 -0
- package/taoensso.timbre.js +1264 -0
- package/taoensso.timbre.js.map +1 -0
- package/taoensso.truss.impl.js +442 -0
- package/taoensso.truss.impl.js.map +1 -0
- package/taoensso.truss.js +743 -0
- package/taoensso.truss.js.map +1 -0
- package/test-config-keys.js +33 -0
- package/test-final.js +36 -0
- package/test-key-duplication.js +67 -0
- package/test.js +557 -0
package/datahike.db.js
ADDED
|
@@ -0,0 +1,3095 @@
|
|
|
1
|
+
var $CLJS = require("./cljs_env");
|
|
2
|
+
var $jscomp = $CLJS.$jscomp;
|
|
3
|
+
var COMPILED = false;
|
|
4
|
+
require("./cljs.core.js");
|
|
5
|
+
require("./clojure.data.js");
|
|
6
|
+
require("./clojure.walk.js");
|
|
7
|
+
require("./datahike.config.js");
|
|
8
|
+
require("./datahike.constants.js");
|
|
9
|
+
require("./datahike.datom.js");
|
|
10
|
+
require("./datahike.db.interface.js");
|
|
11
|
+
require("./datahike.db.search.js");
|
|
12
|
+
require("./datahike.db.utils.js");
|
|
13
|
+
require("./datahike.index.js");
|
|
14
|
+
require("./datahike.schema.js");
|
|
15
|
+
require("./datahike.store.js");
|
|
16
|
+
require("./datahike.tools.js");
|
|
17
|
+
require("./me.tonsky.persistent_sorted_set.arrays.js");
|
|
18
|
+
require("./medley.core.js");
|
|
19
|
+
require("./taoensso.timbre.js");
|
|
20
|
+
var environ=$CLJS.environ || ($CLJS.environ = {});
|
|
21
|
+
var fress=$CLJS.fress || ($CLJS.fress = {});
|
|
22
|
+
var datahike=$CLJS.datahike || ($CLJS.datahike = {});
|
|
23
|
+
var clojure=$CLJS.clojure || ($CLJS.clojure = {});
|
|
24
|
+
var hasch=$CLJS.hasch || ($CLJS.hasch = {});
|
|
25
|
+
var tailrecursion=$CLJS.tailrecursion || ($CLJS.tailrecursion = {});
|
|
26
|
+
var superv=$CLJS.superv || ($CLJS.superv = {});
|
|
27
|
+
var geheimnis=$CLJS.geheimnis || ($CLJS.geheimnis = {});
|
|
28
|
+
var is=$CLJS.is || ($CLJS.is = {});
|
|
29
|
+
var cljs=$CLJS.cljs || ($CLJS.cljs = {});
|
|
30
|
+
var cljs_node_io=$CLJS.cljs_node_io || ($CLJS.cljs_node_io = {});
|
|
31
|
+
var goog=$CLJS.goog || ($CLJS.goog = {});
|
|
32
|
+
var konserve=$CLJS.konserve || ($CLJS.konserve = {});
|
|
33
|
+
var datalog=$CLJS.datalog || ($CLJS.datalog = {});
|
|
34
|
+
var spec_tools=$CLJS.spec_tools || ($CLJS.spec_tools = {});
|
|
35
|
+
var taoensso=$CLJS.taoensso || ($CLJS.taoensso = {});
|
|
36
|
+
var incognito=$CLJS.incognito || ($CLJS.incognito = {});
|
|
37
|
+
var medley=$CLJS.medley || ($CLJS.medley = {});
|
|
38
|
+
var me=$CLJS.me || ($CLJS.me = {});
|
|
39
|
+
|
|
40
|
+
$CLJS.SHADOW_ENV.setLoaded("datahike.db.js");
|
|
41
|
+
|
|
42
|
+
goog.provide('datahike.db');
|
|
43
|
+
|
|
44
|
+
datahike.db.Exception = Error;
|
|
45
|
+
|
|
46
|
+
datahike.db.IllegalArgumentException = Error;
|
|
47
|
+
|
|
48
|
+
datahike.db.UnsupportedOperationException = Error;
|
|
49
|
+
datahike.db.seqable_QMARK_ = (function datahike$db$seqable_QMARK_(x){
|
|
50
|
+
return (((!(typeof x === 'string'))) && (((cljs.core.seqable_QMARK_(x)) || (me.tonsky.persistent_sorted_set.arrays.array_QMARK_(x)))));
|
|
51
|
+
});
|
|
52
|
+
/**
|
|
53
|
+
* Take the &env from a macro, and tell whether we are expanding into cljs.
|
|
54
|
+
*/
|
|
55
|
+
datahike.db.cljs_env_QMARK_ = (function datahike$db$cljs_env_QMARK_(env){
|
|
56
|
+
return cljs.core.boolean$(new cljs.core.Keyword(null,"ns","ns",441598760).cljs$core$IFn$_invoke$arity$1(env));
|
|
57
|
+
});
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
* @constructor
|
|
61
|
+
* @implements {cljs.core.IRecord}
|
|
62
|
+
* @implements {cljs.core.IKVReduce}
|
|
63
|
+
* @implements {cljs.core.IEquiv}
|
|
64
|
+
* @implements {cljs.core.IHash}
|
|
65
|
+
* @implements {cljs.core.ICollection}
|
|
66
|
+
* @implements {cljs.core.ICounted}
|
|
67
|
+
* @implements {cljs.core.ISeqable}
|
|
68
|
+
* @implements {cljs.core.IMeta}
|
|
69
|
+
* @implements {cljs.core.ICloneable}
|
|
70
|
+
* @implements {cljs.core.IPrintWithWriter}
|
|
71
|
+
* @implements {cljs.core.IIterable}
|
|
72
|
+
* @implements {cljs.core.IWithMeta}
|
|
73
|
+
* @implements {cljs.core.IAssociative}
|
|
74
|
+
* @implements {cljs.core.IMap}
|
|
75
|
+
* @implements {cljs.core.ILookup}
|
|
76
|
+
*/
|
|
77
|
+
datahike.db.TxReport = (function (db_before,db_after,tx_data,tempids,tx_meta,__meta,__extmap,__hash){
|
|
78
|
+
this.db_before = db_before;
|
|
79
|
+
this.db_after = db_after;
|
|
80
|
+
this.tx_data = tx_data;
|
|
81
|
+
this.tempids = tempids;
|
|
82
|
+
this.tx_meta = tx_meta;
|
|
83
|
+
this.__meta = __meta;
|
|
84
|
+
this.__extmap = __extmap;
|
|
85
|
+
this.__hash = __hash;
|
|
86
|
+
this.cljs$lang$protocol_mask$partition0$ = 2230716170;
|
|
87
|
+
this.cljs$lang$protocol_mask$partition1$ = 139264;
|
|
88
|
+
});
|
|
89
|
+
(datahike.db.TxReport.prototype.cljs$core$ILookup$_lookup$arity$2 = (function (this__5300__auto__,k__5301__auto__){
|
|
90
|
+
var self__ = this;
|
|
91
|
+
var this__5300__auto____$1 = this;
|
|
92
|
+
return this__5300__auto____$1.cljs$core$ILookup$_lookup$arity$3(null, k__5301__auto__,null);
|
|
93
|
+
}));
|
|
94
|
+
|
|
95
|
+
(datahike.db.TxReport.prototype.cljs$core$ILookup$_lookup$arity$3 = (function (this__5302__auto__,k58195,else__5303__auto__){
|
|
96
|
+
var self__ = this;
|
|
97
|
+
var this__5302__auto____$1 = this;
|
|
98
|
+
var G__58219 = k58195;
|
|
99
|
+
var G__58219__$1 = (((G__58219 instanceof cljs.core.Keyword))?G__58219.fqn:null);
|
|
100
|
+
switch (G__58219__$1) {
|
|
101
|
+
case "db-before":
|
|
102
|
+
return self__.db_before;
|
|
103
|
+
|
|
104
|
+
break;
|
|
105
|
+
case "db-after":
|
|
106
|
+
return self__.db_after;
|
|
107
|
+
|
|
108
|
+
break;
|
|
109
|
+
case "tx-data":
|
|
110
|
+
return self__.tx_data;
|
|
111
|
+
|
|
112
|
+
break;
|
|
113
|
+
case "tempids":
|
|
114
|
+
return self__.tempids;
|
|
115
|
+
|
|
116
|
+
break;
|
|
117
|
+
case "tx-meta":
|
|
118
|
+
return self__.tx_meta;
|
|
119
|
+
|
|
120
|
+
break;
|
|
121
|
+
default:
|
|
122
|
+
return cljs.core.get.cljs$core$IFn$_invoke$arity$3(self__.__extmap,k58195,else__5303__auto__);
|
|
123
|
+
|
|
124
|
+
}
|
|
125
|
+
}));
|
|
126
|
+
|
|
127
|
+
(datahike.db.TxReport.prototype.cljs$core$IKVReduce$_kv_reduce$arity$3 = (function (this__5320__auto__,f__5321__auto__,init__5322__auto__){
|
|
128
|
+
var self__ = this;
|
|
129
|
+
var this__5320__auto____$1 = this;
|
|
130
|
+
return cljs.core.reduce.cljs$core$IFn$_invoke$arity$3((function (ret__5323__auto__,p__58224){
|
|
131
|
+
var vec__58226 = p__58224;
|
|
132
|
+
var k__5324__auto__ = cljs.core.nth.cljs$core$IFn$_invoke$arity$3(vec__58226,(0),null);
|
|
133
|
+
var v__5325__auto__ = cljs.core.nth.cljs$core$IFn$_invoke$arity$3(vec__58226,(1),null);
|
|
134
|
+
return (f__5321__auto__.cljs$core$IFn$_invoke$arity$3 ? f__5321__auto__.cljs$core$IFn$_invoke$arity$3(ret__5323__auto__,k__5324__auto__,v__5325__auto__) : f__5321__auto__.call(null, ret__5323__auto__,k__5324__auto__,v__5325__auto__));
|
|
135
|
+
}),init__5322__auto__,this__5320__auto____$1);
|
|
136
|
+
}));
|
|
137
|
+
|
|
138
|
+
(datahike.db.TxReport.prototype.cljs$core$IPrintWithWriter$_pr_writer$arity$3 = (function (this__5315__auto__,writer__5316__auto__,opts__5317__auto__){
|
|
139
|
+
var self__ = this;
|
|
140
|
+
var this__5315__auto____$1 = this;
|
|
141
|
+
var pr_pair__5318__auto__ = (function (keyval__5319__auto__){
|
|
142
|
+
return cljs.core.pr_sequential_writer(writer__5316__auto__,cljs.core.pr_writer,""," ","",opts__5317__auto__,keyval__5319__auto__);
|
|
143
|
+
});
|
|
144
|
+
return cljs.core.pr_sequential_writer(writer__5316__auto__,pr_pair__5318__auto__,"#datahike.db.TxReport{",", ","}",opts__5317__auto__,cljs.core.concat.cljs$core$IFn$_invoke$arity$2(new cljs.core.PersistentVector(null, 5, 5, cljs.core.PersistentVector.EMPTY_NODE, [(new cljs.core.PersistentVector(null,2,(5),cljs.core.PersistentVector.EMPTY_NODE,[new cljs.core.Keyword(null,"db-before","db-before",-553691536),self__.db_before],null)),(new cljs.core.PersistentVector(null,2,(5),cljs.core.PersistentVector.EMPTY_NODE,[new cljs.core.Keyword(null,"db-after","db-after",-571884666),self__.db_after],null)),(new cljs.core.PersistentVector(null,2,(5),cljs.core.PersistentVector.EMPTY_NODE,[new cljs.core.Keyword(null,"tx-data","tx-data",934159761),self__.tx_data],null)),(new cljs.core.PersistentVector(null,2,(5),cljs.core.PersistentVector.EMPTY_NODE,[new cljs.core.Keyword(null,"tempids","tempids",1767509089),self__.tempids],null)),(new cljs.core.PersistentVector(null,2,(5),cljs.core.PersistentVector.EMPTY_NODE,[new cljs.core.Keyword(null,"tx-meta","tx-meta",1159283194),self__.tx_meta],null))], null),self__.__extmap));
|
|
145
|
+
}));
|
|
146
|
+
|
|
147
|
+
(datahike.db.TxReport.prototype.cljs$core$IIterable$_iterator$arity$1 = (function (G__58194){
|
|
148
|
+
var self__ = this;
|
|
149
|
+
var G__58194__$1 = this;
|
|
150
|
+
return (new cljs.core.RecordIter((0),G__58194__$1,5,new cljs.core.PersistentVector(null, 5, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"db-before","db-before",-553691536),new cljs.core.Keyword(null,"db-after","db-after",-571884666),new cljs.core.Keyword(null,"tx-data","tx-data",934159761),new cljs.core.Keyword(null,"tempids","tempids",1767509089),new cljs.core.Keyword(null,"tx-meta","tx-meta",1159283194)], null),(cljs.core.truth_(self__.__extmap)?cljs.core._iterator(self__.__extmap):cljs.core.nil_iter())));
|
|
151
|
+
}));
|
|
152
|
+
|
|
153
|
+
(datahike.db.TxReport.prototype.cljs$core$IMeta$_meta$arity$1 = (function (this__5298__auto__){
|
|
154
|
+
var self__ = this;
|
|
155
|
+
var this__5298__auto____$1 = this;
|
|
156
|
+
return self__.__meta;
|
|
157
|
+
}));
|
|
158
|
+
|
|
159
|
+
(datahike.db.TxReport.prototype.cljs$core$ICloneable$_clone$arity$1 = (function (this__5295__auto__){
|
|
160
|
+
var self__ = this;
|
|
161
|
+
var this__5295__auto____$1 = this;
|
|
162
|
+
return (new datahike.db.TxReport(self__.db_before,self__.db_after,self__.tx_data,self__.tempids,self__.tx_meta,self__.__meta,self__.__extmap,self__.__hash));
|
|
163
|
+
}));
|
|
164
|
+
|
|
165
|
+
(datahike.db.TxReport.prototype.cljs$core$ICounted$_count$arity$1 = (function (this__5304__auto__){
|
|
166
|
+
var self__ = this;
|
|
167
|
+
var this__5304__auto____$1 = this;
|
|
168
|
+
return (5 + cljs.core.count(self__.__extmap));
|
|
169
|
+
}));
|
|
170
|
+
|
|
171
|
+
(datahike.db.TxReport.prototype.cljs$core$IHash$_hash$arity$1 = (function (this__5296__auto__){
|
|
172
|
+
var self__ = this;
|
|
173
|
+
var this__5296__auto____$1 = this;
|
|
174
|
+
var h__5111__auto__ = self__.__hash;
|
|
175
|
+
if((!((h__5111__auto__ == null)))){
|
|
176
|
+
return h__5111__auto__;
|
|
177
|
+
} else {
|
|
178
|
+
var h__5111__auto____$1 = (function (coll__5297__auto__){
|
|
179
|
+
return (-1043887615 ^ cljs.core.hash_unordered_coll(coll__5297__auto__));
|
|
180
|
+
})(this__5296__auto____$1);
|
|
181
|
+
(self__.__hash = h__5111__auto____$1);
|
|
182
|
+
|
|
183
|
+
return h__5111__auto____$1;
|
|
184
|
+
}
|
|
185
|
+
}));
|
|
186
|
+
|
|
187
|
+
(datahike.db.TxReport.prototype.cljs$core$IEquiv$_equiv$arity$2 = (function (this58196,other58197){
|
|
188
|
+
var self__ = this;
|
|
189
|
+
var this58196__$1 = this;
|
|
190
|
+
return (((!((other58197 == null)))) && ((((this58196__$1.constructor === other58197.constructor)) && (((cljs.core._EQ_.cljs$core$IFn$_invoke$arity$2(this58196__$1.db_before,other58197.db_before)) && (((cljs.core._EQ_.cljs$core$IFn$_invoke$arity$2(this58196__$1.db_after,other58197.db_after)) && (((cljs.core._EQ_.cljs$core$IFn$_invoke$arity$2(this58196__$1.tx_data,other58197.tx_data)) && (((cljs.core._EQ_.cljs$core$IFn$_invoke$arity$2(this58196__$1.tempids,other58197.tempids)) && (((cljs.core._EQ_.cljs$core$IFn$_invoke$arity$2(this58196__$1.tx_meta,other58197.tx_meta)) && (cljs.core._EQ_.cljs$core$IFn$_invoke$arity$2(this58196__$1.__extmap,other58197.__extmap)))))))))))))));
|
|
191
|
+
}));
|
|
192
|
+
|
|
193
|
+
(datahike.db.TxReport.prototype.cljs$core$IMap$_dissoc$arity$2 = (function (this__5310__auto__,k__5311__auto__){
|
|
194
|
+
var self__ = this;
|
|
195
|
+
var this__5310__auto____$1 = this;
|
|
196
|
+
if(cljs.core.contains_QMARK_(new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 5, [new cljs.core.Keyword(null,"tempids","tempids",1767509089),null,new cljs.core.Keyword(null,"db-after","db-after",-571884666),null,new cljs.core.Keyword(null,"db-before","db-before",-553691536),null,new cljs.core.Keyword(null,"tx-data","tx-data",934159761),null,new cljs.core.Keyword(null,"tx-meta","tx-meta",1159283194),null], null), null),k__5311__auto__)){
|
|
197
|
+
return cljs.core.dissoc.cljs$core$IFn$_invoke$arity$2(cljs.core._with_meta(cljs.core.into.cljs$core$IFn$_invoke$arity$2(cljs.core.PersistentArrayMap.EMPTY,this__5310__auto____$1),self__.__meta),k__5311__auto__);
|
|
198
|
+
} else {
|
|
199
|
+
return (new datahike.db.TxReport(self__.db_before,self__.db_after,self__.tx_data,self__.tempids,self__.tx_meta,self__.__meta,cljs.core.not_empty(cljs.core.dissoc.cljs$core$IFn$_invoke$arity$2(self__.__extmap,k__5311__auto__)),null));
|
|
200
|
+
}
|
|
201
|
+
}));
|
|
202
|
+
|
|
203
|
+
(datahike.db.TxReport.prototype.cljs$core$IAssociative$_contains_key_QMARK_$arity$2 = (function (this__5307__auto__,k58195){
|
|
204
|
+
var self__ = this;
|
|
205
|
+
var this__5307__auto____$1 = this;
|
|
206
|
+
var G__58343 = k58195;
|
|
207
|
+
var G__58343__$1 = (((G__58343 instanceof cljs.core.Keyword))?G__58343.fqn:null);
|
|
208
|
+
switch (G__58343__$1) {
|
|
209
|
+
case "db-before":
|
|
210
|
+
case "db-after":
|
|
211
|
+
case "tx-data":
|
|
212
|
+
case "tempids":
|
|
213
|
+
case "tx-meta":
|
|
214
|
+
return true;
|
|
215
|
+
|
|
216
|
+
break;
|
|
217
|
+
default:
|
|
218
|
+
return cljs.core.contains_QMARK_(self__.__extmap,k58195);
|
|
219
|
+
|
|
220
|
+
}
|
|
221
|
+
}));
|
|
222
|
+
|
|
223
|
+
(datahike.db.TxReport.prototype.cljs$core$IAssociative$_assoc$arity$3 = (function (this__5308__auto__,k__5309__auto__,G__58194){
|
|
224
|
+
var self__ = this;
|
|
225
|
+
var this__5308__auto____$1 = this;
|
|
226
|
+
var pred__58364 = cljs.core.keyword_identical_QMARK_;
|
|
227
|
+
var expr__58365 = k__5309__auto__;
|
|
228
|
+
if(cljs.core.truth_((pred__58364.cljs$core$IFn$_invoke$arity$2 ? pred__58364.cljs$core$IFn$_invoke$arity$2(new cljs.core.Keyword(null,"db-before","db-before",-553691536),expr__58365) : pred__58364.call(null, new cljs.core.Keyword(null,"db-before","db-before",-553691536),expr__58365)))){
|
|
229
|
+
return (new datahike.db.TxReport(G__58194,self__.db_after,self__.tx_data,self__.tempids,self__.tx_meta,self__.__meta,self__.__extmap,null));
|
|
230
|
+
} else {
|
|
231
|
+
if(cljs.core.truth_((pred__58364.cljs$core$IFn$_invoke$arity$2 ? pred__58364.cljs$core$IFn$_invoke$arity$2(new cljs.core.Keyword(null,"db-after","db-after",-571884666),expr__58365) : pred__58364.call(null, new cljs.core.Keyword(null,"db-after","db-after",-571884666),expr__58365)))){
|
|
232
|
+
return (new datahike.db.TxReport(self__.db_before,G__58194,self__.tx_data,self__.tempids,self__.tx_meta,self__.__meta,self__.__extmap,null));
|
|
233
|
+
} else {
|
|
234
|
+
if(cljs.core.truth_((pred__58364.cljs$core$IFn$_invoke$arity$2 ? pred__58364.cljs$core$IFn$_invoke$arity$2(new cljs.core.Keyword(null,"tx-data","tx-data",934159761),expr__58365) : pred__58364.call(null, new cljs.core.Keyword(null,"tx-data","tx-data",934159761),expr__58365)))){
|
|
235
|
+
return (new datahike.db.TxReport(self__.db_before,self__.db_after,G__58194,self__.tempids,self__.tx_meta,self__.__meta,self__.__extmap,null));
|
|
236
|
+
} else {
|
|
237
|
+
if(cljs.core.truth_((pred__58364.cljs$core$IFn$_invoke$arity$2 ? pred__58364.cljs$core$IFn$_invoke$arity$2(new cljs.core.Keyword(null,"tempids","tempids",1767509089),expr__58365) : pred__58364.call(null, new cljs.core.Keyword(null,"tempids","tempids",1767509089),expr__58365)))){
|
|
238
|
+
return (new datahike.db.TxReport(self__.db_before,self__.db_after,self__.tx_data,G__58194,self__.tx_meta,self__.__meta,self__.__extmap,null));
|
|
239
|
+
} else {
|
|
240
|
+
if(cljs.core.truth_((pred__58364.cljs$core$IFn$_invoke$arity$2 ? pred__58364.cljs$core$IFn$_invoke$arity$2(new cljs.core.Keyword(null,"tx-meta","tx-meta",1159283194),expr__58365) : pred__58364.call(null, new cljs.core.Keyword(null,"tx-meta","tx-meta",1159283194),expr__58365)))){
|
|
241
|
+
return (new datahike.db.TxReport(self__.db_before,self__.db_after,self__.tx_data,self__.tempids,G__58194,self__.__meta,self__.__extmap,null));
|
|
242
|
+
} else {
|
|
243
|
+
return (new datahike.db.TxReport(self__.db_before,self__.db_after,self__.tx_data,self__.tempids,self__.tx_meta,self__.__meta,cljs.core.assoc.cljs$core$IFn$_invoke$arity$3(self__.__extmap,k__5309__auto__,G__58194),null));
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
}
|
|
247
|
+
}
|
|
248
|
+
}
|
|
249
|
+
}));
|
|
250
|
+
|
|
251
|
+
(datahike.db.TxReport.prototype.cljs$core$ISeqable$_seq$arity$1 = (function (this__5313__auto__){
|
|
252
|
+
var self__ = this;
|
|
253
|
+
var this__5313__auto____$1 = this;
|
|
254
|
+
return cljs.core.seq(cljs.core.concat.cljs$core$IFn$_invoke$arity$2(new cljs.core.PersistentVector(null, 5, 5, cljs.core.PersistentVector.EMPTY_NODE, [(new cljs.core.MapEntry(new cljs.core.Keyword(null,"db-before","db-before",-553691536),self__.db_before,null)),(new cljs.core.MapEntry(new cljs.core.Keyword(null,"db-after","db-after",-571884666),self__.db_after,null)),(new cljs.core.MapEntry(new cljs.core.Keyword(null,"tx-data","tx-data",934159761),self__.tx_data,null)),(new cljs.core.MapEntry(new cljs.core.Keyword(null,"tempids","tempids",1767509089),self__.tempids,null)),(new cljs.core.MapEntry(new cljs.core.Keyword(null,"tx-meta","tx-meta",1159283194),self__.tx_meta,null))], null),self__.__extmap));
|
|
255
|
+
}));
|
|
256
|
+
|
|
257
|
+
(datahike.db.TxReport.prototype.cljs$core$IWithMeta$_with_meta$arity$2 = (function (this__5299__auto__,G__58194){
|
|
258
|
+
var self__ = this;
|
|
259
|
+
var this__5299__auto____$1 = this;
|
|
260
|
+
return (new datahike.db.TxReport(self__.db_before,self__.db_after,self__.tx_data,self__.tempids,self__.tx_meta,G__58194,self__.__extmap,self__.__hash));
|
|
261
|
+
}));
|
|
262
|
+
|
|
263
|
+
(datahike.db.TxReport.prototype.cljs$core$ICollection$_conj$arity$2 = (function (this__5305__auto__,entry__5306__auto__){
|
|
264
|
+
var self__ = this;
|
|
265
|
+
var this__5305__auto____$1 = this;
|
|
266
|
+
if(cljs.core.vector_QMARK_(entry__5306__auto__)){
|
|
267
|
+
return this__5305__auto____$1.cljs$core$IAssociative$_assoc$arity$3(null, cljs.core._nth(entry__5306__auto__,(0)),cljs.core._nth(entry__5306__auto__,(1)));
|
|
268
|
+
} else {
|
|
269
|
+
return cljs.core.reduce.cljs$core$IFn$_invoke$arity$3(cljs.core._conj,this__5305__auto____$1,entry__5306__auto__);
|
|
270
|
+
}
|
|
271
|
+
}));
|
|
272
|
+
|
|
273
|
+
(datahike.db.TxReport.getBasis = (function (){
|
|
274
|
+
return new cljs.core.PersistentVector(null, 5, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Symbol(null,"db-before","db-before",1086839991,null),new cljs.core.Symbol(null,"db-after","db-after",1068646861,null),new cljs.core.Symbol(null,"tx-data","tx-data",-1720276008,null),new cljs.core.Symbol(null,"tempids","tempids",-886926680,null),new cljs.core.Symbol(null,"tx-meta","tx-meta",-1495152575,null)], null);
|
|
275
|
+
}));
|
|
276
|
+
|
|
277
|
+
(datahike.db.TxReport.cljs$lang$type = true);
|
|
278
|
+
|
|
279
|
+
(datahike.db.TxReport.cljs$lang$ctorPrSeq = (function (this__5346__auto__){
|
|
280
|
+
return (new cljs.core.List(null,"datahike.db/TxReport",null,(1),null));
|
|
281
|
+
}));
|
|
282
|
+
|
|
283
|
+
(datahike.db.TxReport.cljs$lang$ctorPrWriter = (function (this__5346__auto__,writer__5347__auto__){
|
|
284
|
+
return cljs.core._write(writer__5347__auto__,"datahike.db/TxReport");
|
|
285
|
+
}));
|
|
286
|
+
|
|
287
|
+
/**
|
|
288
|
+
* Positional factory function for datahike.db/TxReport.
|
|
289
|
+
*/
|
|
290
|
+
datahike.db.__GT_TxReport = (function datahike$db$__GT_TxReport(db_before,db_after,tx_data,tempids,tx_meta){
|
|
291
|
+
return (new datahike.db.TxReport(db_before,db_after,tx_data,tempids,tx_meta,null,null,null));
|
|
292
|
+
});
|
|
293
|
+
|
|
294
|
+
/**
|
|
295
|
+
* Factory function for datahike.db/TxReport, taking a map of keywords to field values.
|
|
296
|
+
*/
|
|
297
|
+
datahike.db.map__GT_TxReport = (function datahike$db$map__GT_TxReport(G__58198){
|
|
298
|
+
var extmap__5342__auto__ = (function (){var G__58372 = cljs.core.dissoc.cljs$core$IFn$_invoke$arity$variadic(G__58198,new cljs.core.Keyword(null,"db-before","db-before",-553691536),cljs.core.prim_seq.cljs$core$IFn$_invoke$arity$2([new cljs.core.Keyword(null,"db-after","db-after",-571884666),new cljs.core.Keyword(null,"tx-data","tx-data",934159761),new cljs.core.Keyword(null,"tempids","tempids",1767509089),new cljs.core.Keyword(null,"tx-meta","tx-meta",1159283194)], 0));
|
|
299
|
+
if(cljs.core.record_QMARK_(G__58198)){
|
|
300
|
+
return cljs.core.into.cljs$core$IFn$_invoke$arity$2(cljs.core.PersistentArrayMap.EMPTY,G__58372);
|
|
301
|
+
} else {
|
|
302
|
+
return G__58372;
|
|
303
|
+
}
|
|
304
|
+
})();
|
|
305
|
+
return (new datahike.db.TxReport(new cljs.core.Keyword(null,"db-before","db-before",-553691536).cljs$core$IFn$_invoke$arity$1(G__58198),new cljs.core.Keyword(null,"db-after","db-after",-571884666).cljs$core$IFn$_invoke$arity$1(G__58198),new cljs.core.Keyword(null,"tx-data","tx-data",934159761).cljs$core$IFn$_invoke$arity$1(G__58198),new cljs.core.Keyword(null,"tempids","tempids",1767509089).cljs$core$IFn$_invoke$arity$1(G__58198),new cljs.core.Keyword(null,"tx-meta","tx-meta",1159283194).cljs$core$IFn$_invoke$arity$1(G__58198),null,cljs.core.not_empty(extmap__5342__auto__),null));
|
|
306
|
+
});
|
|
307
|
+
|
|
308
|
+
datahike.db.date_QMARK_ = (function datahike$db$date_QMARK_(d){
|
|
309
|
+
return (d instanceof Date);
|
|
310
|
+
});
|
|
311
|
+
datahike.db.date_LT__EQ_ = (function datahike$db$date_LT__EQ_(a,b){
|
|
312
|
+
return (!((b.getTime() < a.getTime())));
|
|
313
|
+
});
|
|
314
|
+
/**
|
|
315
|
+
* Create an as-of predicate, *including* the time-point
|
|
316
|
+
*/
|
|
317
|
+
datahike.db.as_of_pred = (function datahike$db$as_of_pred(time_point){
|
|
318
|
+
if(datahike.db.date_QMARK_(time_point)){
|
|
319
|
+
return (function (d){
|
|
320
|
+
return datahike.db.date_LT__EQ_(d.v,time_point);
|
|
321
|
+
});
|
|
322
|
+
} else {
|
|
323
|
+
return (function (d){
|
|
324
|
+
return (datahike.datom.datom_tx(d) <= time_point);
|
|
325
|
+
});
|
|
326
|
+
}
|
|
327
|
+
});
|
|
328
|
+
/**
|
|
329
|
+
* Create a since predicate, *excluding* the time-point. The opposite of `as-of-pred`.
|
|
330
|
+
*/
|
|
331
|
+
datahike.db.since_pred = (function datahike$db$since_pred(time_point){
|
|
332
|
+
return cljs.core.complement(datahike.db.as_of_pred(time_point));
|
|
333
|
+
});
|
|
334
|
+
datahike.db.assemble_datoms_xform = (function datahike$db$assemble_datoms_xform(db){
|
|
335
|
+
return cljs.core.mapcat.cljs$core$IFn$_invoke$arity$1((function (p__58387){
|
|
336
|
+
var vec__58388 = p__58387;
|
|
337
|
+
var vec__58391 = cljs.core.nth.cljs$core$IFn$_invoke$arity$3(vec__58388,(0),null);
|
|
338
|
+
var _ = cljs.core.nth.cljs$core$IFn$_invoke$arity$3(vec__58391,(0),null);
|
|
339
|
+
var a = cljs.core.nth.cljs$core$IFn$_invoke$arity$3(vec__58391,(1),null);
|
|
340
|
+
var datoms = cljs.core.nth.cljs$core$IFn$_invoke$arity$3(vec__58388,(1),null);
|
|
341
|
+
if(datahike.db.utils.multival_QMARK_(db,a)){
|
|
342
|
+
return cljs.core.vals(cljs.core.reduce.cljs$core$IFn$_invoke$arity$3((function (current_datoms,datom){
|
|
343
|
+
if(cljs.core.truth_(datahike.datom.datom_added(datom))){
|
|
344
|
+
return cljs.core.assoc.cljs$core$IFn$_invoke$arity$3(current_datoms,datom.v,datom);
|
|
345
|
+
} else {
|
|
346
|
+
return cljs.core.dissoc.cljs$core$IFn$_invoke$arity$2(current_datoms,datom.v);
|
|
347
|
+
}
|
|
348
|
+
}),cljs.core.PersistentArrayMap.EMPTY,cljs.core.sort_by.cljs$core$IFn$_invoke$arity$2(datahike.datom.datom_tx,datoms)));
|
|
349
|
+
} else {
|
|
350
|
+
var last_ea_tx = cljs.core.apply.cljs$core$IFn$_invoke$arity$2(cljs.core.max,cljs.core.map.cljs$core$IFn$_invoke$arity$2(datahike.datom.datom_tx,datoms));
|
|
351
|
+
var current_ea_datom = cljs.core.first(cljs.core.filter.cljs$core$IFn$_invoke$arity$2((function (p1__58383_SHARP_){
|
|
352
|
+
var and__5000__auto__ = datahike.datom.datom_added(p1__58383_SHARP_);
|
|
353
|
+
if(cljs.core.truth_(and__5000__auto__)){
|
|
354
|
+
return cljs.core._EQ_.cljs$core$IFn$_invoke$arity$2(last_ea_tx,datahike.datom.datom_tx(p1__58383_SHARP_));
|
|
355
|
+
} else {
|
|
356
|
+
return and__5000__auto__;
|
|
357
|
+
}
|
|
358
|
+
}),datoms));
|
|
359
|
+
if(cljs.core.truth_(current_ea_datom)){
|
|
360
|
+
return new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [current_ea_datom], null);
|
|
361
|
+
} else {
|
|
362
|
+
return cljs.core.PersistentVector.EMPTY;
|
|
363
|
+
}
|
|
364
|
+
}
|
|
365
|
+
}));
|
|
366
|
+
});
|
|
367
|
+
datahike.db.temporal_datom_filter = (function datahike$db$temporal_datom_filter(datoms,pred,db){
|
|
368
|
+
var filtered_tx_ids = datahike.db.utils.filter_txInstant(datoms,pred,db);
|
|
369
|
+
return cljs.core.filter.cljs$core$IFn$_invoke$arity$1((function (d){
|
|
370
|
+
return cljs.core.contains_QMARK_(filtered_tx_ids,datahike.datom.datom_tx(d));
|
|
371
|
+
}));
|
|
372
|
+
});
|
|
373
|
+
datahike.db.post_process_datoms = (function datahike$db$post_process_datoms(datoms,db,context){
|
|
374
|
+
var xform = datahike.db.interface$.context_xform(context);
|
|
375
|
+
var time_pred = datahike.db.interface$.context_time_pred(context);
|
|
376
|
+
if(cljs.core.truth_(time_pred)){
|
|
377
|
+
var time_xform = datahike.db.temporal_datom_filter(datoms,time_pred,db);
|
|
378
|
+
if(cljs.core.truth_(datahike.db.interface$.context_historical_QMARK_(context))){
|
|
379
|
+
return cljs.core.into.cljs$core$IFn$_invoke$arity$3(cljs.core.PersistentVector.EMPTY,datahike.db.interface$.nil_comp(time_xform,xform),datoms);
|
|
380
|
+
} else {
|
|
381
|
+
return cljs.core.into.cljs$core$IFn$_invoke$arity$3(cljs.core.PersistentVector.EMPTY,datahike.db.interface$.nil_comp(datahike.db.assemble_datoms_xform(db),xform),cljs.core.transduce.cljs$core$IFn$_invoke$arity$3(time_xform,datahike.tools.group_by_step((function (datom){
|
|
382
|
+
return new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [datom.e,datom.a], null);
|
|
383
|
+
})),datoms));
|
|
384
|
+
}
|
|
385
|
+
} else {
|
|
386
|
+
if(cljs.core.truth_(xform)){
|
|
387
|
+
return cljs.core.into.cljs$core$IFn$_invoke$arity$3(cljs.core.PersistentVector.EMPTY,xform,datoms);
|
|
388
|
+
} else {
|
|
389
|
+
return datoms;
|
|
390
|
+
|
|
391
|
+
}
|
|
392
|
+
}
|
|
393
|
+
});
|
|
394
|
+
datahike.db.db_transient = (function datahike$db$db_transient(db){
|
|
395
|
+
return cljs.core.update.cljs$core$IFn$_invoke$arity$3(cljs.core.update.cljs$core$IFn$_invoke$arity$3(cljs.core.update.cljs$core$IFn$_invoke$arity$3(db,new cljs.core.Keyword(null,"eavt","eavt",-666437073),datahike.index._transient),new cljs.core.Keyword(null,"aevt","aevt",-585148059),datahike.index._transient),new cljs.core.Keyword(null,"avet","avet",1383857032),datahike.index._transient);
|
|
396
|
+
});
|
|
397
|
+
datahike.db.db_persistent_BANG_ = (function datahike$db$db_persistent_BANG_(db){
|
|
398
|
+
return cljs.core.update.cljs$core$IFn$_invoke$arity$3(cljs.core.update.cljs$core$IFn$_invoke$arity$3(cljs.core.update.cljs$core$IFn$_invoke$arity$3(db,new cljs.core.Keyword(null,"eavt","eavt",-666437073),datahike.index._persistent_BANG_),new cljs.core.Keyword(null,"aevt","aevt",-585148059),datahike.index._persistent_BANG_),new cljs.core.Keyword(null,"avet","avet",1383857032),datahike.index._persistent_BANG_);
|
|
399
|
+
});
|
|
400
|
+
datahike.db.contextual_search_fn = (function datahike$db$contextual_search_fn(context){
|
|
401
|
+
var G__58409 = datahike.db.interface$.context_temporal_QMARK_(context);
|
|
402
|
+
if(cljs.core._EQ_.cljs$core$IFn$_invoke$arity$2(true,G__58409)){
|
|
403
|
+
return datahike.db.search.temporal_search;
|
|
404
|
+
} else {
|
|
405
|
+
if(cljs.core._EQ_.cljs$core$IFn$_invoke$arity$2(false,G__58409)){
|
|
406
|
+
return datahike.db.search.search_current_indices;
|
|
407
|
+
} else {
|
|
408
|
+
throw (new Error(["No matching clause: ",cljs.core.str.cljs$core$IFn$_invoke$arity$1(G__58409)].join('')));
|
|
409
|
+
|
|
410
|
+
}
|
|
411
|
+
}
|
|
412
|
+
});
|
|
413
|
+
datahike.db.contextual_search = (function datahike$db$contextual_search(db,pattern,context){
|
|
414
|
+
return datahike.db.post_process_datoms((function (){var fexpr__58413 = datahike.db.contextual_search_fn(context);
|
|
415
|
+
return (fexpr__58413.cljs$core$IFn$_invoke$arity$2 ? fexpr__58413.cljs$core$IFn$_invoke$arity$2(db,pattern) : fexpr__58413.call(null, db,pattern));
|
|
416
|
+
})(),db,context);
|
|
417
|
+
});
|
|
418
|
+
datahike.db.contextual_batch_search = (function datahike$db$contextual_batch_search(db,pattern_mask,batch_fn,context){
|
|
419
|
+
return datahike.db.post_process_datoms((function (){var fexpr__58416 = datahike.db.contextual_search_fn(context);
|
|
420
|
+
return (fexpr__58416.cljs$core$IFn$_invoke$arity$3 ? fexpr__58416.cljs$core$IFn$_invoke$arity$3(db,pattern_mask,batch_fn) : fexpr__58416.call(null, db,pattern_mask,batch_fn));
|
|
421
|
+
})(),db,context);
|
|
422
|
+
});
|
|
423
|
+
datahike.db.contextual_datoms = (function datahike$db$contextual_datoms(db,index_type,cs,context){
|
|
424
|
+
return datahike.db.post_process_datoms((function (){var G__58418 = datahike.db.interface$.context_temporal_QMARK_(context);
|
|
425
|
+
if(cljs.core._EQ_.cljs$core$IFn$_invoke$arity$2(true,G__58418)){
|
|
426
|
+
return datahike.db.utils.temporal_datoms(db,index_type,cs);
|
|
427
|
+
} else {
|
|
428
|
+
if(cljs.core._EQ_.cljs$core$IFn$_invoke$arity$2(false,G__58418)){
|
|
429
|
+
var G__58421 = cljs.core.get.cljs$core$IFn$_invoke$arity$2(db,index_type);
|
|
430
|
+
var G__58422 = datahike.db.utils.components__GT_pattern(db,index_type,cs,(0),(536870912));
|
|
431
|
+
var G__58423 = datahike.db.utils.components__GT_pattern(db,index_type,cs,(2147483647),(2147483647));
|
|
432
|
+
var G__58424 = index_type;
|
|
433
|
+
return (datahike.index._slice.cljs$core$IFn$_invoke$arity$4 ? datahike.index._slice.cljs$core$IFn$_invoke$arity$4(G__58421,G__58422,G__58423,G__58424) : datahike.index._slice.call(null, G__58421,G__58422,G__58423,G__58424));
|
|
434
|
+
} else {
|
|
435
|
+
throw (new Error(["No matching clause: ",cljs.core.str.cljs$core$IFn$_invoke$arity$1(G__58418)].join('')));
|
|
436
|
+
|
|
437
|
+
}
|
|
438
|
+
}
|
|
439
|
+
})(),db,context);
|
|
440
|
+
});
|
|
441
|
+
datahike.db.contextual_seek_datoms = (function datahike$db$contextual_seek_datoms(db,index_type,cs,context){
|
|
442
|
+
return datahike.db.post_process_datoms((function (){var G__58427 = datahike.db.interface$.context_temporal_QMARK_(context);
|
|
443
|
+
if(cljs.core._EQ_.cljs$core$IFn$_invoke$arity$2(true,G__58427)){
|
|
444
|
+
return datahike.db.search.temporal_seek_datoms(db,index_type,cs);
|
|
445
|
+
} else {
|
|
446
|
+
if(cljs.core._EQ_.cljs$core$IFn$_invoke$arity$2(false,G__58427)){
|
|
447
|
+
var G__58428 = cljs.core.get.cljs$core$IFn$_invoke$arity$2(db,index_type);
|
|
448
|
+
var G__58429 = datahike.db.utils.components__GT_pattern(db,index_type,cs,(0),(536870912));
|
|
449
|
+
var G__58430 = datahike.datom.datom.cljs$core$IFn$_invoke$arity$4((2147483647),null,null,(2147483647));
|
|
450
|
+
var G__58431 = index_type;
|
|
451
|
+
return (datahike.index._slice.cljs$core$IFn$_invoke$arity$4 ? datahike.index._slice.cljs$core$IFn$_invoke$arity$4(G__58428,G__58429,G__58430,G__58431) : datahike.index._slice.call(null, G__58428,G__58429,G__58430,G__58431));
|
|
452
|
+
} else {
|
|
453
|
+
throw (new Error(["No matching clause: ",cljs.core.str.cljs$core$IFn$_invoke$arity$1(G__58427)].join('')));
|
|
454
|
+
|
|
455
|
+
}
|
|
456
|
+
}
|
|
457
|
+
})(),db,context);
|
|
458
|
+
});
|
|
459
|
+
datahike.db.contextual_rseek_datoms = (function datahike$db$contextual_rseek_datoms(db,index_type,cs,context){
|
|
460
|
+
return datahike.db.post_process_datoms((function (){var G__58435 = datahike.db.interface$.context_temporal_QMARK_(context);
|
|
461
|
+
if(cljs.core._EQ_.cljs$core$IFn$_invoke$arity$2(true,G__58435)){
|
|
462
|
+
return datahike.db.search.temporal_rseek_datoms(db,index_type,cs);
|
|
463
|
+
} else {
|
|
464
|
+
if(cljs.core._EQ_.cljs$core$IFn$_invoke$arity$2(false,G__58435)){
|
|
465
|
+
return cljs.core.rseq(cljs.core.vec((function (){var G__58437 = cljs.core.get.cljs$core$IFn$_invoke$arity$2(db,index_type);
|
|
466
|
+
var G__58438 = datahike.db.utils.components__GT_pattern(db,index_type,cs,(0),(536870912));
|
|
467
|
+
var G__58439 = datahike.datom.datom.cljs$core$IFn$_invoke$arity$4((2147483647),null,null,(2147483647));
|
|
468
|
+
var G__58440 = index_type;
|
|
469
|
+
return (datahike.index._slice.cljs$core$IFn$_invoke$arity$4 ? datahike.index._slice.cljs$core$IFn$_invoke$arity$4(G__58437,G__58438,G__58439,G__58440) : datahike.index._slice.call(null, G__58437,G__58438,G__58439,G__58440));
|
|
470
|
+
})()));
|
|
471
|
+
} else {
|
|
472
|
+
throw (new Error(["No matching clause: ",cljs.core.str.cljs$core$IFn$_invoke$arity$1(G__58435)].join('')));
|
|
473
|
+
|
|
474
|
+
}
|
|
475
|
+
}
|
|
476
|
+
})(),db,context);
|
|
477
|
+
});
|
|
478
|
+
datahike.db.contextual_index_range = (function datahike$db$contextual_index_range(db,avet,attr,start,end,context){
|
|
479
|
+
var temporal_QMARK_ = datahike.db.interface$.context_temporal_QMARK_(context);
|
|
480
|
+
var current_db = datahike.db.interface$.context_current_db(context);
|
|
481
|
+
if(cljs.core.truth_((function (){var or__5002__auto__ = cljs.core.not(temporal_QMARK_);
|
|
482
|
+
if(or__5002__auto__){
|
|
483
|
+
return or__5002__auto__;
|
|
484
|
+
} else {
|
|
485
|
+
return current_db;
|
|
486
|
+
}
|
|
487
|
+
})())){
|
|
488
|
+
} else {
|
|
489
|
+
throw (new Error("Assert failed: (or (not temporal?) current-db)"));
|
|
490
|
+
}
|
|
491
|
+
|
|
492
|
+
return datahike.db.post_process_datoms((function (){var G__58449 = temporal_QMARK_;
|
|
493
|
+
if(cljs.core._EQ_.cljs$core$IFn$_invoke$arity$2(true,G__58449)){
|
|
494
|
+
return datahike.db.search.temporal_index_range(db,current_db,attr,start,end);
|
|
495
|
+
} else {
|
|
496
|
+
if(cljs.core._EQ_.cljs$core$IFn$_invoke$arity$2(false,G__58449)){
|
|
497
|
+
if(datahike.db.utils.indexing_QMARK_(db,attr)){
|
|
498
|
+
} else {
|
|
499
|
+
var G__58453_58923 = (function(){throw cljs.core.ex_info.cljs$core$IFn$_invoke$arity$2(["Attribute",cljs.core.pr_str.cljs$core$IFn$_invoke$arity$variadic(cljs.core.prim_seq.cljs$core$IFn$_invoke$arity$2([attr], 0)),"should be marked as :db/index true"].join(''),cljs.core.PersistentArrayMap.EMPTY)})();
|
|
500
|
+
var fexpr__58452_58924 = taoensso.timbre._log_BANG_.cljs$core$IFn$_invoke$arity$14(taoensso.timbre._STAR_config_STAR_,new cljs.core.Keyword(null,"error","error",-978969032),"datahike.db",null,259,null,new cljs.core.Keyword(null,"p","p",151049309),new cljs.core.Keyword(null,"auto","auto",-566279492),(new cljs.core.Delay((function (){
|
|
501
|
+
return new cljs.core.PersistentVector(null, 4, 5, cljs.core.PersistentVector.EMPTY_NODE, ["Attribute",attr,"should be marked as :db/index true",cljs.core.PersistentArrayMap.EMPTY], null);
|
|
502
|
+
}),null)),null,(242),null,null,null);
|
|
503
|
+
(fexpr__58452_58924.cljs$core$IFn$_invoke$arity$1 ? fexpr__58452_58924.cljs$core$IFn$_invoke$arity$1(G__58453_58923) : fexpr__58452_58924.call(null, G__58453_58923));
|
|
504
|
+
}
|
|
505
|
+
|
|
506
|
+
datahike.db.utils.validate_attr(attr,(new cljs.core.List(null,new cljs.core.Symbol(null,"-index-range","-index-range",898114142,null),(new cljs.core.List(null,new cljs.core.Symbol(null,"db","db",-1661185010,null),(new cljs.core.List(null,attr,(new cljs.core.List(null,start,(new cljs.core.List(null,end,null,(1),null)),(2),null)),(3),null)),(4),null)),(5),null)),db);
|
|
507
|
+
|
|
508
|
+
var G__58458 = avet;
|
|
509
|
+
var G__58459 = datahike.db.utils.resolve_datom(db,null,attr,start,null,(0),(536870912));
|
|
510
|
+
var G__58460 = datahike.db.utils.resolve_datom(db,null,attr,end,null,(2147483647),(2147483647));
|
|
511
|
+
var G__58461 = new cljs.core.Keyword(null,"avet","avet",1383857032);
|
|
512
|
+
return (datahike.index._slice.cljs$core$IFn$_invoke$arity$4 ? datahike.index._slice.cljs$core$IFn$_invoke$arity$4(G__58458,G__58459,G__58460,G__58461) : datahike.index._slice.call(null, G__58458,G__58459,G__58460,G__58461));
|
|
513
|
+
} else {
|
|
514
|
+
throw (new Error(["No matching clause: ",cljs.core.str.cljs$core$IFn$_invoke$arity$1(G__58449)].join('')));
|
|
515
|
+
|
|
516
|
+
}
|
|
517
|
+
}
|
|
518
|
+
})(),db,context);
|
|
519
|
+
});
|
|
520
|
+
datahike.db.deeper_index_range = (function datahike$db$deeper_index_range(origin_db,db,attr,start,end,context){
|
|
521
|
+
return datahike.db.interface$._index_range(origin_db,attr,start,end,datahike.db.interface$.context_set_current_db_if_not_set(context,db));
|
|
522
|
+
});
|
|
523
|
+
|
|
524
|
+
/**
|
|
525
|
+
* @constructor
|
|
526
|
+
* @implements {cljs.core.IRecord}
|
|
527
|
+
* @implements {cljs.core.IKVReduce}
|
|
528
|
+
* @implements {cljs.core.IEquiv}
|
|
529
|
+
* @implements {cljs.core.IHash}
|
|
530
|
+
* @implements {cljs.core.ICollection}
|
|
531
|
+
* @implements {cljs.core.ICounted}
|
|
532
|
+
* @implements {cljs.core.ISeqable}
|
|
533
|
+
* @implements {cljs.core.IMeta}
|
|
534
|
+
* @implements {cljs.core.ICloneable}
|
|
535
|
+
* @implements {cljs.core.IPrintWithWriter}
|
|
536
|
+
* @implements {cljs.core.IIterable}
|
|
537
|
+
* @implements {cljs.core.IWithMeta}
|
|
538
|
+
* @implements {cljs.core.IAssociative}
|
|
539
|
+
* @implements {cljs.core.IMap}
|
|
540
|
+
* @implements {cljs.core.ILookup}
|
|
541
|
+
*/
|
|
542
|
+
datahike.db.DB = (function (schema,eavt,aevt,avet,temporal_eavt,temporal_aevt,temporal_avet,max_eid,max_tx,op_count,rschema,hash,config,system_entities,ident_ref_map,ref_ident_map,meta,__meta,__extmap,__hash){
|
|
543
|
+
this.schema = schema;
|
|
544
|
+
this.eavt = eavt;
|
|
545
|
+
this.aevt = aevt;
|
|
546
|
+
this.avet = avet;
|
|
547
|
+
this.temporal_eavt = temporal_eavt;
|
|
548
|
+
this.temporal_aevt = temporal_aevt;
|
|
549
|
+
this.temporal_avet = temporal_avet;
|
|
550
|
+
this.max_eid = max_eid;
|
|
551
|
+
this.max_tx = max_tx;
|
|
552
|
+
this.op_count = op_count;
|
|
553
|
+
this.rschema = rschema;
|
|
554
|
+
this.hash = hash;
|
|
555
|
+
this.config = config;
|
|
556
|
+
this.system_entities = system_entities;
|
|
557
|
+
this.ident_ref_map = ident_ref_map;
|
|
558
|
+
this.ref_ident_map = ref_ident_map;
|
|
559
|
+
this.meta = meta;
|
|
560
|
+
this.__meta = __meta;
|
|
561
|
+
this.__extmap = __extmap;
|
|
562
|
+
this.__hash = __hash;
|
|
563
|
+
this.cljs$lang$protocol_mask$partition0$ = 2230716170;
|
|
564
|
+
this.cljs$lang$protocol_mask$partition1$ = 139264;
|
|
565
|
+
});
|
|
566
|
+
(datahike.db.DB.prototype.cljs$core$ILookup$_lookup$arity$2 = (function (this__5300__auto__,k__5301__auto__){
|
|
567
|
+
var self__ = this;
|
|
568
|
+
var this__5300__auto____$1 = this;
|
|
569
|
+
return this__5300__auto____$1.cljs$core$ILookup$_lookup$arity$3(null, k__5301__auto__,null);
|
|
570
|
+
}));
|
|
571
|
+
|
|
572
|
+
(datahike.db.DB.prototype.cljs$core$ILookup$_lookup$arity$3 = (function (this__5302__auto__,k58475,else__5303__auto__){
|
|
573
|
+
var self__ = this;
|
|
574
|
+
var this__5302__auto____$1 = this;
|
|
575
|
+
var G__58483 = k58475;
|
|
576
|
+
var G__58483__$1 = (((G__58483 instanceof cljs.core.Keyword))?G__58483.fqn:null);
|
|
577
|
+
switch (G__58483__$1) {
|
|
578
|
+
case "schema":
|
|
579
|
+
return self__.schema;
|
|
580
|
+
|
|
581
|
+
break;
|
|
582
|
+
case "eavt":
|
|
583
|
+
return self__.eavt;
|
|
584
|
+
|
|
585
|
+
break;
|
|
586
|
+
case "aevt":
|
|
587
|
+
return self__.aevt;
|
|
588
|
+
|
|
589
|
+
break;
|
|
590
|
+
case "avet":
|
|
591
|
+
return self__.avet;
|
|
592
|
+
|
|
593
|
+
break;
|
|
594
|
+
case "temporal-eavt":
|
|
595
|
+
return self__.temporal_eavt;
|
|
596
|
+
|
|
597
|
+
break;
|
|
598
|
+
case "temporal-aevt":
|
|
599
|
+
return self__.temporal_aevt;
|
|
600
|
+
|
|
601
|
+
break;
|
|
602
|
+
case "temporal-avet":
|
|
603
|
+
return self__.temporal_avet;
|
|
604
|
+
|
|
605
|
+
break;
|
|
606
|
+
case "max-eid":
|
|
607
|
+
return self__.max_eid;
|
|
608
|
+
|
|
609
|
+
break;
|
|
610
|
+
case "max-tx":
|
|
611
|
+
return self__.max_tx;
|
|
612
|
+
|
|
613
|
+
break;
|
|
614
|
+
case "op-count":
|
|
615
|
+
return self__.op_count;
|
|
616
|
+
|
|
617
|
+
break;
|
|
618
|
+
case "rschema":
|
|
619
|
+
return self__.rschema;
|
|
620
|
+
|
|
621
|
+
break;
|
|
622
|
+
case "hash":
|
|
623
|
+
return self__.hash;
|
|
624
|
+
|
|
625
|
+
break;
|
|
626
|
+
case "config":
|
|
627
|
+
return self__.config;
|
|
628
|
+
|
|
629
|
+
break;
|
|
630
|
+
case "system-entities":
|
|
631
|
+
return self__.system_entities;
|
|
632
|
+
|
|
633
|
+
break;
|
|
634
|
+
case "ident-ref-map":
|
|
635
|
+
return self__.ident_ref_map;
|
|
636
|
+
|
|
637
|
+
break;
|
|
638
|
+
case "ref-ident-map":
|
|
639
|
+
return self__.ref_ident_map;
|
|
640
|
+
|
|
641
|
+
break;
|
|
642
|
+
case "meta":
|
|
643
|
+
return self__.meta;
|
|
644
|
+
|
|
645
|
+
break;
|
|
646
|
+
default:
|
|
647
|
+
return cljs.core.get.cljs$core$IFn$_invoke$arity$3(self__.__extmap,k58475,else__5303__auto__);
|
|
648
|
+
|
|
649
|
+
}
|
|
650
|
+
}));
|
|
651
|
+
|
|
652
|
+
(datahike.db.DB.prototype.cljs$core$IKVReduce$_kv_reduce$arity$3 = (function (this__5320__auto__,f__5321__auto__,init__5322__auto__){
|
|
653
|
+
var self__ = this;
|
|
654
|
+
var this__5320__auto____$1 = this;
|
|
655
|
+
return cljs.core.reduce.cljs$core$IFn$_invoke$arity$3((function (ret__5323__auto__,p__58484){
|
|
656
|
+
var vec__58485 = p__58484;
|
|
657
|
+
var k__5324__auto__ = cljs.core.nth.cljs$core$IFn$_invoke$arity$3(vec__58485,(0),null);
|
|
658
|
+
var v__5325__auto__ = cljs.core.nth.cljs$core$IFn$_invoke$arity$3(vec__58485,(1),null);
|
|
659
|
+
return (f__5321__auto__.cljs$core$IFn$_invoke$arity$3 ? f__5321__auto__.cljs$core$IFn$_invoke$arity$3(ret__5323__auto__,k__5324__auto__,v__5325__auto__) : f__5321__auto__.call(null, ret__5323__auto__,k__5324__auto__,v__5325__auto__));
|
|
660
|
+
}),init__5322__auto__,this__5320__auto____$1);
|
|
661
|
+
}));
|
|
662
|
+
|
|
663
|
+
(datahike.db.DB.prototype.cljs$core$IPrintWithWriter$_pr_writer$arity$3 = (function (this__5315__auto__,writer__5316__auto__,opts__5317__auto__){
|
|
664
|
+
var self__ = this;
|
|
665
|
+
var this__5315__auto____$1 = this;
|
|
666
|
+
var pr_pair__5318__auto__ = (function (keyval__5319__auto__){
|
|
667
|
+
return cljs.core.pr_sequential_writer(writer__5316__auto__,cljs.core.pr_writer,""," ","",opts__5317__auto__,keyval__5319__auto__);
|
|
668
|
+
});
|
|
669
|
+
return cljs.core.pr_sequential_writer(writer__5316__auto__,pr_pair__5318__auto__,"#datahike.db.DB{",", ","}",opts__5317__auto__,cljs.core.concat.cljs$core$IFn$_invoke$arity$2(new cljs.core.PersistentVector(null, 17, 5, cljs.core.PersistentVector.EMPTY_NODE, [(new cljs.core.PersistentVector(null,2,(5),cljs.core.PersistentVector.EMPTY_NODE,[new cljs.core.Keyword(null,"schema","schema",-1582001791),self__.schema],null)),(new cljs.core.PersistentVector(null,2,(5),cljs.core.PersistentVector.EMPTY_NODE,[new cljs.core.Keyword(null,"eavt","eavt",-666437073),self__.eavt],null)),(new cljs.core.PersistentVector(null,2,(5),cljs.core.PersistentVector.EMPTY_NODE,[new cljs.core.Keyword(null,"aevt","aevt",-585148059),self__.aevt],null)),(new cljs.core.PersistentVector(null,2,(5),cljs.core.PersistentVector.EMPTY_NODE,[new cljs.core.Keyword(null,"avet","avet",1383857032),self__.avet],null)),(new cljs.core.PersistentVector(null,2,(5),cljs.core.PersistentVector.EMPTY_NODE,[new cljs.core.Keyword(null,"temporal-eavt","temporal-eavt",-1065512715),self__.temporal_eavt],null)),(new cljs.core.PersistentVector(null,2,(5),cljs.core.PersistentVector.EMPTY_NODE,[new cljs.core.Keyword(null,"temporal-aevt","temporal-aevt",341636346),self__.temporal_aevt],null)),(new cljs.core.PersistentVector(null,2,(5),cljs.core.PersistentVector.EMPTY_NODE,[new cljs.core.Keyword(null,"temporal-avet","temporal-avet",-558341228),self__.temporal_avet],null)),(new cljs.core.PersistentVector(null,2,(5),cljs.core.PersistentVector.EMPTY_NODE,[new cljs.core.Keyword(null,"max-eid","max-eid",2134868075),self__.max_eid],null)),(new cljs.core.PersistentVector(null,2,(5),cljs.core.PersistentVector.EMPTY_NODE,[new cljs.core.Keyword(null,"max-tx","max-tx",1119558339),self__.max_tx],null)),(new cljs.core.PersistentVector(null,2,(5),cljs.core.PersistentVector.EMPTY_NODE,[new cljs.core.Keyword(null,"op-count","op-count",-1218914478),self__.op_count],null)),(new cljs.core.PersistentVector(null,2,(5),cljs.core.PersistentVector.EMPTY_NODE,[new cljs.core.Keyword(null,"rschema","rschema",-1196134054),self__.rschema],null)),(new cljs.core.PersistentVector(null,2,(5),cljs.core.PersistentVector.EMPTY_NODE,[new cljs.core.Keyword(null,"hash","hash",-13781596),self__.hash],null)),(new cljs.core.PersistentVector(null,2,(5),cljs.core.PersistentVector.EMPTY_NODE,[new cljs.core.Keyword(null,"config","config",994861415),self__.config],null)),(new cljs.core.PersistentVector(null,2,(5),cljs.core.PersistentVector.EMPTY_NODE,[new cljs.core.Keyword(null,"system-entities","system-entities",-1452000411),self__.system_entities],null)),(new cljs.core.PersistentVector(null,2,(5),cljs.core.PersistentVector.EMPTY_NODE,[new cljs.core.Keyword(null,"ident-ref-map","ident-ref-map",1187514335),self__.ident_ref_map],null)),(new cljs.core.PersistentVector(null,2,(5),cljs.core.PersistentVector.EMPTY_NODE,[new cljs.core.Keyword(null,"ref-ident-map","ref-ident-map",107296375),self__.ref_ident_map],null)),(new cljs.core.PersistentVector(null,2,(5),cljs.core.PersistentVector.EMPTY_NODE,[new cljs.core.Keyword(null,"meta","meta",1499536964),self__.meta],null))], null),self__.__extmap));
|
|
670
|
+
}));
|
|
671
|
+
|
|
672
|
+
(datahike.db.DB.prototype.cljs$core$IIterable$_iterator$arity$1 = (function (G__58474){
|
|
673
|
+
var self__ = this;
|
|
674
|
+
var G__58474__$1 = this;
|
|
675
|
+
return (new cljs.core.RecordIter((0),G__58474__$1,17,new cljs.core.PersistentVector(null, 17, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"schema","schema",-1582001791),new cljs.core.Keyword(null,"eavt","eavt",-666437073),new cljs.core.Keyword(null,"aevt","aevt",-585148059),new cljs.core.Keyword(null,"avet","avet",1383857032),new cljs.core.Keyword(null,"temporal-eavt","temporal-eavt",-1065512715),new cljs.core.Keyword(null,"temporal-aevt","temporal-aevt",341636346),new cljs.core.Keyword(null,"temporal-avet","temporal-avet",-558341228),new cljs.core.Keyword(null,"max-eid","max-eid",2134868075),new cljs.core.Keyword(null,"max-tx","max-tx",1119558339),new cljs.core.Keyword(null,"op-count","op-count",-1218914478),new cljs.core.Keyword(null,"rschema","rschema",-1196134054),new cljs.core.Keyword(null,"hash","hash",-13781596),new cljs.core.Keyword(null,"config","config",994861415),new cljs.core.Keyword(null,"system-entities","system-entities",-1452000411),new cljs.core.Keyword(null,"ident-ref-map","ident-ref-map",1187514335),new cljs.core.Keyword(null,"ref-ident-map","ref-ident-map",107296375),new cljs.core.Keyword(null,"meta","meta",1499536964)], null),(cljs.core.truth_(self__.__extmap)?cljs.core._iterator(self__.__extmap):cljs.core.nil_iter())));
|
|
676
|
+
}));
|
|
677
|
+
|
|
678
|
+
(datahike.db.DB.prototype.cljs$core$IMeta$_meta$arity$1 = (function (this__5298__auto__){
|
|
679
|
+
var self__ = this;
|
|
680
|
+
var this__5298__auto____$1 = this;
|
|
681
|
+
return self__.__meta;
|
|
682
|
+
}));
|
|
683
|
+
|
|
684
|
+
(datahike.db.DB.prototype.cljs$core$ICloneable$_clone$arity$1 = (function (this__5295__auto__){
|
|
685
|
+
var self__ = this;
|
|
686
|
+
var this__5295__auto____$1 = this;
|
|
687
|
+
return (new datahike.db.DB(self__.schema,self__.eavt,self__.aevt,self__.avet,self__.temporal_eavt,self__.temporal_aevt,self__.temporal_avet,self__.max_eid,self__.max_tx,self__.op_count,self__.rschema,self__.hash,self__.config,self__.system_entities,self__.ident_ref_map,self__.ref_ident_map,self__.meta,self__.__meta,self__.__extmap,self__.__hash));
|
|
688
|
+
}));
|
|
689
|
+
|
|
690
|
+
(datahike.db.DB.prototype.cljs$core$ICounted$_count$arity$1 = (function (this__5304__auto__){
|
|
691
|
+
var self__ = this;
|
|
692
|
+
var this__5304__auto____$1 = this;
|
|
693
|
+
return (17 + cljs.core.count(self__.__extmap));
|
|
694
|
+
}));
|
|
695
|
+
|
|
696
|
+
(datahike.db.DB.prototype.cljs$core$IHash$_hash$arity$1 = (function (this__5296__auto__){
|
|
697
|
+
var self__ = this;
|
|
698
|
+
var this__5296__auto____$1 = this;
|
|
699
|
+
var h__5111__auto__ = self__.__hash;
|
|
700
|
+
if((!((h__5111__auto__ == null)))){
|
|
701
|
+
return h__5111__auto__;
|
|
702
|
+
} else {
|
|
703
|
+
var h__5111__auto____$1 = (function (coll__5297__auto__){
|
|
704
|
+
return (-2040726735 ^ cljs.core.hash_unordered_coll(coll__5297__auto__));
|
|
705
|
+
})(this__5296__auto____$1);
|
|
706
|
+
(self__.__hash = h__5111__auto____$1);
|
|
707
|
+
|
|
708
|
+
return h__5111__auto____$1;
|
|
709
|
+
}
|
|
710
|
+
}));
|
|
711
|
+
|
|
712
|
+
(datahike.db.DB.prototype.cljs$core$IEquiv$_equiv$arity$2 = (function (this58476,other58477){
|
|
713
|
+
var self__ = this;
|
|
714
|
+
var this58476__$1 = this;
|
|
715
|
+
return (((!((other58477 == null)))) && ((((this58476__$1.constructor === other58477.constructor)) && (((cljs.core._EQ_.cljs$core$IFn$_invoke$arity$2(this58476__$1.schema,other58477.schema)) && (((cljs.core._EQ_.cljs$core$IFn$_invoke$arity$2(this58476__$1.eavt,other58477.eavt)) && (((cljs.core._EQ_.cljs$core$IFn$_invoke$arity$2(this58476__$1.aevt,other58477.aevt)) && (((cljs.core._EQ_.cljs$core$IFn$_invoke$arity$2(this58476__$1.avet,other58477.avet)) && (((cljs.core._EQ_.cljs$core$IFn$_invoke$arity$2(this58476__$1.temporal_eavt,other58477.temporal_eavt)) && (((cljs.core._EQ_.cljs$core$IFn$_invoke$arity$2(this58476__$1.temporal_aevt,other58477.temporal_aevt)) && (((cljs.core._EQ_.cljs$core$IFn$_invoke$arity$2(this58476__$1.temporal_avet,other58477.temporal_avet)) && (((cljs.core._EQ_.cljs$core$IFn$_invoke$arity$2(this58476__$1.max_eid,other58477.max_eid)) && (((cljs.core._EQ_.cljs$core$IFn$_invoke$arity$2(this58476__$1.max_tx,other58477.max_tx)) && (((cljs.core._EQ_.cljs$core$IFn$_invoke$arity$2(this58476__$1.op_count,other58477.op_count)) && (((cljs.core._EQ_.cljs$core$IFn$_invoke$arity$2(this58476__$1.rschema,other58477.rschema)) && (((cljs.core._EQ_.cljs$core$IFn$_invoke$arity$2(this58476__$1.hash,other58477.hash)) && (((cljs.core._EQ_.cljs$core$IFn$_invoke$arity$2(this58476__$1.config,other58477.config)) && (((cljs.core._EQ_.cljs$core$IFn$_invoke$arity$2(this58476__$1.system_entities,other58477.system_entities)) && (((cljs.core._EQ_.cljs$core$IFn$_invoke$arity$2(this58476__$1.ident_ref_map,other58477.ident_ref_map)) && (((cljs.core._EQ_.cljs$core$IFn$_invoke$arity$2(this58476__$1.ref_ident_map,other58477.ref_ident_map)) && (((cljs.core._EQ_.cljs$core$IFn$_invoke$arity$2(this58476__$1.meta,other58477.meta)) && (cljs.core._EQ_.cljs$core$IFn$_invoke$arity$2(this58476__$1.__extmap,other58477.__extmap)))))))))))))))))))))))))))))))))))))));
|
|
716
|
+
}));
|
|
717
|
+
|
|
718
|
+
(datahike.db.DB.prototype.cljs$core$IMap$_dissoc$arity$2 = (function (this__5310__auto__,k__5311__auto__){
|
|
719
|
+
var self__ = this;
|
|
720
|
+
var this__5310__auto____$1 = this;
|
|
721
|
+
if(cljs.core.contains_QMARK_(new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 17, [new cljs.core.Keyword(null,"schema","schema",-1582001791),null,new cljs.core.Keyword(null,"max-tx","max-tx",1119558339),null,new cljs.core.Keyword(null,"hash","hash",-13781596),null,new cljs.core.Keyword(null,"meta","meta",1499536964),null,new cljs.core.Keyword(null,"aevt","aevt",-585148059),null,new cljs.core.Keyword(null,"system-entities","system-entities",-1452000411),null,new cljs.core.Keyword(null,"config","config",994861415),null,new cljs.core.Keyword(null,"avet","avet",1383857032),null,new cljs.core.Keyword(null,"max-eid","max-eid",2134868075),null,new cljs.core.Keyword(null,"eavt","eavt",-666437073),null,new cljs.core.Keyword(null,"op-count","op-count",-1218914478),null,new cljs.core.Keyword(null,"temporal-avet","temporal-avet",-558341228),null,new cljs.core.Keyword(null,"temporal-eavt","temporal-eavt",-1065512715),null,new cljs.core.Keyword(null,"ref-ident-map","ref-ident-map",107296375),null,new cljs.core.Keyword(null,"temporal-aevt","temporal-aevt",341636346),null,new cljs.core.Keyword(null,"rschema","rschema",-1196134054),null,new cljs.core.Keyword(null,"ident-ref-map","ident-ref-map",1187514335),null], null), null),k__5311__auto__)){
|
|
722
|
+
return cljs.core.dissoc.cljs$core$IFn$_invoke$arity$2(cljs.core._with_meta(cljs.core.into.cljs$core$IFn$_invoke$arity$2(cljs.core.PersistentArrayMap.EMPTY,this__5310__auto____$1),self__.__meta),k__5311__auto__);
|
|
723
|
+
} else {
|
|
724
|
+
return (new datahike.db.DB(self__.schema,self__.eavt,self__.aevt,self__.avet,self__.temporal_eavt,self__.temporal_aevt,self__.temporal_avet,self__.max_eid,self__.max_tx,self__.op_count,self__.rschema,self__.hash,self__.config,self__.system_entities,self__.ident_ref_map,self__.ref_ident_map,self__.meta,self__.__meta,cljs.core.not_empty(cljs.core.dissoc.cljs$core$IFn$_invoke$arity$2(self__.__extmap,k__5311__auto__)),null));
|
|
725
|
+
}
|
|
726
|
+
}));
|
|
727
|
+
|
|
728
|
+
(datahike.db.DB.prototype.cljs$core$IAssociative$_contains_key_QMARK_$arity$2 = (function (this__5307__auto__,k58475){
|
|
729
|
+
var self__ = this;
|
|
730
|
+
var this__5307__auto____$1 = this;
|
|
731
|
+
var G__58650 = k58475;
|
|
732
|
+
var G__58650__$1 = (((G__58650 instanceof cljs.core.Keyword))?G__58650.fqn:null);
|
|
733
|
+
switch (G__58650__$1) {
|
|
734
|
+
case "schema":
|
|
735
|
+
case "eavt":
|
|
736
|
+
case "aevt":
|
|
737
|
+
case "avet":
|
|
738
|
+
case "temporal-eavt":
|
|
739
|
+
case "temporal-aevt":
|
|
740
|
+
case "temporal-avet":
|
|
741
|
+
case "max-eid":
|
|
742
|
+
case "max-tx":
|
|
743
|
+
case "op-count":
|
|
744
|
+
case "rschema":
|
|
745
|
+
case "hash":
|
|
746
|
+
case "config":
|
|
747
|
+
case "system-entities":
|
|
748
|
+
case "ident-ref-map":
|
|
749
|
+
case "ref-ident-map":
|
|
750
|
+
case "meta":
|
|
751
|
+
return true;
|
|
752
|
+
|
|
753
|
+
break;
|
|
754
|
+
default:
|
|
755
|
+
return cljs.core.contains_QMARK_(self__.__extmap,k58475);
|
|
756
|
+
|
|
757
|
+
}
|
|
758
|
+
}));
|
|
759
|
+
|
|
760
|
+
(datahike.db.DB.prototype.cljs$core$IAssociative$_assoc$arity$3 = (function (this__5308__auto__,k__5309__auto__,G__58474){
|
|
761
|
+
var self__ = this;
|
|
762
|
+
var this__5308__auto____$1 = this;
|
|
763
|
+
var pred__58651 = cljs.core.keyword_identical_QMARK_;
|
|
764
|
+
var expr__58652 = k__5309__auto__;
|
|
765
|
+
if(cljs.core.truth_((pred__58651.cljs$core$IFn$_invoke$arity$2 ? pred__58651.cljs$core$IFn$_invoke$arity$2(new cljs.core.Keyword(null,"schema","schema",-1582001791),expr__58652) : pred__58651.call(null, new cljs.core.Keyword(null,"schema","schema",-1582001791),expr__58652)))){
|
|
766
|
+
return (new datahike.db.DB(G__58474,self__.eavt,self__.aevt,self__.avet,self__.temporal_eavt,self__.temporal_aevt,self__.temporal_avet,self__.max_eid,self__.max_tx,self__.op_count,self__.rschema,self__.hash,self__.config,self__.system_entities,self__.ident_ref_map,self__.ref_ident_map,self__.meta,self__.__meta,self__.__extmap,null));
|
|
767
|
+
} else {
|
|
768
|
+
if(cljs.core.truth_((pred__58651.cljs$core$IFn$_invoke$arity$2 ? pred__58651.cljs$core$IFn$_invoke$arity$2(new cljs.core.Keyword(null,"eavt","eavt",-666437073),expr__58652) : pred__58651.call(null, new cljs.core.Keyword(null,"eavt","eavt",-666437073),expr__58652)))){
|
|
769
|
+
return (new datahike.db.DB(self__.schema,G__58474,self__.aevt,self__.avet,self__.temporal_eavt,self__.temporal_aevt,self__.temporal_avet,self__.max_eid,self__.max_tx,self__.op_count,self__.rschema,self__.hash,self__.config,self__.system_entities,self__.ident_ref_map,self__.ref_ident_map,self__.meta,self__.__meta,self__.__extmap,null));
|
|
770
|
+
} else {
|
|
771
|
+
if(cljs.core.truth_((pred__58651.cljs$core$IFn$_invoke$arity$2 ? pred__58651.cljs$core$IFn$_invoke$arity$2(new cljs.core.Keyword(null,"aevt","aevt",-585148059),expr__58652) : pred__58651.call(null, new cljs.core.Keyword(null,"aevt","aevt",-585148059),expr__58652)))){
|
|
772
|
+
return (new datahike.db.DB(self__.schema,self__.eavt,G__58474,self__.avet,self__.temporal_eavt,self__.temporal_aevt,self__.temporal_avet,self__.max_eid,self__.max_tx,self__.op_count,self__.rschema,self__.hash,self__.config,self__.system_entities,self__.ident_ref_map,self__.ref_ident_map,self__.meta,self__.__meta,self__.__extmap,null));
|
|
773
|
+
} else {
|
|
774
|
+
if(cljs.core.truth_((pred__58651.cljs$core$IFn$_invoke$arity$2 ? pred__58651.cljs$core$IFn$_invoke$arity$2(new cljs.core.Keyword(null,"avet","avet",1383857032),expr__58652) : pred__58651.call(null, new cljs.core.Keyword(null,"avet","avet",1383857032),expr__58652)))){
|
|
775
|
+
return (new datahike.db.DB(self__.schema,self__.eavt,self__.aevt,G__58474,self__.temporal_eavt,self__.temporal_aevt,self__.temporal_avet,self__.max_eid,self__.max_tx,self__.op_count,self__.rschema,self__.hash,self__.config,self__.system_entities,self__.ident_ref_map,self__.ref_ident_map,self__.meta,self__.__meta,self__.__extmap,null));
|
|
776
|
+
} else {
|
|
777
|
+
if(cljs.core.truth_((pred__58651.cljs$core$IFn$_invoke$arity$2 ? pred__58651.cljs$core$IFn$_invoke$arity$2(new cljs.core.Keyword(null,"temporal-eavt","temporal-eavt",-1065512715),expr__58652) : pred__58651.call(null, new cljs.core.Keyword(null,"temporal-eavt","temporal-eavt",-1065512715),expr__58652)))){
|
|
778
|
+
return (new datahike.db.DB(self__.schema,self__.eavt,self__.aevt,self__.avet,G__58474,self__.temporal_aevt,self__.temporal_avet,self__.max_eid,self__.max_tx,self__.op_count,self__.rschema,self__.hash,self__.config,self__.system_entities,self__.ident_ref_map,self__.ref_ident_map,self__.meta,self__.__meta,self__.__extmap,null));
|
|
779
|
+
} else {
|
|
780
|
+
if(cljs.core.truth_((pred__58651.cljs$core$IFn$_invoke$arity$2 ? pred__58651.cljs$core$IFn$_invoke$arity$2(new cljs.core.Keyword(null,"temporal-aevt","temporal-aevt",341636346),expr__58652) : pred__58651.call(null, new cljs.core.Keyword(null,"temporal-aevt","temporal-aevt",341636346),expr__58652)))){
|
|
781
|
+
return (new datahike.db.DB(self__.schema,self__.eavt,self__.aevt,self__.avet,self__.temporal_eavt,G__58474,self__.temporal_avet,self__.max_eid,self__.max_tx,self__.op_count,self__.rschema,self__.hash,self__.config,self__.system_entities,self__.ident_ref_map,self__.ref_ident_map,self__.meta,self__.__meta,self__.__extmap,null));
|
|
782
|
+
} else {
|
|
783
|
+
if(cljs.core.truth_((pred__58651.cljs$core$IFn$_invoke$arity$2 ? pred__58651.cljs$core$IFn$_invoke$arity$2(new cljs.core.Keyword(null,"temporal-avet","temporal-avet",-558341228),expr__58652) : pred__58651.call(null, new cljs.core.Keyword(null,"temporal-avet","temporal-avet",-558341228),expr__58652)))){
|
|
784
|
+
return (new datahike.db.DB(self__.schema,self__.eavt,self__.aevt,self__.avet,self__.temporal_eavt,self__.temporal_aevt,G__58474,self__.max_eid,self__.max_tx,self__.op_count,self__.rschema,self__.hash,self__.config,self__.system_entities,self__.ident_ref_map,self__.ref_ident_map,self__.meta,self__.__meta,self__.__extmap,null));
|
|
785
|
+
} else {
|
|
786
|
+
if(cljs.core.truth_((pred__58651.cljs$core$IFn$_invoke$arity$2 ? pred__58651.cljs$core$IFn$_invoke$arity$2(new cljs.core.Keyword(null,"max-eid","max-eid",2134868075),expr__58652) : pred__58651.call(null, new cljs.core.Keyword(null,"max-eid","max-eid",2134868075),expr__58652)))){
|
|
787
|
+
return (new datahike.db.DB(self__.schema,self__.eavt,self__.aevt,self__.avet,self__.temporal_eavt,self__.temporal_aevt,self__.temporal_avet,G__58474,self__.max_tx,self__.op_count,self__.rschema,self__.hash,self__.config,self__.system_entities,self__.ident_ref_map,self__.ref_ident_map,self__.meta,self__.__meta,self__.__extmap,null));
|
|
788
|
+
} else {
|
|
789
|
+
if(cljs.core.truth_((pred__58651.cljs$core$IFn$_invoke$arity$2 ? pred__58651.cljs$core$IFn$_invoke$arity$2(new cljs.core.Keyword(null,"max-tx","max-tx",1119558339),expr__58652) : pred__58651.call(null, new cljs.core.Keyword(null,"max-tx","max-tx",1119558339),expr__58652)))){
|
|
790
|
+
return (new datahike.db.DB(self__.schema,self__.eavt,self__.aevt,self__.avet,self__.temporal_eavt,self__.temporal_aevt,self__.temporal_avet,self__.max_eid,G__58474,self__.op_count,self__.rschema,self__.hash,self__.config,self__.system_entities,self__.ident_ref_map,self__.ref_ident_map,self__.meta,self__.__meta,self__.__extmap,null));
|
|
791
|
+
} else {
|
|
792
|
+
if(cljs.core.truth_((pred__58651.cljs$core$IFn$_invoke$arity$2 ? pred__58651.cljs$core$IFn$_invoke$arity$2(new cljs.core.Keyword(null,"op-count","op-count",-1218914478),expr__58652) : pred__58651.call(null, new cljs.core.Keyword(null,"op-count","op-count",-1218914478),expr__58652)))){
|
|
793
|
+
return (new datahike.db.DB(self__.schema,self__.eavt,self__.aevt,self__.avet,self__.temporal_eavt,self__.temporal_aevt,self__.temporal_avet,self__.max_eid,self__.max_tx,G__58474,self__.rschema,self__.hash,self__.config,self__.system_entities,self__.ident_ref_map,self__.ref_ident_map,self__.meta,self__.__meta,self__.__extmap,null));
|
|
794
|
+
} else {
|
|
795
|
+
if(cljs.core.truth_((pred__58651.cljs$core$IFn$_invoke$arity$2 ? pred__58651.cljs$core$IFn$_invoke$arity$2(new cljs.core.Keyword(null,"rschema","rschema",-1196134054),expr__58652) : pred__58651.call(null, new cljs.core.Keyword(null,"rschema","rschema",-1196134054),expr__58652)))){
|
|
796
|
+
return (new datahike.db.DB(self__.schema,self__.eavt,self__.aevt,self__.avet,self__.temporal_eavt,self__.temporal_aevt,self__.temporal_avet,self__.max_eid,self__.max_tx,self__.op_count,G__58474,self__.hash,self__.config,self__.system_entities,self__.ident_ref_map,self__.ref_ident_map,self__.meta,self__.__meta,self__.__extmap,null));
|
|
797
|
+
} else {
|
|
798
|
+
if(cljs.core.truth_((pred__58651.cljs$core$IFn$_invoke$arity$2 ? pred__58651.cljs$core$IFn$_invoke$arity$2(new cljs.core.Keyword(null,"hash","hash",-13781596),expr__58652) : pred__58651.call(null, new cljs.core.Keyword(null,"hash","hash",-13781596),expr__58652)))){
|
|
799
|
+
return (new datahike.db.DB(self__.schema,self__.eavt,self__.aevt,self__.avet,self__.temporal_eavt,self__.temporal_aevt,self__.temporal_avet,self__.max_eid,self__.max_tx,self__.op_count,self__.rschema,G__58474,self__.config,self__.system_entities,self__.ident_ref_map,self__.ref_ident_map,self__.meta,self__.__meta,self__.__extmap,null));
|
|
800
|
+
} else {
|
|
801
|
+
if(cljs.core.truth_((pred__58651.cljs$core$IFn$_invoke$arity$2 ? pred__58651.cljs$core$IFn$_invoke$arity$2(new cljs.core.Keyword(null,"config","config",994861415),expr__58652) : pred__58651.call(null, new cljs.core.Keyword(null,"config","config",994861415),expr__58652)))){
|
|
802
|
+
return (new datahike.db.DB(self__.schema,self__.eavt,self__.aevt,self__.avet,self__.temporal_eavt,self__.temporal_aevt,self__.temporal_avet,self__.max_eid,self__.max_tx,self__.op_count,self__.rschema,self__.hash,G__58474,self__.system_entities,self__.ident_ref_map,self__.ref_ident_map,self__.meta,self__.__meta,self__.__extmap,null));
|
|
803
|
+
} else {
|
|
804
|
+
if(cljs.core.truth_((pred__58651.cljs$core$IFn$_invoke$arity$2 ? pred__58651.cljs$core$IFn$_invoke$arity$2(new cljs.core.Keyword(null,"system-entities","system-entities",-1452000411),expr__58652) : pred__58651.call(null, new cljs.core.Keyword(null,"system-entities","system-entities",-1452000411),expr__58652)))){
|
|
805
|
+
return (new datahike.db.DB(self__.schema,self__.eavt,self__.aevt,self__.avet,self__.temporal_eavt,self__.temporal_aevt,self__.temporal_avet,self__.max_eid,self__.max_tx,self__.op_count,self__.rschema,self__.hash,self__.config,G__58474,self__.ident_ref_map,self__.ref_ident_map,self__.meta,self__.__meta,self__.__extmap,null));
|
|
806
|
+
} else {
|
|
807
|
+
if(cljs.core.truth_((pred__58651.cljs$core$IFn$_invoke$arity$2 ? pred__58651.cljs$core$IFn$_invoke$arity$2(new cljs.core.Keyword(null,"ident-ref-map","ident-ref-map",1187514335),expr__58652) : pred__58651.call(null, new cljs.core.Keyword(null,"ident-ref-map","ident-ref-map",1187514335),expr__58652)))){
|
|
808
|
+
return (new datahike.db.DB(self__.schema,self__.eavt,self__.aevt,self__.avet,self__.temporal_eavt,self__.temporal_aevt,self__.temporal_avet,self__.max_eid,self__.max_tx,self__.op_count,self__.rschema,self__.hash,self__.config,self__.system_entities,G__58474,self__.ref_ident_map,self__.meta,self__.__meta,self__.__extmap,null));
|
|
809
|
+
} else {
|
|
810
|
+
if(cljs.core.truth_((pred__58651.cljs$core$IFn$_invoke$arity$2 ? pred__58651.cljs$core$IFn$_invoke$arity$2(new cljs.core.Keyword(null,"ref-ident-map","ref-ident-map",107296375),expr__58652) : pred__58651.call(null, new cljs.core.Keyword(null,"ref-ident-map","ref-ident-map",107296375),expr__58652)))){
|
|
811
|
+
return (new datahike.db.DB(self__.schema,self__.eavt,self__.aevt,self__.avet,self__.temporal_eavt,self__.temporal_aevt,self__.temporal_avet,self__.max_eid,self__.max_tx,self__.op_count,self__.rschema,self__.hash,self__.config,self__.system_entities,self__.ident_ref_map,G__58474,self__.meta,self__.__meta,self__.__extmap,null));
|
|
812
|
+
} else {
|
|
813
|
+
if(cljs.core.truth_((pred__58651.cljs$core$IFn$_invoke$arity$2 ? pred__58651.cljs$core$IFn$_invoke$arity$2(new cljs.core.Keyword(null,"meta","meta",1499536964),expr__58652) : pred__58651.call(null, new cljs.core.Keyword(null,"meta","meta",1499536964),expr__58652)))){
|
|
814
|
+
return (new datahike.db.DB(self__.schema,self__.eavt,self__.aevt,self__.avet,self__.temporal_eavt,self__.temporal_aevt,self__.temporal_avet,self__.max_eid,self__.max_tx,self__.op_count,self__.rschema,self__.hash,self__.config,self__.system_entities,self__.ident_ref_map,self__.ref_ident_map,G__58474,self__.__meta,self__.__extmap,null));
|
|
815
|
+
} else {
|
|
816
|
+
return (new datahike.db.DB(self__.schema,self__.eavt,self__.aevt,self__.avet,self__.temporal_eavt,self__.temporal_aevt,self__.temporal_avet,self__.max_eid,self__.max_tx,self__.op_count,self__.rschema,self__.hash,self__.config,self__.system_entities,self__.ident_ref_map,self__.ref_ident_map,self__.meta,self__.__meta,cljs.core.assoc.cljs$core$IFn$_invoke$arity$3(self__.__extmap,k__5309__auto__,G__58474),null));
|
|
817
|
+
}
|
|
818
|
+
}
|
|
819
|
+
}
|
|
820
|
+
}
|
|
821
|
+
}
|
|
822
|
+
}
|
|
823
|
+
}
|
|
824
|
+
}
|
|
825
|
+
}
|
|
826
|
+
}
|
|
827
|
+
}
|
|
828
|
+
}
|
|
829
|
+
}
|
|
830
|
+
}
|
|
831
|
+
}
|
|
832
|
+
}
|
|
833
|
+
}
|
|
834
|
+
}));
|
|
835
|
+
|
|
836
|
+
(datahike.db.DB.prototype.cljs$core$ISeqable$_seq$arity$1 = (function (this__5313__auto__){
|
|
837
|
+
var self__ = this;
|
|
838
|
+
var this__5313__auto____$1 = this;
|
|
839
|
+
return cljs.core.seq(cljs.core.concat.cljs$core$IFn$_invoke$arity$2(new cljs.core.PersistentVector(null, 17, 5, cljs.core.PersistentVector.EMPTY_NODE, [(new cljs.core.MapEntry(new cljs.core.Keyword(null,"schema","schema",-1582001791),self__.schema,null)),(new cljs.core.MapEntry(new cljs.core.Keyword(null,"eavt","eavt",-666437073),self__.eavt,null)),(new cljs.core.MapEntry(new cljs.core.Keyword(null,"aevt","aevt",-585148059),self__.aevt,null)),(new cljs.core.MapEntry(new cljs.core.Keyword(null,"avet","avet",1383857032),self__.avet,null)),(new cljs.core.MapEntry(new cljs.core.Keyword(null,"temporal-eavt","temporal-eavt",-1065512715),self__.temporal_eavt,null)),(new cljs.core.MapEntry(new cljs.core.Keyword(null,"temporal-aevt","temporal-aevt",341636346),self__.temporal_aevt,null)),(new cljs.core.MapEntry(new cljs.core.Keyword(null,"temporal-avet","temporal-avet",-558341228),self__.temporal_avet,null)),(new cljs.core.MapEntry(new cljs.core.Keyword(null,"max-eid","max-eid",2134868075),self__.max_eid,null)),(new cljs.core.MapEntry(new cljs.core.Keyword(null,"max-tx","max-tx",1119558339),self__.max_tx,null)),(new cljs.core.MapEntry(new cljs.core.Keyword(null,"op-count","op-count",-1218914478),self__.op_count,null)),(new cljs.core.MapEntry(new cljs.core.Keyword(null,"rschema","rschema",-1196134054),self__.rschema,null)),(new cljs.core.MapEntry(new cljs.core.Keyword(null,"hash","hash",-13781596),self__.hash,null)),(new cljs.core.MapEntry(new cljs.core.Keyword(null,"config","config",994861415),self__.config,null)),(new cljs.core.MapEntry(new cljs.core.Keyword(null,"system-entities","system-entities",-1452000411),self__.system_entities,null)),(new cljs.core.MapEntry(new cljs.core.Keyword(null,"ident-ref-map","ident-ref-map",1187514335),self__.ident_ref_map,null)),(new cljs.core.MapEntry(new cljs.core.Keyword(null,"ref-ident-map","ref-ident-map",107296375),self__.ref_ident_map,null)),(new cljs.core.MapEntry(new cljs.core.Keyword(null,"meta","meta",1499536964),self__.meta,null))], null),self__.__extmap));
|
|
840
|
+
}));
|
|
841
|
+
|
|
842
|
+
(datahike.db.DB.prototype.cljs$core$IWithMeta$_with_meta$arity$2 = (function (this__5299__auto__,G__58474){
|
|
843
|
+
var self__ = this;
|
|
844
|
+
var this__5299__auto____$1 = this;
|
|
845
|
+
return (new datahike.db.DB(self__.schema,self__.eavt,self__.aevt,self__.avet,self__.temporal_eavt,self__.temporal_aevt,self__.temporal_avet,self__.max_eid,self__.max_tx,self__.op_count,self__.rschema,self__.hash,self__.config,self__.system_entities,self__.ident_ref_map,self__.ref_ident_map,self__.meta,G__58474,self__.__extmap,self__.__hash));
|
|
846
|
+
}));
|
|
847
|
+
|
|
848
|
+
(datahike.db.DB.prototype.cljs$core$ICollection$_conj$arity$2 = (function (this__5305__auto__,entry__5306__auto__){
|
|
849
|
+
var self__ = this;
|
|
850
|
+
var this__5305__auto____$1 = this;
|
|
851
|
+
if(cljs.core.vector_QMARK_(entry__5306__auto__)){
|
|
852
|
+
return this__5305__auto____$1.cljs$core$IAssociative$_assoc$arity$3(null, cljs.core._nth(entry__5306__auto__,(0)),cljs.core._nth(entry__5306__auto__,(1)));
|
|
853
|
+
} else {
|
|
854
|
+
return cljs.core.reduce.cljs$core$IFn$_invoke$arity$3(cljs.core._conj,this__5305__auto____$1,entry__5306__auto__);
|
|
855
|
+
}
|
|
856
|
+
}));
|
|
857
|
+
|
|
858
|
+
(datahike.db.DB.getBasis = (function (){
|
|
859
|
+
return new cljs.core.PersistentVector(null, 17, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Symbol(null,"schema","schema",58529736,null),new cljs.core.Symbol(null,"eavt","eavt",974094454,null),new cljs.core.Symbol(null,"aevt","aevt",1055383468,null),new cljs.core.Symbol(null,"avet","avet",-1270578737,null),new cljs.core.Symbol(null,"temporal-eavt","temporal-eavt",575018812,null),new cljs.core.Symbol(null,"temporal-aevt","temporal-aevt",1982167873,null),new cljs.core.Symbol(null,"temporal-avet","temporal-avet",1082190299,null),new cljs.core.Symbol(null,"max-eid","max-eid",-519567694,null),new cljs.core.Symbol(null,"max-tx","max-tx",-1534877430,null),new cljs.core.Symbol(null,"op-count","op-count",421617049,null),new cljs.core.Symbol(null,"rschema","rschema",444397473,null),new cljs.core.Symbol(null,"hash","hash",1626749931,null),new cljs.core.Symbol(null,"config","config",-1659574354,null),new cljs.core.Symbol(null,"system-entities","system-entities",188531116,null),new cljs.core.Symbol(null,"ident-ref-map","ident-ref-map",-1466921434,null),new cljs.core.Symbol(null,"ref-ident-map","ref-ident-map",1747827902,null),new cljs.core.Symbol(null,"meta","meta",-1154898805,null)], null);
|
|
860
|
+
}));
|
|
861
|
+
|
|
862
|
+
(datahike.db.DB.cljs$lang$type = true);
|
|
863
|
+
|
|
864
|
+
(datahike.db.DB.cljs$lang$ctorPrSeq = (function (this__5346__auto__){
|
|
865
|
+
return (new cljs.core.List(null,"datahike.db/DB",null,(1),null));
|
|
866
|
+
}));
|
|
867
|
+
|
|
868
|
+
(datahike.db.DB.cljs$lang$ctorPrWriter = (function (this__5346__auto__,writer__5347__auto__){
|
|
869
|
+
return cljs.core._write(writer__5347__auto__,"datahike.db/DB");
|
|
870
|
+
}));
|
|
871
|
+
|
|
872
|
+
/**
|
|
873
|
+
* Positional factory function for datahike.db/DB.
|
|
874
|
+
*/
|
|
875
|
+
datahike.db.__GT_DB = (function datahike$db$__GT_DB(schema,eavt,aevt,avet,temporal_eavt,temporal_aevt,temporal_avet,max_eid,max_tx,op_count,rschema,hash,config,system_entities,ident_ref_map,ref_ident_map,meta){
|
|
876
|
+
return (new datahike.db.DB(schema,eavt,aevt,avet,temporal_eavt,temporal_aevt,temporal_avet,max_eid,max_tx,op_count,rschema,hash,config,system_entities,ident_ref_map,ref_ident_map,meta,null,null,null));
|
|
877
|
+
});
|
|
878
|
+
|
|
879
|
+
/**
|
|
880
|
+
* Factory function for datahike.db/DB, taking a map of keywords to field values.
|
|
881
|
+
*/
|
|
882
|
+
datahike.db.map__GT_DB = (function datahike$db$map__GT_DB(G__58479){
|
|
883
|
+
var extmap__5342__auto__ = (function (){var G__58663 = cljs.core.dissoc.cljs$core$IFn$_invoke$arity$variadic(G__58479,new cljs.core.Keyword(null,"schema","schema",-1582001791),cljs.core.prim_seq.cljs$core$IFn$_invoke$arity$2([new cljs.core.Keyword(null,"eavt","eavt",-666437073),new cljs.core.Keyword(null,"aevt","aevt",-585148059),new cljs.core.Keyword(null,"avet","avet",1383857032),new cljs.core.Keyword(null,"temporal-eavt","temporal-eavt",-1065512715),new cljs.core.Keyword(null,"temporal-aevt","temporal-aevt",341636346),new cljs.core.Keyword(null,"temporal-avet","temporal-avet",-558341228),new cljs.core.Keyword(null,"max-eid","max-eid",2134868075),new cljs.core.Keyword(null,"max-tx","max-tx",1119558339),new cljs.core.Keyword(null,"op-count","op-count",-1218914478),new cljs.core.Keyword(null,"rschema","rschema",-1196134054),new cljs.core.Keyword(null,"hash","hash",-13781596),new cljs.core.Keyword(null,"config","config",994861415),new cljs.core.Keyword(null,"system-entities","system-entities",-1452000411),new cljs.core.Keyword(null,"ident-ref-map","ident-ref-map",1187514335),new cljs.core.Keyword(null,"ref-ident-map","ref-ident-map",107296375),new cljs.core.Keyword(null,"meta","meta",1499536964)], 0));
|
|
884
|
+
if(cljs.core.record_QMARK_(G__58479)){
|
|
885
|
+
return cljs.core.into.cljs$core$IFn$_invoke$arity$2(cljs.core.PersistentArrayMap.EMPTY,G__58663);
|
|
886
|
+
} else {
|
|
887
|
+
return G__58663;
|
|
888
|
+
}
|
|
889
|
+
})();
|
|
890
|
+
return (new datahike.db.DB(new cljs.core.Keyword(null,"schema","schema",-1582001791).cljs$core$IFn$_invoke$arity$1(G__58479),new cljs.core.Keyword(null,"eavt","eavt",-666437073).cljs$core$IFn$_invoke$arity$1(G__58479),new cljs.core.Keyword(null,"aevt","aevt",-585148059).cljs$core$IFn$_invoke$arity$1(G__58479),new cljs.core.Keyword(null,"avet","avet",1383857032).cljs$core$IFn$_invoke$arity$1(G__58479),new cljs.core.Keyword(null,"temporal-eavt","temporal-eavt",-1065512715).cljs$core$IFn$_invoke$arity$1(G__58479),new cljs.core.Keyword(null,"temporal-aevt","temporal-aevt",341636346).cljs$core$IFn$_invoke$arity$1(G__58479),new cljs.core.Keyword(null,"temporal-avet","temporal-avet",-558341228).cljs$core$IFn$_invoke$arity$1(G__58479),new cljs.core.Keyword(null,"max-eid","max-eid",2134868075).cljs$core$IFn$_invoke$arity$1(G__58479),new cljs.core.Keyword(null,"max-tx","max-tx",1119558339).cljs$core$IFn$_invoke$arity$1(G__58479),new cljs.core.Keyword(null,"op-count","op-count",-1218914478).cljs$core$IFn$_invoke$arity$1(G__58479),new cljs.core.Keyword(null,"rschema","rschema",-1196134054).cljs$core$IFn$_invoke$arity$1(G__58479),new cljs.core.Keyword(null,"hash","hash",-13781596).cljs$core$IFn$_invoke$arity$1(G__58479),new cljs.core.Keyword(null,"config","config",994861415).cljs$core$IFn$_invoke$arity$1(G__58479),new cljs.core.Keyword(null,"system-entities","system-entities",-1452000411).cljs$core$IFn$_invoke$arity$1(G__58479),new cljs.core.Keyword(null,"ident-ref-map","ident-ref-map",1187514335).cljs$core$IFn$_invoke$arity$1(G__58479),new cljs.core.Keyword(null,"ref-ident-map","ref-ident-map",107296375).cljs$core$IFn$_invoke$arity$1(G__58479),new cljs.core.Keyword(null,"meta","meta",1499536964).cljs$core$IFn$_invoke$arity$1(G__58479),null,cljs.core.not_empty(extmap__5342__auto__),null));
|
|
891
|
+
});
|
|
892
|
+
|
|
893
|
+
|
|
894
|
+
(datahike.db.DB.prototype.datahike$db$interface$ISearch$ = cljs.core.PROTOCOL_SENTINEL);
|
|
895
|
+
|
|
896
|
+
(datahike.db.DB.prototype.datahike$db$interface$ISearch$_search_context$arity$1 = (function (db){
|
|
897
|
+
var db__$1 = this;
|
|
898
|
+
return datahike.db.interface$.base_context;
|
|
899
|
+
}));
|
|
900
|
+
|
|
901
|
+
(datahike.db.DB.prototype.datahike$db$interface$ISearch$_search$arity$3 = (function (db,pattern,context){
|
|
902
|
+
var db__$1 = this;
|
|
903
|
+
return datahike.db.contextual_search(db__$1,pattern,context);
|
|
904
|
+
}));
|
|
905
|
+
|
|
906
|
+
(datahike.db.DB.prototype.datahike$db$interface$ISearch$_batch_search$arity$4 = (function (db,pattern_mask,batch_fn,context){
|
|
907
|
+
var db__$1 = this;
|
|
908
|
+
return datahike.db.contextual_batch_search(db__$1,pattern_mask,batch_fn,context);
|
|
909
|
+
}));
|
|
910
|
+
|
|
911
|
+
(datahike.db.DB.prototype.datahike$db$interface$IIndexAccess$ = cljs.core.PROTOCOL_SENTINEL);
|
|
912
|
+
|
|
913
|
+
(datahike.db.DB.prototype.datahike$db$interface$IIndexAccess$_datoms$arity$4 = (function (db,index_type,cs,context){
|
|
914
|
+
var db__$1 = this;
|
|
915
|
+
return datahike.db.contextual_datoms(db__$1,index_type,cs,context);
|
|
916
|
+
}));
|
|
917
|
+
|
|
918
|
+
(datahike.db.DB.prototype.datahike$db$interface$IIndexAccess$_seek_datoms$arity$4 = (function (db,index_type,cs,context){
|
|
919
|
+
var db__$1 = this;
|
|
920
|
+
return datahike.db.contextual_seek_datoms(db__$1,index_type,cs,context);
|
|
921
|
+
}));
|
|
922
|
+
|
|
923
|
+
(datahike.db.DB.prototype.datahike$db$interface$IIndexAccess$_rseek_datoms$arity$4 = (function (db,index_type,cs,context){
|
|
924
|
+
var db__$1 = this;
|
|
925
|
+
return datahike.db.contextual_rseek_datoms(db__$1,index_type,cs,context);
|
|
926
|
+
}));
|
|
927
|
+
|
|
928
|
+
(datahike.db.DB.prototype.datahike$db$interface$IIndexAccess$_index_range$arity$5 = (function (db,attr,start,end,context){
|
|
929
|
+
var db__$1 = this;
|
|
930
|
+
return datahike.db.contextual_index_range(db__$1,db__$1.avet,attr,start,end,context);
|
|
931
|
+
}));
|
|
932
|
+
|
|
933
|
+
(datahike.db.DB.prototype.cljs$core$IPrintWithWriter$ = cljs.core.PROTOCOL_SENTINEL);
|
|
934
|
+
|
|
935
|
+
(datahike.db.DB.prototype.cljs$core$IPrintWithWriter$_pr_writer$arity$3 = (function (db,w,opts){
|
|
936
|
+
var db__$1 = this;
|
|
937
|
+
return (datahike.db.pr_db.cljs$core$IFn$_invoke$arity$3 ? datahike.db.pr_db.cljs$core$IFn$_invoke$arity$3(db__$1,w,opts) : datahike.db.pr_db.call(null, db__$1,w,opts));
|
|
938
|
+
}));
|
|
939
|
+
|
|
940
|
+
(datahike.db.DB.prototype.cljs$core$ICounted$ = cljs.core.PROTOCOL_SENTINEL);
|
|
941
|
+
|
|
942
|
+
(datahike.db.DB.prototype.cljs$core$ICounted$_count$arity$1 = (function (db){
|
|
943
|
+
var db__$1 = this;
|
|
944
|
+
return cljs.core.count(db__$1.eavt);
|
|
945
|
+
}));
|
|
946
|
+
|
|
947
|
+
(datahike.db.DB.prototype.cljs$core$IReversible$ = cljs.core.PROTOCOL_SENTINEL);
|
|
948
|
+
|
|
949
|
+
(datahike.db.DB.prototype.cljs$core$IReversible$_rseq$arity$1 = (function (db){
|
|
950
|
+
var db__$1 = this;
|
|
951
|
+
return cljs.core._rseq(db__$1.eavt);
|
|
952
|
+
}));
|
|
953
|
+
|
|
954
|
+
(datahike.db.DB.prototype.cljs$core$IHash$ = cljs.core.PROTOCOL_SENTINEL);
|
|
955
|
+
|
|
956
|
+
(datahike.db.DB.prototype.cljs$core$IHash$_hash$arity$1 = (function (db){
|
|
957
|
+
var db__$1 = this;
|
|
958
|
+
return db__$1.hash;
|
|
959
|
+
}));
|
|
960
|
+
|
|
961
|
+
(datahike.db.DB.prototype.cljs$core$IEquiv$ = cljs.core.PROTOCOL_SENTINEL);
|
|
962
|
+
|
|
963
|
+
(datahike.db.DB.prototype.cljs$core$IEquiv$_equiv$arity$2 = (function (db,other){
|
|
964
|
+
var db__$1 = this;
|
|
965
|
+
return (datahike.db.equiv_db.cljs$core$IFn$_invoke$arity$2 ? datahike.db.equiv_db.cljs$core$IFn$_invoke$arity$2(db__$1,other) : datahike.db.equiv_db.call(null, db__$1,other));
|
|
966
|
+
}));
|
|
967
|
+
|
|
968
|
+
(datahike.db.DB.prototype.cljs$core$IEditableCollection$ = cljs.core.PROTOCOL_SENTINEL);
|
|
969
|
+
|
|
970
|
+
(datahike.db.DB.prototype.cljs$core$IEditableCollection$_as_transient$arity$1 = (function (db){
|
|
971
|
+
var db__$1 = this;
|
|
972
|
+
return datahike.db.db_transient(db__$1);
|
|
973
|
+
}));
|
|
974
|
+
|
|
975
|
+
(datahike.db.DB.prototype.cljs$core$IEmptyableCollection$ = cljs.core.PROTOCOL_SENTINEL);
|
|
976
|
+
|
|
977
|
+
(datahike.db.DB.prototype.cljs$core$IEmptyableCollection$_empty$arity$1 = (function (db){
|
|
978
|
+
var db__$1 = this;
|
|
979
|
+
var G__58683 = datahike.schema.get_user_schema(db__$1);
|
|
980
|
+
return (datahike.db.empty_db.cljs$core$IFn$_invoke$arity$1 ? datahike.db.empty_db.cljs$core$IFn$_invoke$arity$1(G__58683) : datahike.db.empty_db.call(null, G__58683));
|
|
981
|
+
}));
|
|
982
|
+
|
|
983
|
+
(datahike.db.DB.prototype.clojure$data$Diff$ = cljs.core.PROTOCOL_SENTINEL);
|
|
984
|
+
|
|
985
|
+
(datahike.db.DB.prototype.clojure$data$Diff$diff_similar$arity$2 = (function (a,b){
|
|
986
|
+
var a__$1 = this;
|
|
987
|
+
var datoms_a = (function (){var G__58686 = a__$1.eavt;
|
|
988
|
+
var G__58687 = datahike.datom.datom.cljs$core$IFn$_invoke$arity$4((0),null,null,(536870912));
|
|
989
|
+
var G__58688 = datahike.datom.datom.cljs$core$IFn$_invoke$arity$4((2147483647),null,null,(2147483647));
|
|
990
|
+
var G__58689 = new cljs.core.Keyword(null,"eavt","eavt",-666437073);
|
|
991
|
+
return (datahike.index._slice.cljs$core$IFn$_invoke$arity$4 ? datahike.index._slice.cljs$core$IFn$_invoke$arity$4(G__58686,G__58687,G__58688,G__58689) : datahike.index._slice.call(null, G__58686,G__58687,G__58688,G__58689));
|
|
992
|
+
})();
|
|
993
|
+
var datoms_b = (function (){var G__58692 = new cljs.core.Keyword(null,"eavt","eavt",-666437073).cljs$core$IFn$_invoke$arity$1(b);
|
|
994
|
+
var G__58693 = datahike.datom.datom.cljs$core$IFn$_invoke$arity$4((0),null,null,(536870912));
|
|
995
|
+
var G__58694 = datahike.datom.datom.cljs$core$IFn$_invoke$arity$4((2147483647),null,null,(2147483647));
|
|
996
|
+
var G__58695 = new cljs.core.Keyword(null,"eavt","eavt",-666437073);
|
|
997
|
+
return (datahike.index._slice.cljs$core$IFn$_invoke$arity$4 ? datahike.index._slice.cljs$core$IFn$_invoke$arity$4(G__58692,G__58693,G__58694,G__58695) : datahike.index._slice.call(null, G__58692,G__58693,G__58694,G__58695));
|
|
998
|
+
})();
|
|
999
|
+
return datahike.datom.diff_sorted(datoms_a,datoms_b,datahike.datom.cmp_datoms_eavt_quick);
|
|
1000
|
+
}));
|
|
1001
|
+
|
|
1002
|
+
(datahike.db.DB.prototype.clojure$data$EqualityPartition$ = cljs.core.PROTOCOL_SENTINEL);
|
|
1003
|
+
|
|
1004
|
+
(datahike.db.DB.prototype.clojure$data$EqualityPartition$equality_partition$arity$1 = (function (x){
|
|
1005
|
+
var x__$1 = this;
|
|
1006
|
+
return new cljs.core.Keyword("datahike","db","datahike/db",-1855969532);
|
|
1007
|
+
}));
|
|
1008
|
+
|
|
1009
|
+
(datahike.db.DB.prototype.cljs$core$ITransientCollection$ = cljs.core.PROTOCOL_SENTINEL);
|
|
1010
|
+
|
|
1011
|
+
(datahike.db.DB.prototype.cljs$core$ITransientCollection$_conj_BANG_$arity$2 = (function (db,key){
|
|
1012
|
+
var db__$1 = this;
|
|
1013
|
+
throw cljs.core.ex_info.cljs$core$IFn$_invoke$arity$2("datahike.DB/conj! is not supported",cljs.core.PersistentArrayMap.EMPTY);
|
|
1014
|
+
}));
|
|
1015
|
+
|
|
1016
|
+
(datahike.db.DB.prototype.cljs$core$ITransientCollection$_persistent_BANG_$arity$1 = (function (db){
|
|
1017
|
+
var db__$1 = this;
|
|
1018
|
+
return datahike.db.db_persistent_BANG_(db__$1);
|
|
1019
|
+
}));
|
|
1020
|
+
|
|
1021
|
+
(datahike.db.DB.prototype.datahike$db$interface$IDB$ = cljs.core.PROTOCOL_SENTINEL);
|
|
1022
|
+
|
|
1023
|
+
(datahike.db.DB.prototype.datahike$db$interface$IDB$_schema$arity$1 = (function (db){
|
|
1024
|
+
var db__$1 = this;
|
|
1025
|
+
return db__$1.schema;
|
|
1026
|
+
}));
|
|
1027
|
+
|
|
1028
|
+
(datahike.db.DB.prototype.datahike$db$interface$IDB$_rschema$arity$1 = (function (db){
|
|
1029
|
+
var db__$1 = this;
|
|
1030
|
+
return db__$1.rschema;
|
|
1031
|
+
}));
|
|
1032
|
+
|
|
1033
|
+
(datahike.db.DB.prototype.datahike$db$interface$IDB$_system_entities$arity$1 = (function (db){
|
|
1034
|
+
var db__$1 = this;
|
|
1035
|
+
return db__$1.system_entities;
|
|
1036
|
+
}));
|
|
1037
|
+
|
|
1038
|
+
(datahike.db.DB.prototype.datahike$db$interface$IDB$_attrs_by$arity$2 = (function (db,property){
|
|
1039
|
+
var db__$1 = this;
|
|
1040
|
+
var fexpr__58703 = db__$1.rschema;
|
|
1041
|
+
return (fexpr__58703.cljs$core$IFn$_invoke$arity$1 ? fexpr__58703.cljs$core$IFn$_invoke$arity$1(property) : fexpr__58703.call(null, property));
|
|
1042
|
+
}));
|
|
1043
|
+
|
|
1044
|
+
(datahike.db.DB.prototype.datahike$db$interface$IDB$_temporal_index_QMARK_$arity$1 = (function (db){
|
|
1045
|
+
var db__$1 = this;
|
|
1046
|
+
return datahike.db.interface$._keep_history_QMARK_(db__$1);
|
|
1047
|
+
}));
|
|
1048
|
+
|
|
1049
|
+
(datahike.db.DB.prototype.datahike$db$interface$IDB$_keep_history_QMARK_$arity$1 = (function (db){
|
|
1050
|
+
var db__$1 = this;
|
|
1051
|
+
return new cljs.core.Keyword(null,"keep-history?","keep-history?",1081751619).cljs$core$IFn$_invoke$arity$1(db__$1.config);
|
|
1052
|
+
}));
|
|
1053
|
+
|
|
1054
|
+
(datahike.db.DB.prototype.datahike$db$interface$IDB$_max_tx$arity$1 = (function (db){
|
|
1055
|
+
var db__$1 = this;
|
|
1056
|
+
return db__$1.max_tx;
|
|
1057
|
+
}));
|
|
1058
|
+
|
|
1059
|
+
(datahike.db.DB.prototype.datahike$db$interface$IDB$_max_eid$arity$1 = (function (db){
|
|
1060
|
+
var db__$1 = this;
|
|
1061
|
+
return db__$1.max_eid;
|
|
1062
|
+
}));
|
|
1063
|
+
|
|
1064
|
+
(datahike.db.DB.prototype.datahike$db$interface$IDB$_config$arity$1 = (function (db){
|
|
1065
|
+
var db__$1 = this;
|
|
1066
|
+
return db__$1.config;
|
|
1067
|
+
}));
|
|
1068
|
+
|
|
1069
|
+
(datahike.db.DB.prototype.datahike$db$interface$IDB$_ref_for$arity$2 = (function (db,a_ident){
|
|
1070
|
+
var db__$1 = this;
|
|
1071
|
+
if(cljs.core.truth_(new cljs.core.Keyword(null,"attribute-refs?","attribute-refs?",-1070298065).cljs$core$IFn$_invoke$arity$1(db__$1.config))){
|
|
1072
|
+
var ref = cljs.core.get.cljs$core$IFn$_invoke$arity$2(db__$1.ident_ref_map,a_ident);
|
|
1073
|
+
if((ref == null)){
|
|
1074
|
+
taoensso.timbre._log_BANG_.cljs$core$IFn$_invoke$arity$14(taoensso.timbre._STAR_config_STAR_,new cljs.core.Keyword(null,"warn","warn",-436710552),"datahike.db","file:/home/christian-weilbach/Development/datahike/src/datahike/db.cljc",319,19,new cljs.core.Keyword(null,"p","p",151049309),new cljs.core.Keyword(null,"auto","auto",-566279492),(new cljs.core.Delay((function (){
|
|
1075
|
+
return new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [["Attribute ",cljs.core.str.cljs$core$IFn$_invoke$arity$1(a_ident)," has not been found in database"].join('')], null);
|
|
1076
|
+
}),null)),null,(246),null,null,null);
|
|
1077
|
+
} else {
|
|
1078
|
+
}
|
|
1079
|
+
|
|
1080
|
+
return ref;
|
|
1081
|
+
} else {
|
|
1082
|
+
return a_ident;
|
|
1083
|
+
}
|
|
1084
|
+
}));
|
|
1085
|
+
|
|
1086
|
+
(datahike.db.DB.prototype.datahike$db$interface$IDB$_ident_for$arity$2 = (function (db,a_ref){
|
|
1087
|
+
var db__$1 = this;
|
|
1088
|
+
if(cljs.core.truth_(new cljs.core.Keyword(null,"attribute-refs?","attribute-refs?",-1070298065).cljs$core$IFn$_invoke$arity$1(db__$1.config))){
|
|
1089
|
+
var a_ident = cljs.core.get.cljs$core$IFn$_invoke$arity$2(db__$1.ref_ident_map,a_ref);
|
|
1090
|
+
if((a_ident == null)){
|
|
1091
|
+
taoensso.timbre._log_BANG_.cljs$core$IFn$_invoke$arity$14(taoensso.timbre._STAR_config_STAR_,new cljs.core.Keyword(null,"warn","warn",-436710552),"datahike.db","file:/home/christian-weilbach/Development/datahike/src/datahike/db.cljc",326,21,new cljs.core.Keyword(null,"p","p",151049309),new cljs.core.Keyword(null,"auto","auto",-566279492),(new cljs.core.Delay((function (){
|
|
1092
|
+
return new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [["Attribute with reference number ",cljs.core.str.cljs$core$IFn$_invoke$arity$1(a_ref)," has not been found in database"].join('')], null);
|
|
1093
|
+
}),null)),null,(247),null,null,null);
|
|
1094
|
+
} else {
|
|
1095
|
+
}
|
|
1096
|
+
|
|
1097
|
+
return a_ident;
|
|
1098
|
+
} else {
|
|
1099
|
+
return a_ref;
|
|
1100
|
+
}
|
|
1101
|
+
}));
|
|
1102
|
+
|
|
1103
|
+
(datahike.db.DB.prototype.cljs$core$ISeqable$ = cljs.core.PROTOCOL_SENTINEL);
|
|
1104
|
+
|
|
1105
|
+
(datahike.db.DB.prototype.cljs$core$ISeqable$_seq$arity$1 = (function (db){
|
|
1106
|
+
var db__$1 = this;
|
|
1107
|
+
var G__58707 = db__$1.eavt;
|
|
1108
|
+
return (datahike.index._seq.cljs$core$IFn$_invoke$arity$1 ? datahike.index._seq.cljs$core$IFn$_invoke$arity$1(G__58707) : datahike.index._seq.call(null, G__58707));
|
|
1109
|
+
}));
|
|
1110
|
+
|
|
1111
|
+
/**
|
|
1112
|
+
* @constructor
|
|
1113
|
+
* @implements {cljs.core.IRecord}
|
|
1114
|
+
* @implements {cljs.core.IKVReduce}
|
|
1115
|
+
* @implements {cljs.core.IEquiv}
|
|
1116
|
+
* @implements {cljs.core.IHash}
|
|
1117
|
+
* @implements {cljs.core.ICollection}
|
|
1118
|
+
* @implements {cljs.core.ICounted}
|
|
1119
|
+
* @implements {cljs.core.ISeqable}
|
|
1120
|
+
* @implements {cljs.core.IMeta}
|
|
1121
|
+
* @implements {cljs.core.ICloneable}
|
|
1122
|
+
* @implements {cljs.core.IPrintWithWriter}
|
|
1123
|
+
* @implements {cljs.core.IIterable}
|
|
1124
|
+
* @implements {cljs.core.IWithMeta}
|
|
1125
|
+
* @implements {cljs.core.IAssociative}
|
|
1126
|
+
* @implements {cljs.core.IMap}
|
|
1127
|
+
* @implements {cljs.core.ILookup}
|
|
1128
|
+
*/
|
|
1129
|
+
datahike.db.FilteredDB = (function (unfiltered_db,pred,__meta,__extmap,__hash){
|
|
1130
|
+
this.unfiltered_db = unfiltered_db;
|
|
1131
|
+
this.pred = pred;
|
|
1132
|
+
this.__meta = __meta;
|
|
1133
|
+
this.__extmap = __extmap;
|
|
1134
|
+
this.__hash = __hash;
|
|
1135
|
+
this.cljs$lang$protocol_mask$partition0$ = 2230716170;
|
|
1136
|
+
this.cljs$lang$protocol_mask$partition1$ = 139264;
|
|
1137
|
+
});
|
|
1138
|
+
(datahike.db.FilteredDB.prototype.cljs$core$ILookup$_lookup$arity$2 = (function (this__5300__auto__,k__5301__auto__){
|
|
1139
|
+
var self__ = this;
|
|
1140
|
+
var this__5300__auto____$1 = this;
|
|
1141
|
+
return this__5300__auto____$1.cljs$core$ILookup$_lookup$arity$3(null, k__5301__auto__,null);
|
|
1142
|
+
}));
|
|
1143
|
+
|
|
1144
|
+
(datahike.db.FilteredDB.prototype.cljs$core$ILookup$_lookup$arity$3 = (function (this__5302__auto__,k58716,else__5303__auto__){
|
|
1145
|
+
var self__ = this;
|
|
1146
|
+
var this__5302__auto____$1 = this;
|
|
1147
|
+
var G__58723 = k58716;
|
|
1148
|
+
var G__58723__$1 = (((G__58723 instanceof cljs.core.Keyword))?G__58723.fqn:null);
|
|
1149
|
+
switch (G__58723__$1) {
|
|
1150
|
+
case "unfiltered-db":
|
|
1151
|
+
return self__.unfiltered_db;
|
|
1152
|
+
|
|
1153
|
+
break;
|
|
1154
|
+
case "pred":
|
|
1155
|
+
return self__.pred;
|
|
1156
|
+
|
|
1157
|
+
break;
|
|
1158
|
+
default:
|
|
1159
|
+
return cljs.core.get.cljs$core$IFn$_invoke$arity$3(self__.__extmap,k58716,else__5303__auto__);
|
|
1160
|
+
|
|
1161
|
+
}
|
|
1162
|
+
}));
|
|
1163
|
+
|
|
1164
|
+
(datahike.db.FilteredDB.prototype.cljs$core$IKVReduce$_kv_reduce$arity$3 = (function (this__5320__auto__,f__5321__auto__,init__5322__auto__){
|
|
1165
|
+
var self__ = this;
|
|
1166
|
+
var this__5320__auto____$1 = this;
|
|
1167
|
+
return cljs.core.reduce.cljs$core$IFn$_invoke$arity$3((function (ret__5323__auto__,p__58725){
|
|
1168
|
+
var vec__58727 = p__58725;
|
|
1169
|
+
var k__5324__auto__ = cljs.core.nth.cljs$core$IFn$_invoke$arity$3(vec__58727,(0),null);
|
|
1170
|
+
var v__5325__auto__ = cljs.core.nth.cljs$core$IFn$_invoke$arity$3(vec__58727,(1),null);
|
|
1171
|
+
return (f__5321__auto__.cljs$core$IFn$_invoke$arity$3 ? f__5321__auto__.cljs$core$IFn$_invoke$arity$3(ret__5323__auto__,k__5324__auto__,v__5325__auto__) : f__5321__auto__.call(null, ret__5323__auto__,k__5324__auto__,v__5325__auto__));
|
|
1172
|
+
}),init__5322__auto__,this__5320__auto____$1);
|
|
1173
|
+
}));
|
|
1174
|
+
|
|
1175
|
+
(datahike.db.FilteredDB.prototype.cljs$core$IPrintWithWriter$_pr_writer$arity$3 = (function (this__5315__auto__,writer__5316__auto__,opts__5317__auto__){
|
|
1176
|
+
var self__ = this;
|
|
1177
|
+
var this__5315__auto____$1 = this;
|
|
1178
|
+
var pr_pair__5318__auto__ = (function (keyval__5319__auto__){
|
|
1179
|
+
return cljs.core.pr_sequential_writer(writer__5316__auto__,cljs.core.pr_writer,""," ","",opts__5317__auto__,keyval__5319__auto__);
|
|
1180
|
+
});
|
|
1181
|
+
return cljs.core.pr_sequential_writer(writer__5316__auto__,pr_pair__5318__auto__,"#datahike.db.FilteredDB{",", ","}",opts__5317__auto__,cljs.core.concat.cljs$core$IFn$_invoke$arity$2(new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [(new cljs.core.PersistentVector(null,2,(5),cljs.core.PersistentVector.EMPTY_NODE,[new cljs.core.Keyword(null,"unfiltered-db","unfiltered-db",-1363720391),self__.unfiltered_db],null)),(new cljs.core.PersistentVector(null,2,(5),cljs.core.PersistentVector.EMPTY_NODE,[new cljs.core.Keyword(null,"pred","pred",1927423397),self__.pred],null))], null),self__.__extmap));
|
|
1182
|
+
}));
|
|
1183
|
+
|
|
1184
|
+
(datahike.db.FilteredDB.prototype.cljs$core$IIterable$_iterator$arity$1 = (function (G__58715){
|
|
1185
|
+
var self__ = this;
|
|
1186
|
+
var G__58715__$1 = this;
|
|
1187
|
+
return (new cljs.core.RecordIter((0),G__58715__$1,2,new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"unfiltered-db","unfiltered-db",-1363720391),new cljs.core.Keyword(null,"pred","pred",1927423397)], null),(cljs.core.truth_(self__.__extmap)?cljs.core._iterator(self__.__extmap):cljs.core.nil_iter())));
|
|
1188
|
+
}));
|
|
1189
|
+
|
|
1190
|
+
(datahike.db.FilteredDB.prototype.cljs$core$IMeta$_meta$arity$1 = (function (this__5298__auto__){
|
|
1191
|
+
var self__ = this;
|
|
1192
|
+
var this__5298__auto____$1 = this;
|
|
1193
|
+
return self__.__meta;
|
|
1194
|
+
}));
|
|
1195
|
+
|
|
1196
|
+
(datahike.db.FilteredDB.prototype.cljs$core$ICloneable$_clone$arity$1 = (function (this__5295__auto__){
|
|
1197
|
+
var self__ = this;
|
|
1198
|
+
var this__5295__auto____$1 = this;
|
|
1199
|
+
return (new datahike.db.FilteredDB(self__.unfiltered_db,self__.pred,self__.__meta,self__.__extmap,self__.__hash));
|
|
1200
|
+
}));
|
|
1201
|
+
|
|
1202
|
+
(datahike.db.FilteredDB.prototype.cljs$core$ICounted$_count$arity$1 = (function (this__5304__auto__){
|
|
1203
|
+
var self__ = this;
|
|
1204
|
+
var this__5304__auto____$1 = this;
|
|
1205
|
+
return (2 + cljs.core.count(self__.__extmap));
|
|
1206
|
+
}));
|
|
1207
|
+
|
|
1208
|
+
(datahike.db.FilteredDB.prototype.cljs$core$IHash$_hash$arity$1 = (function (this__5296__auto__){
|
|
1209
|
+
var self__ = this;
|
|
1210
|
+
var this__5296__auto____$1 = this;
|
|
1211
|
+
var h__5111__auto__ = self__.__hash;
|
|
1212
|
+
if((!((h__5111__auto__ == null)))){
|
|
1213
|
+
return h__5111__auto__;
|
|
1214
|
+
} else {
|
|
1215
|
+
var h__5111__auto____$1 = (function (coll__5297__auto__){
|
|
1216
|
+
return (-974792198 ^ cljs.core.hash_unordered_coll(coll__5297__auto__));
|
|
1217
|
+
})(this__5296__auto____$1);
|
|
1218
|
+
(self__.__hash = h__5111__auto____$1);
|
|
1219
|
+
|
|
1220
|
+
return h__5111__auto____$1;
|
|
1221
|
+
}
|
|
1222
|
+
}));
|
|
1223
|
+
|
|
1224
|
+
(datahike.db.FilteredDB.prototype.cljs$core$IEquiv$_equiv$arity$2 = (function (this58717,other58718){
|
|
1225
|
+
var self__ = this;
|
|
1226
|
+
var this58717__$1 = this;
|
|
1227
|
+
return (((!((other58718 == null)))) && ((((this58717__$1.constructor === other58718.constructor)) && (((cljs.core._EQ_.cljs$core$IFn$_invoke$arity$2(this58717__$1.unfiltered_db,other58718.unfiltered_db)) && (((cljs.core._EQ_.cljs$core$IFn$_invoke$arity$2(this58717__$1.pred,other58718.pred)) && (cljs.core._EQ_.cljs$core$IFn$_invoke$arity$2(this58717__$1.__extmap,other58718.__extmap)))))))));
|
|
1228
|
+
}));
|
|
1229
|
+
|
|
1230
|
+
(datahike.db.FilteredDB.prototype.cljs$core$IMap$_dissoc$arity$2 = (function (this__5310__auto__,k__5311__auto__){
|
|
1231
|
+
var self__ = this;
|
|
1232
|
+
var this__5310__auto____$1 = this;
|
|
1233
|
+
if(cljs.core.contains_QMARK_(new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null,"pred","pred",1927423397),null,new cljs.core.Keyword(null,"unfiltered-db","unfiltered-db",-1363720391),null], null), null),k__5311__auto__)){
|
|
1234
|
+
return cljs.core.dissoc.cljs$core$IFn$_invoke$arity$2(cljs.core._with_meta(cljs.core.into.cljs$core$IFn$_invoke$arity$2(cljs.core.PersistentArrayMap.EMPTY,this__5310__auto____$1),self__.__meta),k__5311__auto__);
|
|
1235
|
+
} else {
|
|
1236
|
+
return (new datahike.db.FilteredDB(self__.unfiltered_db,self__.pred,self__.__meta,cljs.core.not_empty(cljs.core.dissoc.cljs$core$IFn$_invoke$arity$2(self__.__extmap,k__5311__auto__)),null));
|
|
1237
|
+
}
|
|
1238
|
+
}));
|
|
1239
|
+
|
|
1240
|
+
(datahike.db.FilteredDB.prototype.cljs$core$IAssociative$_contains_key_QMARK_$arity$2 = (function (this__5307__auto__,k58716){
|
|
1241
|
+
var self__ = this;
|
|
1242
|
+
var this__5307__auto____$1 = this;
|
|
1243
|
+
var G__58740 = k58716;
|
|
1244
|
+
var G__58740__$1 = (((G__58740 instanceof cljs.core.Keyword))?G__58740.fqn:null);
|
|
1245
|
+
switch (G__58740__$1) {
|
|
1246
|
+
case "unfiltered-db":
|
|
1247
|
+
case "pred":
|
|
1248
|
+
return true;
|
|
1249
|
+
|
|
1250
|
+
break;
|
|
1251
|
+
default:
|
|
1252
|
+
return cljs.core.contains_QMARK_(self__.__extmap,k58716);
|
|
1253
|
+
|
|
1254
|
+
}
|
|
1255
|
+
}));
|
|
1256
|
+
|
|
1257
|
+
(datahike.db.FilteredDB.prototype.cljs$core$IAssociative$_assoc$arity$3 = (function (this__5308__auto__,k__5309__auto__,G__58715){
|
|
1258
|
+
var self__ = this;
|
|
1259
|
+
var this__5308__auto____$1 = this;
|
|
1260
|
+
var pred__58741 = cljs.core.keyword_identical_QMARK_;
|
|
1261
|
+
var expr__58742 = k__5309__auto__;
|
|
1262
|
+
if(cljs.core.truth_((pred__58741.cljs$core$IFn$_invoke$arity$2 ? pred__58741.cljs$core$IFn$_invoke$arity$2(new cljs.core.Keyword(null,"unfiltered-db","unfiltered-db",-1363720391),expr__58742) : pred__58741.call(null, new cljs.core.Keyword(null,"unfiltered-db","unfiltered-db",-1363720391),expr__58742)))){
|
|
1263
|
+
return (new datahike.db.FilteredDB(G__58715,self__.pred,self__.__meta,self__.__extmap,null));
|
|
1264
|
+
} else {
|
|
1265
|
+
if(cljs.core.truth_((pred__58741.cljs$core$IFn$_invoke$arity$2 ? pred__58741.cljs$core$IFn$_invoke$arity$2(new cljs.core.Keyword(null,"pred","pred",1927423397),expr__58742) : pred__58741.call(null, new cljs.core.Keyword(null,"pred","pred",1927423397),expr__58742)))){
|
|
1266
|
+
return (new datahike.db.FilteredDB(self__.unfiltered_db,G__58715,self__.__meta,self__.__extmap,null));
|
|
1267
|
+
} else {
|
|
1268
|
+
return (new datahike.db.FilteredDB(self__.unfiltered_db,self__.pred,self__.__meta,cljs.core.assoc.cljs$core$IFn$_invoke$arity$3(self__.__extmap,k__5309__auto__,G__58715),null));
|
|
1269
|
+
}
|
|
1270
|
+
}
|
|
1271
|
+
}));
|
|
1272
|
+
|
|
1273
|
+
(datahike.db.FilteredDB.prototype.cljs$core$ISeqable$_seq$arity$1 = (function (this__5313__auto__){
|
|
1274
|
+
var self__ = this;
|
|
1275
|
+
var this__5313__auto____$1 = this;
|
|
1276
|
+
return cljs.core.seq(cljs.core.concat.cljs$core$IFn$_invoke$arity$2(new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [(new cljs.core.MapEntry(new cljs.core.Keyword(null,"unfiltered-db","unfiltered-db",-1363720391),self__.unfiltered_db,null)),(new cljs.core.MapEntry(new cljs.core.Keyword(null,"pred","pred",1927423397),self__.pred,null))], null),self__.__extmap));
|
|
1277
|
+
}));
|
|
1278
|
+
|
|
1279
|
+
(datahike.db.FilteredDB.prototype.cljs$core$IWithMeta$_with_meta$arity$2 = (function (this__5299__auto__,G__58715){
|
|
1280
|
+
var self__ = this;
|
|
1281
|
+
var this__5299__auto____$1 = this;
|
|
1282
|
+
return (new datahike.db.FilteredDB(self__.unfiltered_db,self__.pred,G__58715,self__.__extmap,self__.__hash));
|
|
1283
|
+
}));
|
|
1284
|
+
|
|
1285
|
+
(datahike.db.FilteredDB.prototype.cljs$core$ICollection$_conj$arity$2 = (function (this__5305__auto__,entry__5306__auto__){
|
|
1286
|
+
var self__ = this;
|
|
1287
|
+
var this__5305__auto____$1 = this;
|
|
1288
|
+
if(cljs.core.vector_QMARK_(entry__5306__auto__)){
|
|
1289
|
+
return this__5305__auto____$1.cljs$core$IAssociative$_assoc$arity$3(null, cljs.core._nth(entry__5306__auto__,(0)),cljs.core._nth(entry__5306__auto__,(1)));
|
|
1290
|
+
} else {
|
|
1291
|
+
return cljs.core.reduce.cljs$core$IFn$_invoke$arity$3(cljs.core._conj,this__5305__auto____$1,entry__5306__auto__);
|
|
1292
|
+
}
|
|
1293
|
+
}));
|
|
1294
|
+
|
|
1295
|
+
(datahike.db.FilteredDB.getBasis = (function (){
|
|
1296
|
+
return new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Symbol(null,"unfiltered-db","unfiltered-db",276811136,null),new cljs.core.Symbol(null,"pred","pred",-727012372,null)], null);
|
|
1297
|
+
}));
|
|
1298
|
+
|
|
1299
|
+
(datahike.db.FilteredDB.cljs$lang$type = true);
|
|
1300
|
+
|
|
1301
|
+
(datahike.db.FilteredDB.cljs$lang$ctorPrSeq = (function (this__5346__auto__){
|
|
1302
|
+
return (new cljs.core.List(null,"datahike.db/FilteredDB",null,(1),null));
|
|
1303
|
+
}));
|
|
1304
|
+
|
|
1305
|
+
(datahike.db.FilteredDB.cljs$lang$ctorPrWriter = (function (this__5346__auto__,writer__5347__auto__){
|
|
1306
|
+
return cljs.core._write(writer__5347__auto__,"datahike.db/FilteredDB");
|
|
1307
|
+
}));
|
|
1308
|
+
|
|
1309
|
+
/**
|
|
1310
|
+
* Positional factory function for datahike.db/FilteredDB.
|
|
1311
|
+
*/
|
|
1312
|
+
datahike.db.__GT_FilteredDB = (function datahike$db$__GT_FilteredDB(unfiltered_db,pred){
|
|
1313
|
+
return (new datahike.db.FilteredDB(unfiltered_db,pred,null,null,null));
|
|
1314
|
+
});
|
|
1315
|
+
|
|
1316
|
+
/**
|
|
1317
|
+
* Factory function for datahike.db/FilteredDB, taking a map of keywords to field values.
|
|
1318
|
+
*/
|
|
1319
|
+
datahike.db.map__GT_FilteredDB = (function datahike$db$map__GT_FilteredDB(G__58720){
|
|
1320
|
+
var extmap__5342__auto__ = (function (){var G__58750 = cljs.core.dissoc.cljs$core$IFn$_invoke$arity$variadic(G__58720,new cljs.core.Keyword(null,"unfiltered-db","unfiltered-db",-1363720391),cljs.core.prim_seq.cljs$core$IFn$_invoke$arity$2([new cljs.core.Keyword(null,"pred","pred",1927423397)], 0));
|
|
1321
|
+
if(cljs.core.record_QMARK_(G__58720)){
|
|
1322
|
+
return cljs.core.into.cljs$core$IFn$_invoke$arity$2(cljs.core.PersistentArrayMap.EMPTY,G__58750);
|
|
1323
|
+
} else {
|
|
1324
|
+
return G__58750;
|
|
1325
|
+
}
|
|
1326
|
+
})();
|
|
1327
|
+
return (new datahike.db.FilteredDB(new cljs.core.Keyword(null,"unfiltered-db","unfiltered-db",-1363720391).cljs$core$IFn$_invoke$arity$1(G__58720),new cljs.core.Keyword(null,"pred","pred",1927423397).cljs$core$IFn$_invoke$arity$1(G__58720),null,cljs.core.not_empty(extmap__5342__auto__),null));
|
|
1328
|
+
});
|
|
1329
|
+
|
|
1330
|
+
|
|
1331
|
+
(datahike.db.FilteredDB.prototype.datahike$db$interface$ISearch$ = cljs.core.PROTOCOL_SENTINEL);
|
|
1332
|
+
|
|
1333
|
+
(datahike.db.FilteredDB.prototype.datahike$db$interface$ISearch$_search_context$arity$1 = (function (db){
|
|
1334
|
+
var db__$1 = this;
|
|
1335
|
+
return datahike.db.interface$.context_with_xform_after(datahike.db.interface$._search_context(db__$1.unfiltered_db),cljs.core.filter.cljs$core$IFn$_invoke$arity$1(db__$1.pred));
|
|
1336
|
+
}));
|
|
1337
|
+
|
|
1338
|
+
(datahike.db.FilteredDB.prototype.datahike$db$interface$ISearch$_search$arity$3 = (function (db,pattern,context){
|
|
1339
|
+
var db__$1 = this;
|
|
1340
|
+
return datahike.db.interface$._search(db__$1.unfiltered_db,pattern,context);
|
|
1341
|
+
}));
|
|
1342
|
+
|
|
1343
|
+
(datahike.db.FilteredDB.prototype.datahike$db$interface$ISearch$_batch_search$arity$4 = (function (db,pattern_mask,batch_fn,context){
|
|
1344
|
+
var db__$1 = this;
|
|
1345
|
+
return datahike.db.interface$._batch_search(db__$1.unfiltered_db,pattern_mask,batch_fn,context);
|
|
1346
|
+
}));
|
|
1347
|
+
|
|
1348
|
+
(datahike.db.FilteredDB.prototype.datahike$db$interface$IIndexAccess$ = cljs.core.PROTOCOL_SENTINEL);
|
|
1349
|
+
|
|
1350
|
+
(datahike.db.FilteredDB.prototype.datahike$db$interface$IIndexAccess$_datoms$arity$4 = (function (db,index,cs,context){
|
|
1351
|
+
var db__$1 = this;
|
|
1352
|
+
return datahike.db.interface$._datoms(db__$1.unfiltered_db,index,cs,context);
|
|
1353
|
+
}));
|
|
1354
|
+
|
|
1355
|
+
(datahike.db.FilteredDB.prototype.datahike$db$interface$IIndexAccess$_seek_datoms$arity$4 = (function (db,index,cs,context){
|
|
1356
|
+
var db__$1 = this;
|
|
1357
|
+
return datahike.db.interface$._seek_datoms(db__$1.unfiltered_db,index,cs,context);
|
|
1358
|
+
}));
|
|
1359
|
+
|
|
1360
|
+
(datahike.db.FilteredDB.prototype.datahike$db$interface$IIndexAccess$_rseek_datoms$arity$4 = (function (db,index,cs,context){
|
|
1361
|
+
var db__$1 = this;
|
|
1362
|
+
return datahike.db.interface$._rseek_datoms(db__$1.unfiltered_db,index,cs,context);
|
|
1363
|
+
}));
|
|
1364
|
+
|
|
1365
|
+
(datahike.db.FilteredDB.prototype.datahike$db$interface$IIndexAccess$_index_range$arity$5 = (function (db,attr,start,end,context){
|
|
1366
|
+
var db__$1 = this;
|
|
1367
|
+
return datahike.db.deeper_index_range(db__$1.unfiltered_db,db__$1,attr,start,end,context);
|
|
1368
|
+
}));
|
|
1369
|
+
|
|
1370
|
+
(datahike.db.FilteredDB.prototype.cljs$core$ILookup$ = cljs.core.PROTOCOL_SENTINEL);
|
|
1371
|
+
|
|
1372
|
+
(datahike.db.FilteredDB.prototype.cljs$core$ILookup$_lookup$arity$2 = (function (_,___$1){
|
|
1373
|
+
var ___$2 = this;
|
|
1374
|
+
throw (new Error("-lookup is not supported on FilteredDB"));
|
|
1375
|
+
}));
|
|
1376
|
+
|
|
1377
|
+
(datahike.db.FilteredDB.prototype.cljs$core$ILookup$_lookup$arity$3 = (function (_,___$1,___$2){
|
|
1378
|
+
var ___$3 = this;
|
|
1379
|
+
throw (new Error("-lookup is not supported on FilteredDB"));
|
|
1380
|
+
}));
|
|
1381
|
+
|
|
1382
|
+
(datahike.db.FilteredDB.prototype.cljs$core$IPrintWithWriter$ = cljs.core.PROTOCOL_SENTINEL);
|
|
1383
|
+
|
|
1384
|
+
(datahike.db.FilteredDB.prototype.cljs$core$IPrintWithWriter$_pr_writer$arity$3 = (function (db,w,opts){
|
|
1385
|
+
var db__$1 = this;
|
|
1386
|
+
return (datahike.db.pr_db.cljs$core$IFn$_invoke$arity$3 ? datahike.db.pr_db.cljs$core$IFn$_invoke$arity$3(db__$1,w,opts) : datahike.db.pr_db.call(null, db__$1,w,opts));
|
|
1387
|
+
}));
|
|
1388
|
+
|
|
1389
|
+
(datahike.db.FilteredDB.prototype.cljs$core$ICounted$ = cljs.core.PROTOCOL_SENTINEL);
|
|
1390
|
+
|
|
1391
|
+
(datahike.db.FilteredDB.prototype.cljs$core$ICounted$_count$arity$1 = (function (db){
|
|
1392
|
+
var db__$1 = this;
|
|
1393
|
+
return cljs.core.count(datahike.db.interface$.datoms(db__$1,new cljs.core.Keyword(null,"eavt","eavt",-666437073),cljs.core.PersistentVector.EMPTY));
|
|
1394
|
+
}));
|
|
1395
|
+
|
|
1396
|
+
(datahike.db.FilteredDB.prototype.cljs$core$IEquiv$ = cljs.core.PROTOCOL_SENTINEL);
|
|
1397
|
+
|
|
1398
|
+
(datahike.db.FilteredDB.prototype.cljs$core$IEquiv$_equiv$arity$2 = (function (db,other){
|
|
1399
|
+
var db__$1 = this;
|
|
1400
|
+
return (datahike.db.equiv_db.cljs$core$IFn$_invoke$arity$2 ? datahike.db.equiv_db.cljs$core$IFn$_invoke$arity$2(db__$1,other) : datahike.db.equiv_db.call(null, db__$1,other));
|
|
1401
|
+
}));
|
|
1402
|
+
|
|
1403
|
+
(datahike.db.FilteredDB.prototype.cljs$core$IEmptyableCollection$ = cljs.core.PROTOCOL_SENTINEL);
|
|
1404
|
+
|
|
1405
|
+
(datahike.db.FilteredDB.prototype.cljs$core$IEmptyableCollection$_empty$arity$1 = (function (_){
|
|
1406
|
+
var ___$1 = this;
|
|
1407
|
+
throw (new Error("-empty is not supported on FilteredDB"));
|
|
1408
|
+
}));
|
|
1409
|
+
|
|
1410
|
+
(datahike.db.FilteredDB.prototype.datahike$db$interface$IDB$ = cljs.core.PROTOCOL_SENTINEL);
|
|
1411
|
+
|
|
1412
|
+
(datahike.db.FilteredDB.prototype.datahike$db$interface$IDB$_schema$arity$1 = (function (db){
|
|
1413
|
+
var db__$1 = this;
|
|
1414
|
+
return datahike.db.interface$._schema(db__$1.unfiltered_db);
|
|
1415
|
+
}));
|
|
1416
|
+
|
|
1417
|
+
(datahike.db.FilteredDB.prototype.datahike$db$interface$IDB$_rschema$arity$1 = (function (db){
|
|
1418
|
+
var db__$1 = this;
|
|
1419
|
+
return datahike.db.interface$._rschema(db__$1.unfiltered_db);
|
|
1420
|
+
}));
|
|
1421
|
+
|
|
1422
|
+
(datahike.db.FilteredDB.prototype.datahike$db$interface$IDB$_system_entities$arity$1 = (function (db){
|
|
1423
|
+
var db__$1 = this;
|
|
1424
|
+
return datahike.db.interface$._system_entities(db__$1.unfiltered_db);
|
|
1425
|
+
}));
|
|
1426
|
+
|
|
1427
|
+
(datahike.db.FilteredDB.prototype.datahike$db$interface$IDB$_attrs_by$arity$2 = (function (db,property){
|
|
1428
|
+
var db__$1 = this;
|
|
1429
|
+
return datahike.db.interface$._attrs_by(db__$1.unfiltered_db,property);
|
|
1430
|
+
}));
|
|
1431
|
+
|
|
1432
|
+
(datahike.db.FilteredDB.prototype.datahike$db$interface$IDB$_temporal_index_QMARK_$arity$1 = (function (db){
|
|
1433
|
+
var db__$1 = this;
|
|
1434
|
+
return datahike.db.interface$._keep_history_QMARK_(db__$1);
|
|
1435
|
+
}));
|
|
1436
|
+
|
|
1437
|
+
(datahike.db.FilteredDB.prototype.datahike$db$interface$IDB$_keep_history_QMARK_$arity$1 = (function (db){
|
|
1438
|
+
var db__$1 = this;
|
|
1439
|
+
return datahike.db.interface$._keep_history_QMARK_(db__$1.unfiltered_db);
|
|
1440
|
+
}));
|
|
1441
|
+
|
|
1442
|
+
(datahike.db.FilteredDB.prototype.datahike$db$interface$IDB$_max_tx$arity$1 = (function (db){
|
|
1443
|
+
var db__$1 = this;
|
|
1444
|
+
return datahike.db.interface$._max_tx(db__$1.unfiltered_db);
|
|
1445
|
+
}));
|
|
1446
|
+
|
|
1447
|
+
(datahike.db.FilteredDB.prototype.datahike$db$interface$IDB$_max_eid$arity$1 = (function (db){
|
|
1448
|
+
var db__$1 = this;
|
|
1449
|
+
return datahike.db.interface$._max_eid(db__$1.unfiltered_db);
|
|
1450
|
+
}));
|
|
1451
|
+
|
|
1452
|
+
(datahike.db.FilteredDB.prototype.datahike$db$interface$IDB$_config$arity$1 = (function (db){
|
|
1453
|
+
var db__$1 = this;
|
|
1454
|
+
return datahike.db.interface$._config(db__$1.unfiltered_db);
|
|
1455
|
+
}));
|
|
1456
|
+
|
|
1457
|
+
(datahike.db.FilteredDB.prototype.datahike$db$interface$IDB$_ref_for$arity$2 = (function (db,a_ident){
|
|
1458
|
+
var db__$1 = this;
|
|
1459
|
+
return datahike.db.interface$._ref_for(db__$1.unfiltered_db,a_ident);
|
|
1460
|
+
}));
|
|
1461
|
+
|
|
1462
|
+
(datahike.db.FilteredDB.prototype.datahike$db$interface$IDB$_ident_for$arity$2 = (function (db,a_ref){
|
|
1463
|
+
var db__$1 = this;
|
|
1464
|
+
return datahike.db.interface$._ident_for(db__$1.unfiltered_db,a_ref);
|
|
1465
|
+
}));
|
|
1466
|
+
|
|
1467
|
+
(datahike.db.FilteredDB.prototype.cljs$core$IAssociative$ = cljs.core.PROTOCOL_SENTINEL);
|
|
1468
|
+
|
|
1469
|
+
(datahike.db.FilteredDB.prototype.cljs$core$IAssociative$_contains_key_QMARK_$arity$2 = (function (_,___$1){
|
|
1470
|
+
var ___$2 = this;
|
|
1471
|
+
throw (new Error("-contains-key? is not supported on FilteredDB"));
|
|
1472
|
+
}));
|
|
1473
|
+
|
|
1474
|
+
(datahike.db.FilteredDB.prototype.cljs$core$IAssociative$_assoc$arity$3 = (function (_,___$1,___$2){
|
|
1475
|
+
var ___$3 = this;
|
|
1476
|
+
throw (new Error("-assoc is not supported on FilteredDB"));
|
|
1477
|
+
}));
|
|
1478
|
+
|
|
1479
|
+
(datahike.db.FilteredDB.prototype.cljs$core$ISeqable$ = cljs.core.PROTOCOL_SENTINEL);
|
|
1480
|
+
|
|
1481
|
+
(datahike.db.FilteredDB.prototype.cljs$core$ISeqable$_seq$arity$1 = (function (db){
|
|
1482
|
+
var db__$1 = this;
|
|
1483
|
+
return datahike.db.interface$.datoms(db__$1,new cljs.core.Keyword(null,"eavt","eavt",-666437073),cljs.core.PersistentVector.EMPTY);
|
|
1484
|
+
}));
|
|
1485
|
+
|
|
1486
|
+
/**
|
|
1487
|
+
* @constructor
|
|
1488
|
+
* @implements {cljs.core.IRecord}
|
|
1489
|
+
* @implements {cljs.core.IKVReduce}
|
|
1490
|
+
* @implements {cljs.core.IEquiv}
|
|
1491
|
+
* @implements {cljs.core.IHash}
|
|
1492
|
+
* @implements {cljs.core.ICollection}
|
|
1493
|
+
* @implements {cljs.core.ICounted}
|
|
1494
|
+
* @implements {cljs.core.ISeqable}
|
|
1495
|
+
* @implements {cljs.core.IMeta}
|
|
1496
|
+
* @implements {cljs.core.ICloneable}
|
|
1497
|
+
* @implements {cljs.core.IPrintWithWriter}
|
|
1498
|
+
* @implements {cljs.core.IIterable}
|
|
1499
|
+
* @implements {cljs.core.IWithMeta}
|
|
1500
|
+
* @implements {cljs.core.IAssociative}
|
|
1501
|
+
* @implements {cljs.core.IMap}
|
|
1502
|
+
* @implements {cljs.core.ILookup}
|
|
1503
|
+
*/
|
|
1504
|
+
datahike.db.HistoricalDB = (function (origin_db,__meta,__extmap,__hash){
|
|
1505
|
+
this.origin_db = origin_db;
|
|
1506
|
+
this.__meta = __meta;
|
|
1507
|
+
this.__extmap = __extmap;
|
|
1508
|
+
this.__hash = __hash;
|
|
1509
|
+
this.cljs$lang$protocol_mask$partition0$ = 2230716170;
|
|
1510
|
+
this.cljs$lang$protocol_mask$partition1$ = 139264;
|
|
1511
|
+
});
|
|
1512
|
+
(datahike.db.HistoricalDB.prototype.cljs$core$ILookup$_lookup$arity$2 = (function (this__5300__auto__,k__5301__auto__){
|
|
1513
|
+
var self__ = this;
|
|
1514
|
+
var this__5300__auto____$1 = this;
|
|
1515
|
+
return this__5300__auto____$1.cljs$core$ILookup$_lookup$arity$3(null, k__5301__auto__,null);
|
|
1516
|
+
}));
|
|
1517
|
+
|
|
1518
|
+
(datahike.db.HistoricalDB.prototype.cljs$core$ILookup$_lookup$arity$3 = (function (this__5302__auto__,k58774,else__5303__auto__){
|
|
1519
|
+
var self__ = this;
|
|
1520
|
+
var this__5302__auto____$1 = this;
|
|
1521
|
+
var G__58780 = k58774;
|
|
1522
|
+
var G__58780__$1 = (((G__58780 instanceof cljs.core.Keyword))?G__58780.fqn:null);
|
|
1523
|
+
switch (G__58780__$1) {
|
|
1524
|
+
case "origin-db":
|
|
1525
|
+
return self__.origin_db;
|
|
1526
|
+
|
|
1527
|
+
break;
|
|
1528
|
+
default:
|
|
1529
|
+
return cljs.core.get.cljs$core$IFn$_invoke$arity$3(self__.__extmap,k58774,else__5303__auto__);
|
|
1530
|
+
|
|
1531
|
+
}
|
|
1532
|
+
}));
|
|
1533
|
+
|
|
1534
|
+
(datahike.db.HistoricalDB.prototype.cljs$core$IKVReduce$_kv_reduce$arity$3 = (function (this__5320__auto__,f__5321__auto__,init__5322__auto__){
|
|
1535
|
+
var self__ = this;
|
|
1536
|
+
var this__5320__auto____$1 = this;
|
|
1537
|
+
return cljs.core.reduce.cljs$core$IFn$_invoke$arity$3((function (ret__5323__auto__,p__58782){
|
|
1538
|
+
var vec__58783 = p__58782;
|
|
1539
|
+
var k__5324__auto__ = cljs.core.nth.cljs$core$IFn$_invoke$arity$3(vec__58783,(0),null);
|
|
1540
|
+
var v__5325__auto__ = cljs.core.nth.cljs$core$IFn$_invoke$arity$3(vec__58783,(1),null);
|
|
1541
|
+
return (f__5321__auto__.cljs$core$IFn$_invoke$arity$3 ? f__5321__auto__.cljs$core$IFn$_invoke$arity$3(ret__5323__auto__,k__5324__auto__,v__5325__auto__) : f__5321__auto__.call(null, ret__5323__auto__,k__5324__auto__,v__5325__auto__));
|
|
1542
|
+
}),init__5322__auto__,this__5320__auto____$1);
|
|
1543
|
+
}));
|
|
1544
|
+
|
|
1545
|
+
(datahike.db.HistoricalDB.prototype.cljs$core$IPrintWithWriter$_pr_writer$arity$3 = (function (this__5315__auto__,writer__5316__auto__,opts__5317__auto__){
|
|
1546
|
+
var self__ = this;
|
|
1547
|
+
var this__5315__auto____$1 = this;
|
|
1548
|
+
var pr_pair__5318__auto__ = (function (keyval__5319__auto__){
|
|
1549
|
+
return cljs.core.pr_sequential_writer(writer__5316__auto__,cljs.core.pr_writer,""," ","",opts__5317__auto__,keyval__5319__auto__);
|
|
1550
|
+
});
|
|
1551
|
+
return cljs.core.pr_sequential_writer(writer__5316__auto__,pr_pair__5318__auto__,"#datahike.db.HistoricalDB{",", ","}",opts__5317__auto__,cljs.core.concat.cljs$core$IFn$_invoke$arity$2(new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [(new cljs.core.PersistentVector(null,2,(5),cljs.core.PersistentVector.EMPTY_NODE,[new cljs.core.Keyword(null,"origin-db","origin-db",635471481),self__.origin_db],null))], null),self__.__extmap));
|
|
1552
|
+
}));
|
|
1553
|
+
|
|
1554
|
+
(datahike.db.HistoricalDB.prototype.cljs$core$IIterable$_iterator$arity$1 = (function (G__58773){
|
|
1555
|
+
var self__ = this;
|
|
1556
|
+
var G__58773__$1 = this;
|
|
1557
|
+
return (new cljs.core.RecordIter((0),G__58773__$1,1,new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"origin-db","origin-db",635471481)], null),(cljs.core.truth_(self__.__extmap)?cljs.core._iterator(self__.__extmap):cljs.core.nil_iter())));
|
|
1558
|
+
}));
|
|
1559
|
+
|
|
1560
|
+
(datahike.db.HistoricalDB.prototype.cljs$core$IMeta$_meta$arity$1 = (function (this__5298__auto__){
|
|
1561
|
+
var self__ = this;
|
|
1562
|
+
var this__5298__auto____$1 = this;
|
|
1563
|
+
return self__.__meta;
|
|
1564
|
+
}));
|
|
1565
|
+
|
|
1566
|
+
(datahike.db.HistoricalDB.prototype.cljs$core$ICloneable$_clone$arity$1 = (function (this__5295__auto__){
|
|
1567
|
+
var self__ = this;
|
|
1568
|
+
var this__5295__auto____$1 = this;
|
|
1569
|
+
return (new datahike.db.HistoricalDB(self__.origin_db,self__.__meta,self__.__extmap,self__.__hash));
|
|
1570
|
+
}));
|
|
1571
|
+
|
|
1572
|
+
(datahike.db.HistoricalDB.prototype.cljs$core$ICounted$_count$arity$1 = (function (this__5304__auto__){
|
|
1573
|
+
var self__ = this;
|
|
1574
|
+
var this__5304__auto____$1 = this;
|
|
1575
|
+
return (1 + cljs.core.count(self__.__extmap));
|
|
1576
|
+
}));
|
|
1577
|
+
|
|
1578
|
+
(datahike.db.HistoricalDB.prototype.cljs$core$IHash$_hash$arity$1 = (function (this__5296__auto__){
|
|
1579
|
+
var self__ = this;
|
|
1580
|
+
var this__5296__auto____$1 = this;
|
|
1581
|
+
var h__5111__auto__ = self__.__hash;
|
|
1582
|
+
if((!((h__5111__auto__ == null)))){
|
|
1583
|
+
return h__5111__auto__;
|
|
1584
|
+
} else {
|
|
1585
|
+
var h__5111__auto____$1 = (function (coll__5297__auto__){
|
|
1586
|
+
return (396307874 ^ cljs.core.hash_unordered_coll(coll__5297__auto__));
|
|
1587
|
+
})(this__5296__auto____$1);
|
|
1588
|
+
(self__.__hash = h__5111__auto____$1);
|
|
1589
|
+
|
|
1590
|
+
return h__5111__auto____$1;
|
|
1591
|
+
}
|
|
1592
|
+
}));
|
|
1593
|
+
|
|
1594
|
+
(datahike.db.HistoricalDB.prototype.cljs$core$IEquiv$_equiv$arity$2 = (function (this58775,other58776){
|
|
1595
|
+
var self__ = this;
|
|
1596
|
+
var this58775__$1 = this;
|
|
1597
|
+
return (((!((other58776 == null)))) && ((((this58775__$1.constructor === other58776.constructor)) && (((cljs.core._EQ_.cljs$core$IFn$_invoke$arity$2(this58775__$1.origin_db,other58776.origin_db)) && (cljs.core._EQ_.cljs$core$IFn$_invoke$arity$2(this58775__$1.__extmap,other58776.__extmap)))))));
|
|
1598
|
+
}));
|
|
1599
|
+
|
|
1600
|
+
(datahike.db.HistoricalDB.prototype.cljs$core$IMap$_dissoc$arity$2 = (function (this__5310__auto__,k__5311__auto__){
|
|
1601
|
+
var self__ = this;
|
|
1602
|
+
var this__5310__auto____$1 = this;
|
|
1603
|
+
if(cljs.core.contains_QMARK_(new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"origin-db","origin-db",635471481),null], null), null),k__5311__auto__)){
|
|
1604
|
+
return cljs.core.dissoc.cljs$core$IFn$_invoke$arity$2(cljs.core._with_meta(cljs.core.into.cljs$core$IFn$_invoke$arity$2(cljs.core.PersistentArrayMap.EMPTY,this__5310__auto____$1),self__.__meta),k__5311__auto__);
|
|
1605
|
+
} else {
|
|
1606
|
+
return (new datahike.db.HistoricalDB(self__.origin_db,self__.__meta,cljs.core.not_empty(cljs.core.dissoc.cljs$core$IFn$_invoke$arity$2(self__.__extmap,k__5311__auto__)),null));
|
|
1607
|
+
}
|
|
1608
|
+
}));
|
|
1609
|
+
|
|
1610
|
+
(datahike.db.HistoricalDB.prototype.cljs$core$IAssociative$_contains_key_QMARK_$arity$2 = (function (this__5307__auto__,k58774){
|
|
1611
|
+
var self__ = this;
|
|
1612
|
+
var this__5307__auto____$1 = this;
|
|
1613
|
+
var G__58789 = k58774;
|
|
1614
|
+
var G__58789__$1 = (((G__58789 instanceof cljs.core.Keyword))?G__58789.fqn:null);
|
|
1615
|
+
switch (G__58789__$1) {
|
|
1616
|
+
case "origin-db":
|
|
1617
|
+
return true;
|
|
1618
|
+
|
|
1619
|
+
break;
|
|
1620
|
+
default:
|
|
1621
|
+
return cljs.core.contains_QMARK_(self__.__extmap,k58774);
|
|
1622
|
+
|
|
1623
|
+
}
|
|
1624
|
+
}));
|
|
1625
|
+
|
|
1626
|
+
(datahike.db.HistoricalDB.prototype.cljs$core$IAssociative$_assoc$arity$3 = (function (this__5308__auto__,k__5309__auto__,G__58773){
|
|
1627
|
+
var self__ = this;
|
|
1628
|
+
var this__5308__auto____$1 = this;
|
|
1629
|
+
var pred__58792 = cljs.core.keyword_identical_QMARK_;
|
|
1630
|
+
var expr__58793 = k__5309__auto__;
|
|
1631
|
+
if(cljs.core.truth_((pred__58792.cljs$core$IFn$_invoke$arity$2 ? pred__58792.cljs$core$IFn$_invoke$arity$2(new cljs.core.Keyword(null,"origin-db","origin-db",635471481),expr__58793) : pred__58792.call(null, new cljs.core.Keyword(null,"origin-db","origin-db",635471481),expr__58793)))){
|
|
1632
|
+
return (new datahike.db.HistoricalDB(G__58773,self__.__meta,self__.__extmap,null));
|
|
1633
|
+
} else {
|
|
1634
|
+
return (new datahike.db.HistoricalDB(self__.origin_db,self__.__meta,cljs.core.assoc.cljs$core$IFn$_invoke$arity$3(self__.__extmap,k__5309__auto__,G__58773),null));
|
|
1635
|
+
}
|
|
1636
|
+
}));
|
|
1637
|
+
|
|
1638
|
+
(datahike.db.HistoricalDB.prototype.cljs$core$ISeqable$_seq$arity$1 = (function (this__5313__auto__){
|
|
1639
|
+
var self__ = this;
|
|
1640
|
+
var this__5313__auto____$1 = this;
|
|
1641
|
+
return cljs.core.seq(cljs.core.concat.cljs$core$IFn$_invoke$arity$2(new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [(new cljs.core.MapEntry(new cljs.core.Keyword(null,"origin-db","origin-db",635471481),self__.origin_db,null))], null),self__.__extmap));
|
|
1642
|
+
}));
|
|
1643
|
+
|
|
1644
|
+
(datahike.db.HistoricalDB.prototype.cljs$core$IWithMeta$_with_meta$arity$2 = (function (this__5299__auto__,G__58773){
|
|
1645
|
+
var self__ = this;
|
|
1646
|
+
var this__5299__auto____$1 = this;
|
|
1647
|
+
return (new datahike.db.HistoricalDB(self__.origin_db,G__58773,self__.__extmap,self__.__hash));
|
|
1648
|
+
}));
|
|
1649
|
+
|
|
1650
|
+
(datahike.db.HistoricalDB.prototype.cljs$core$ICollection$_conj$arity$2 = (function (this__5305__auto__,entry__5306__auto__){
|
|
1651
|
+
var self__ = this;
|
|
1652
|
+
var this__5305__auto____$1 = this;
|
|
1653
|
+
if(cljs.core.vector_QMARK_(entry__5306__auto__)){
|
|
1654
|
+
return this__5305__auto____$1.cljs$core$IAssociative$_assoc$arity$3(null, cljs.core._nth(entry__5306__auto__,(0)),cljs.core._nth(entry__5306__auto__,(1)));
|
|
1655
|
+
} else {
|
|
1656
|
+
return cljs.core.reduce.cljs$core$IFn$_invoke$arity$3(cljs.core._conj,this__5305__auto____$1,entry__5306__auto__);
|
|
1657
|
+
}
|
|
1658
|
+
}));
|
|
1659
|
+
|
|
1660
|
+
(datahike.db.HistoricalDB.getBasis = (function (){
|
|
1661
|
+
return new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Symbol(null,"origin-db","origin-db",-2018964288,null)], null);
|
|
1662
|
+
}));
|
|
1663
|
+
|
|
1664
|
+
(datahike.db.HistoricalDB.cljs$lang$type = true);
|
|
1665
|
+
|
|
1666
|
+
(datahike.db.HistoricalDB.cljs$lang$ctorPrSeq = (function (this__5346__auto__){
|
|
1667
|
+
return (new cljs.core.List(null,"datahike.db/HistoricalDB",null,(1),null));
|
|
1668
|
+
}));
|
|
1669
|
+
|
|
1670
|
+
(datahike.db.HistoricalDB.cljs$lang$ctorPrWriter = (function (this__5346__auto__,writer__5347__auto__){
|
|
1671
|
+
return cljs.core._write(writer__5347__auto__,"datahike.db/HistoricalDB");
|
|
1672
|
+
}));
|
|
1673
|
+
|
|
1674
|
+
/**
|
|
1675
|
+
* Positional factory function for datahike.db/HistoricalDB.
|
|
1676
|
+
*/
|
|
1677
|
+
datahike.db.__GT_HistoricalDB = (function datahike$db$__GT_HistoricalDB(origin_db){
|
|
1678
|
+
return (new datahike.db.HistoricalDB(origin_db,null,null,null));
|
|
1679
|
+
});
|
|
1680
|
+
|
|
1681
|
+
/**
|
|
1682
|
+
* Factory function for datahike.db/HistoricalDB, taking a map of keywords to field values.
|
|
1683
|
+
*/
|
|
1684
|
+
datahike.db.map__GT_HistoricalDB = (function datahike$db$map__GT_HistoricalDB(G__58777){
|
|
1685
|
+
var extmap__5342__auto__ = (function (){var G__58798 = cljs.core.dissoc.cljs$core$IFn$_invoke$arity$2(G__58777,new cljs.core.Keyword(null,"origin-db","origin-db",635471481));
|
|
1686
|
+
if(cljs.core.record_QMARK_(G__58777)){
|
|
1687
|
+
return cljs.core.into.cljs$core$IFn$_invoke$arity$2(cljs.core.PersistentArrayMap.EMPTY,G__58798);
|
|
1688
|
+
} else {
|
|
1689
|
+
return G__58798;
|
|
1690
|
+
}
|
|
1691
|
+
})();
|
|
1692
|
+
return (new datahike.db.HistoricalDB(new cljs.core.Keyword(null,"origin-db","origin-db",635471481).cljs$core$IFn$_invoke$arity$1(G__58777),null,cljs.core.not_empty(extmap__5342__auto__),null));
|
|
1693
|
+
});
|
|
1694
|
+
|
|
1695
|
+
|
|
1696
|
+
(datahike.db.HistoricalDB.prototype.datahike$db$interface$ISearch$ = cljs.core.PROTOCOL_SENTINEL);
|
|
1697
|
+
|
|
1698
|
+
(datahike.db.HistoricalDB.prototype.datahike$db$interface$ISearch$_search_context$arity$1 = (function (db){
|
|
1699
|
+
var db__$1 = this;
|
|
1700
|
+
return datahike.db.interface$.context_with_history(datahike.db.interface$._search_context(db__$1.origin_db));
|
|
1701
|
+
}));
|
|
1702
|
+
|
|
1703
|
+
(datahike.db.HistoricalDB.prototype.datahike$db$interface$ISearch$_search$arity$3 = (function (db,pattern,context){
|
|
1704
|
+
var db__$1 = this;
|
|
1705
|
+
return datahike.db.interface$._search(db__$1.origin_db,pattern,context);
|
|
1706
|
+
}));
|
|
1707
|
+
|
|
1708
|
+
(datahike.db.HistoricalDB.prototype.datahike$db$interface$ISearch$_batch_search$arity$4 = (function (db,pattern_mask,batch_fn,context){
|
|
1709
|
+
var db__$1 = this;
|
|
1710
|
+
return datahike.db.interface$._batch_search(db__$1.origin_db,pattern_mask,batch_fn,context);
|
|
1711
|
+
}));
|
|
1712
|
+
|
|
1713
|
+
(datahike.db.HistoricalDB.prototype.datahike$db$interface$IIndexAccess$ = cljs.core.PROTOCOL_SENTINEL);
|
|
1714
|
+
|
|
1715
|
+
(datahike.db.HistoricalDB.prototype.datahike$db$interface$IIndexAccess$_datoms$arity$4 = (function (db,index_type,cs,context){
|
|
1716
|
+
var db__$1 = this;
|
|
1717
|
+
return datahike.db.interface$._datoms(db__$1.origin_db,index_type,cs,context);
|
|
1718
|
+
}));
|
|
1719
|
+
|
|
1720
|
+
(datahike.db.HistoricalDB.prototype.datahike$db$interface$IIndexAccess$_seek_datoms$arity$4 = (function (db,index_type,cs,context){
|
|
1721
|
+
var db__$1 = this;
|
|
1722
|
+
return datahike.db.interface$._seek_datoms(db__$1.origin_db,index_type,cs,context);
|
|
1723
|
+
}));
|
|
1724
|
+
|
|
1725
|
+
(datahike.db.HistoricalDB.prototype.datahike$db$interface$IIndexAccess$_rseek_datoms$arity$4 = (function (db,index_type,cs,context){
|
|
1726
|
+
var db__$1 = this;
|
|
1727
|
+
return datahike.db.interface$._rseek_datoms(db__$1.origin_db,index_type,cs,context);
|
|
1728
|
+
}));
|
|
1729
|
+
|
|
1730
|
+
(datahike.db.HistoricalDB.prototype.datahike$db$interface$IIndexAccess$_index_range$arity$5 = (function (db,attr,start,end,context){
|
|
1731
|
+
var db__$1 = this;
|
|
1732
|
+
return datahike.db.deeper_index_range(db__$1.origin_db,db__$1,attr,start,end,context);
|
|
1733
|
+
}));
|
|
1734
|
+
|
|
1735
|
+
(datahike.db.HistoricalDB.prototype.cljs$core$ILookup$ = cljs.core.PROTOCOL_SENTINEL);
|
|
1736
|
+
|
|
1737
|
+
(datahike.db.HistoricalDB.prototype.cljs$core$ILookup$_lookup$arity$2 = (function (_,___$1){
|
|
1738
|
+
var ___$2 = this;
|
|
1739
|
+
throw (new Error("-lookup is not supported on HistoricalDB"));
|
|
1740
|
+
}));
|
|
1741
|
+
|
|
1742
|
+
(datahike.db.HistoricalDB.prototype.cljs$core$ILookup$_lookup$arity$3 = (function (_,___$1,___$2){
|
|
1743
|
+
var ___$3 = this;
|
|
1744
|
+
throw (new Error("-lookup is not supported on HistoricalDB"));
|
|
1745
|
+
}));
|
|
1746
|
+
|
|
1747
|
+
(datahike.db.HistoricalDB.prototype.cljs$core$IPrintWithWriter$ = cljs.core.PROTOCOL_SENTINEL);
|
|
1748
|
+
|
|
1749
|
+
(datahike.db.HistoricalDB.prototype.cljs$core$IPrintWithWriter$_pr_writer$arity$3 = (function (db,w,opts){
|
|
1750
|
+
var db__$1 = this;
|
|
1751
|
+
return (datahike.db.pr_db.cljs$core$IFn$_invoke$arity$3 ? datahike.db.pr_db.cljs$core$IFn$_invoke$arity$3(db__$1,w,opts) : datahike.db.pr_db.call(null, db__$1,w,opts));
|
|
1752
|
+
}));
|
|
1753
|
+
|
|
1754
|
+
(datahike.db.HistoricalDB.prototype.datahike$db$interface$IHistory$ = cljs.core.PROTOCOL_SENTINEL);
|
|
1755
|
+
|
|
1756
|
+
(datahike.db.HistoricalDB.prototype.datahike$db$interface$IHistory$_time_point$arity$1 = (function (db){
|
|
1757
|
+
var db__$1 = this;
|
|
1758
|
+
return null;
|
|
1759
|
+
}));
|
|
1760
|
+
|
|
1761
|
+
(datahike.db.HistoricalDB.prototype.datahike$db$interface$IHistory$_origin$arity$1 = (function (db){
|
|
1762
|
+
var db__$1 = this;
|
|
1763
|
+
return db__$1.origin_db;
|
|
1764
|
+
}));
|
|
1765
|
+
|
|
1766
|
+
(datahike.db.HistoricalDB.prototype.cljs$core$ICounted$ = cljs.core.PROTOCOL_SENTINEL);
|
|
1767
|
+
|
|
1768
|
+
(datahike.db.HistoricalDB.prototype.cljs$core$ICounted$_count$arity$1 = (function (db){
|
|
1769
|
+
var db__$1 = this;
|
|
1770
|
+
return cljs.core.count(datahike.db.interface$.datoms(db__$1,new cljs.core.Keyword(null,"eavt","eavt",-666437073),cljs.core.PersistentVector.EMPTY));
|
|
1771
|
+
}));
|
|
1772
|
+
|
|
1773
|
+
(datahike.db.HistoricalDB.prototype.cljs$core$IEquiv$ = cljs.core.PROTOCOL_SENTINEL);
|
|
1774
|
+
|
|
1775
|
+
(datahike.db.HistoricalDB.prototype.cljs$core$IEquiv$_equiv$arity$2 = (function (db,other){
|
|
1776
|
+
var db__$1 = this;
|
|
1777
|
+
return (datahike.db.equiv_db.cljs$core$IFn$_invoke$arity$2 ? datahike.db.equiv_db.cljs$core$IFn$_invoke$arity$2(db__$1,other) : datahike.db.equiv_db.call(null, db__$1,other));
|
|
1778
|
+
}));
|
|
1779
|
+
|
|
1780
|
+
(datahike.db.HistoricalDB.prototype.cljs$core$IEmptyableCollection$ = cljs.core.PROTOCOL_SENTINEL);
|
|
1781
|
+
|
|
1782
|
+
(datahike.db.HistoricalDB.prototype.cljs$core$IEmptyableCollection$_empty$arity$1 = (function (_){
|
|
1783
|
+
var ___$1 = this;
|
|
1784
|
+
throw (new Error("-empty is not supported on HistoricalDB"));
|
|
1785
|
+
}));
|
|
1786
|
+
|
|
1787
|
+
(datahike.db.HistoricalDB.prototype.datahike$db$interface$IDB$ = cljs.core.PROTOCOL_SENTINEL);
|
|
1788
|
+
|
|
1789
|
+
(datahike.db.HistoricalDB.prototype.datahike$db$interface$IDB$_schema$arity$1 = (function (db){
|
|
1790
|
+
var db__$1 = this;
|
|
1791
|
+
return datahike.db.interface$._schema(db__$1.origin_db);
|
|
1792
|
+
}));
|
|
1793
|
+
|
|
1794
|
+
(datahike.db.HistoricalDB.prototype.datahike$db$interface$IDB$_rschema$arity$1 = (function (db){
|
|
1795
|
+
var db__$1 = this;
|
|
1796
|
+
return datahike.db.interface$._rschema(db__$1.origin_db);
|
|
1797
|
+
}));
|
|
1798
|
+
|
|
1799
|
+
(datahike.db.HistoricalDB.prototype.datahike$db$interface$IDB$_system_entities$arity$1 = (function (db){
|
|
1800
|
+
var db__$1 = this;
|
|
1801
|
+
return datahike.db.interface$._system_entities(db__$1.origin_db);
|
|
1802
|
+
}));
|
|
1803
|
+
|
|
1804
|
+
(datahike.db.HistoricalDB.prototype.datahike$db$interface$IDB$_attrs_by$arity$2 = (function (db,property){
|
|
1805
|
+
var db__$1 = this;
|
|
1806
|
+
return datahike.db.interface$._attrs_by(db__$1.origin_db,property);
|
|
1807
|
+
}));
|
|
1808
|
+
|
|
1809
|
+
(datahike.db.HistoricalDB.prototype.datahike$db$interface$IDB$_temporal_index_QMARK_$arity$1 = (function (db){
|
|
1810
|
+
var db__$1 = this;
|
|
1811
|
+
return datahike.db.interface$._keep_history_QMARK_(db__$1.origin_db);
|
|
1812
|
+
}));
|
|
1813
|
+
|
|
1814
|
+
(datahike.db.HistoricalDB.prototype.datahike$db$interface$IDB$_keep_history_QMARK_$arity$1 = (function (db){
|
|
1815
|
+
var db__$1 = this;
|
|
1816
|
+
return datahike.db.interface$._keep_history_QMARK_(db__$1.origin_db);
|
|
1817
|
+
}));
|
|
1818
|
+
|
|
1819
|
+
(datahike.db.HistoricalDB.prototype.datahike$db$interface$IDB$_max_tx$arity$1 = (function (db){
|
|
1820
|
+
var db__$1 = this;
|
|
1821
|
+
return datahike.db.interface$._max_tx(db__$1.origin_db);
|
|
1822
|
+
}));
|
|
1823
|
+
|
|
1824
|
+
(datahike.db.HistoricalDB.prototype.datahike$db$interface$IDB$_max_eid$arity$1 = (function (db){
|
|
1825
|
+
var db__$1 = this;
|
|
1826
|
+
return datahike.db.interface$._max_eid(db__$1.origin_db);
|
|
1827
|
+
}));
|
|
1828
|
+
|
|
1829
|
+
(datahike.db.HistoricalDB.prototype.datahike$db$interface$IDB$_config$arity$1 = (function (db){
|
|
1830
|
+
var db__$1 = this;
|
|
1831
|
+
return datahike.db.interface$._config(db__$1.origin_db);
|
|
1832
|
+
}));
|
|
1833
|
+
|
|
1834
|
+
(datahike.db.HistoricalDB.prototype.datahike$db$interface$IDB$_ref_for$arity$2 = (function (db,a_ident){
|
|
1835
|
+
var db__$1 = this;
|
|
1836
|
+
return datahike.db.interface$._ref_for(db__$1.origin_db,a_ident);
|
|
1837
|
+
}));
|
|
1838
|
+
|
|
1839
|
+
(datahike.db.HistoricalDB.prototype.datahike$db$interface$IDB$_ident_for$arity$2 = (function (db,a_ref){
|
|
1840
|
+
var db__$1 = this;
|
|
1841
|
+
return datahike.db.interface$._ident_for(db__$1.origin_db,a_ref);
|
|
1842
|
+
}));
|
|
1843
|
+
|
|
1844
|
+
(datahike.db.HistoricalDB.prototype.cljs$core$IAssociative$ = cljs.core.PROTOCOL_SENTINEL);
|
|
1845
|
+
|
|
1846
|
+
(datahike.db.HistoricalDB.prototype.cljs$core$IAssociative$_contains_key_QMARK_$arity$2 = (function (_,___$1){
|
|
1847
|
+
var ___$2 = this;
|
|
1848
|
+
throw (new Error("-contains-key? is not supported on HistoricalDB"));
|
|
1849
|
+
}));
|
|
1850
|
+
|
|
1851
|
+
(datahike.db.HistoricalDB.prototype.cljs$core$IAssociative$_assoc$arity$3 = (function (_,___$1,___$2){
|
|
1852
|
+
var ___$3 = this;
|
|
1853
|
+
throw (new Error("-assoc is not supported on HistoricalDB"));
|
|
1854
|
+
}));
|
|
1855
|
+
|
|
1856
|
+
(datahike.db.HistoricalDB.prototype.cljs$core$ISeqable$ = cljs.core.PROTOCOL_SENTINEL);
|
|
1857
|
+
|
|
1858
|
+
(datahike.db.HistoricalDB.prototype.cljs$core$ISeqable$_seq$arity$1 = (function (db){
|
|
1859
|
+
var db__$1 = this;
|
|
1860
|
+
return datahike.db.interface$.datoms(db__$1,new cljs.core.Keyword(null,"eavt","eavt",-666437073),cljs.core.PersistentVector.EMPTY);
|
|
1861
|
+
}));
|
|
1862
|
+
|
|
1863
|
+
/**
|
|
1864
|
+
* @constructor
|
|
1865
|
+
* @implements {cljs.core.IRecord}
|
|
1866
|
+
* @implements {cljs.core.IKVReduce}
|
|
1867
|
+
* @implements {cljs.core.IEquiv}
|
|
1868
|
+
* @implements {cljs.core.IHash}
|
|
1869
|
+
* @implements {cljs.core.ICollection}
|
|
1870
|
+
* @implements {cljs.core.ICounted}
|
|
1871
|
+
* @implements {cljs.core.ISeqable}
|
|
1872
|
+
* @implements {cljs.core.IMeta}
|
|
1873
|
+
* @implements {cljs.core.ICloneable}
|
|
1874
|
+
* @implements {cljs.core.IPrintWithWriter}
|
|
1875
|
+
* @implements {cljs.core.IIterable}
|
|
1876
|
+
* @implements {cljs.core.IWithMeta}
|
|
1877
|
+
* @implements {cljs.core.IAssociative}
|
|
1878
|
+
* @implements {cljs.core.IMap}
|
|
1879
|
+
* @implements {cljs.core.ILookup}
|
|
1880
|
+
*/
|
|
1881
|
+
datahike.db.AsOfDB = (function (origin_db,time_point,__meta,__extmap,__hash){
|
|
1882
|
+
this.origin_db = origin_db;
|
|
1883
|
+
this.time_point = time_point;
|
|
1884
|
+
this.__meta = __meta;
|
|
1885
|
+
this.__extmap = __extmap;
|
|
1886
|
+
this.__hash = __hash;
|
|
1887
|
+
this.cljs$lang$protocol_mask$partition0$ = 2230716170;
|
|
1888
|
+
this.cljs$lang$protocol_mask$partition1$ = 139264;
|
|
1889
|
+
});
|
|
1890
|
+
(datahike.db.AsOfDB.prototype.cljs$core$ILookup$_lookup$arity$2 = (function (this__5300__auto__,k__5301__auto__){
|
|
1891
|
+
var self__ = this;
|
|
1892
|
+
var this__5300__auto____$1 = this;
|
|
1893
|
+
return this__5300__auto____$1.cljs$core$ILookup$_lookup$arity$3(null, k__5301__auto__,null);
|
|
1894
|
+
}));
|
|
1895
|
+
|
|
1896
|
+
(datahike.db.AsOfDB.prototype.cljs$core$ILookup$_lookup$arity$3 = (function (this__5302__auto__,k58812,else__5303__auto__){
|
|
1897
|
+
var self__ = this;
|
|
1898
|
+
var this__5302__auto____$1 = this;
|
|
1899
|
+
var G__58820 = k58812;
|
|
1900
|
+
var G__58820__$1 = (((G__58820 instanceof cljs.core.Keyword))?G__58820.fqn:null);
|
|
1901
|
+
switch (G__58820__$1) {
|
|
1902
|
+
case "origin-db":
|
|
1903
|
+
return self__.origin_db;
|
|
1904
|
+
|
|
1905
|
+
break;
|
|
1906
|
+
case "time-point":
|
|
1907
|
+
return self__.time_point;
|
|
1908
|
+
|
|
1909
|
+
break;
|
|
1910
|
+
default:
|
|
1911
|
+
return cljs.core.get.cljs$core$IFn$_invoke$arity$3(self__.__extmap,k58812,else__5303__auto__);
|
|
1912
|
+
|
|
1913
|
+
}
|
|
1914
|
+
}));
|
|
1915
|
+
|
|
1916
|
+
(datahike.db.AsOfDB.prototype.cljs$core$IKVReduce$_kv_reduce$arity$3 = (function (this__5320__auto__,f__5321__auto__,init__5322__auto__){
|
|
1917
|
+
var self__ = this;
|
|
1918
|
+
var this__5320__auto____$1 = this;
|
|
1919
|
+
return cljs.core.reduce.cljs$core$IFn$_invoke$arity$3((function (ret__5323__auto__,p__58823){
|
|
1920
|
+
var vec__58824 = p__58823;
|
|
1921
|
+
var k__5324__auto__ = cljs.core.nth.cljs$core$IFn$_invoke$arity$3(vec__58824,(0),null);
|
|
1922
|
+
var v__5325__auto__ = cljs.core.nth.cljs$core$IFn$_invoke$arity$3(vec__58824,(1),null);
|
|
1923
|
+
return (f__5321__auto__.cljs$core$IFn$_invoke$arity$3 ? f__5321__auto__.cljs$core$IFn$_invoke$arity$3(ret__5323__auto__,k__5324__auto__,v__5325__auto__) : f__5321__auto__.call(null, ret__5323__auto__,k__5324__auto__,v__5325__auto__));
|
|
1924
|
+
}),init__5322__auto__,this__5320__auto____$1);
|
|
1925
|
+
}));
|
|
1926
|
+
|
|
1927
|
+
(datahike.db.AsOfDB.prototype.cljs$core$IPrintWithWriter$_pr_writer$arity$3 = (function (this__5315__auto__,writer__5316__auto__,opts__5317__auto__){
|
|
1928
|
+
var self__ = this;
|
|
1929
|
+
var this__5315__auto____$1 = this;
|
|
1930
|
+
var pr_pair__5318__auto__ = (function (keyval__5319__auto__){
|
|
1931
|
+
return cljs.core.pr_sequential_writer(writer__5316__auto__,cljs.core.pr_writer,""," ","",opts__5317__auto__,keyval__5319__auto__);
|
|
1932
|
+
});
|
|
1933
|
+
return cljs.core.pr_sequential_writer(writer__5316__auto__,pr_pair__5318__auto__,"#datahike.db.AsOfDB{",", ","}",opts__5317__auto__,cljs.core.concat.cljs$core$IFn$_invoke$arity$2(new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [(new cljs.core.PersistentVector(null,2,(5),cljs.core.PersistentVector.EMPTY_NODE,[new cljs.core.Keyword(null,"origin-db","origin-db",635471481),self__.origin_db],null)),(new cljs.core.PersistentVector(null,2,(5),cljs.core.PersistentVector.EMPTY_NODE,[new cljs.core.Keyword(null,"time-point","time-point",-1243116005),self__.time_point],null))], null),self__.__extmap));
|
|
1934
|
+
}));
|
|
1935
|
+
|
|
1936
|
+
(datahike.db.AsOfDB.prototype.cljs$core$IIterable$_iterator$arity$1 = (function (G__58811){
|
|
1937
|
+
var self__ = this;
|
|
1938
|
+
var G__58811__$1 = this;
|
|
1939
|
+
return (new cljs.core.RecordIter((0),G__58811__$1,2,new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"origin-db","origin-db",635471481),new cljs.core.Keyword(null,"time-point","time-point",-1243116005)], null),(cljs.core.truth_(self__.__extmap)?cljs.core._iterator(self__.__extmap):cljs.core.nil_iter())));
|
|
1940
|
+
}));
|
|
1941
|
+
|
|
1942
|
+
(datahike.db.AsOfDB.prototype.cljs$core$IMeta$_meta$arity$1 = (function (this__5298__auto__){
|
|
1943
|
+
var self__ = this;
|
|
1944
|
+
var this__5298__auto____$1 = this;
|
|
1945
|
+
return self__.__meta;
|
|
1946
|
+
}));
|
|
1947
|
+
|
|
1948
|
+
(datahike.db.AsOfDB.prototype.cljs$core$ICloneable$_clone$arity$1 = (function (this__5295__auto__){
|
|
1949
|
+
var self__ = this;
|
|
1950
|
+
var this__5295__auto____$1 = this;
|
|
1951
|
+
return (new datahike.db.AsOfDB(self__.origin_db,self__.time_point,self__.__meta,self__.__extmap,self__.__hash));
|
|
1952
|
+
}));
|
|
1953
|
+
|
|
1954
|
+
(datahike.db.AsOfDB.prototype.cljs$core$ICounted$_count$arity$1 = (function (this__5304__auto__){
|
|
1955
|
+
var self__ = this;
|
|
1956
|
+
var this__5304__auto____$1 = this;
|
|
1957
|
+
return (2 + cljs.core.count(self__.__extmap));
|
|
1958
|
+
}));
|
|
1959
|
+
|
|
1960
|
+
(datahike.db.AsOfDB.prototype.cljs$core$IHash$_hash$arity$1 = (function (this__5296__auto__){
|
|
1961
|
+
var self__ = this;
|
|
1962
|
+
var this__5296__auto____$1 = this;
|
|
1963
|
+
var h__5111__auto__ = self__.__hash;
|
|
1964
|
+
if((!((h__5111__auto__ == null)))){
|
|
1965
|
+
return h__5111__auto__;
|
|
1966
|
+
} else {
|
|
1967
|
+
var h__5111__auto____$1 = (function (coll__5297__auto__){
|
|
1968
|
+
return (700042199 ^ cljs.core.hash_unordered_coll(coll__5297__auto__));
|
|
1969
|
+
})(this__5296__auto____$1);
|
|
1970
|
+
(self__.__hash = h__5111__auto____$1);
|
|
1971
|
+
|
|
1972
|
+
return h__5111__auto____$1;
|
|
1973
|
+
}
|
|
1974
|
+
}));
|
|
1975
|
+
|
|
1976
|
+
(datahike.db.AsOfDB.prototype.cljs$core$IEquiv$_equiv$arity$2 = (function (this58813,other58814){
|
|
1977
|
+
var self__ = this;
|
|
1978
|
+
var this58813__$1 = this;
|
|
1979
|
+
return (((!((other58814 == null)))) && ((((this58813__$1.constructor === other58814.constructor)) && (((cljs.core._EQ_.cljs$core$IFn$_invoke$arity$2(this58813__$1.origin_db,other58814.origin_db)) && (((cljs.core._EQ_.cljs$core$IFn$_invoke$arity$2(this58813__$1.time_point,other58814.time_point)) && (cljs.core._EQ_.cljs$core$IFn$_invoke$arity$2(this58813__$1.__extmap,other58814.__extmap)))))))));
|
|
1980
|
+
}));
|
|
1981
|
+
|
|
1982
|
+
(datahike.db.AsOfDB.prototype.cljs$core$IMap$_dissoc$arity$2 = (function (this__5310__auto__,k__5311__auto__){
|
|
1983
|
+
var self__ = this;
|
|
1984
|
+
var this__5310__auto____$1 = this;
|
|
1985
|
+
if(cljs.core.contains_QMARK_(new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null,"origin-db","origin-db",635471481),null,new cljs.core.Keyword(null,"time-point","time-point",-1243116005),null], null), null),k__5311__auto__)){
|
|
1986
|
+
return cljs.core.dissoc.cljs$core$IFn$_invoke$arity$2(cljs.core._with_meta(cljs.core.into.cljs$core$IFn$_invoke$arity$2(cljs.core.PersistentArrayMap.EMPTY,this__5310__auto____$1),self__.__meta),k__5311__auto__);
|
|
1987
|
+
} else {
|
|
1988
|
+
return (new datahike.db.AsOfDB(self__.origin_db,self__.time_point,self__.__meta,cljs.core.not_empty(cljs.core.dissoc.cljs$core$IFn$_invoke$arity$2(self__.__extmap,k__5311__auto__)),null));
|
|
1989
|
+
}
|
|
1990
|
+
}));
|
|
1991
|
+
|
|
1992
|
+
(datahike.db.AsOfDB.prototype.cljs$core$IAssociative$_contains_key_QMARK_$arity$2 = (function (this__5307__auto__,k58812){
|
|
1993
|
+
var self__ = this;
|
|
1994
|
+
var this__5307__auto____$1 = this;
|
|
1995
|
+
var G__58837 = k58812;
|
|
1996
|
+
var G__58837__$1 = (((G__58837 instanceof cljs.core.Keyword))?G__58837.fqn:null);
|
|
1997
|
+
switch (G__58837__$1) {
|
|
1998
|
+
case "origin-db":
|
|
1999
|
+
case "time-point":
|
|
2000
|
+
return true;
|
|
2001
|
+
|
|
2002
|
+
break;
|
|
2003
|
+
default:
|
|
2004
|
+
return cljs.core.contains_QMARK_(self__.__extmap,k58812);
|
|
2005
|
+
|
|
2006
|
+
}
|
|
2007
|
+
}));
|
|
2008
|
+
|
|
2009
|
+
(datahike.db.AsOfDB.prototype.cljs$core$IAssociative$_assoc$arity$3 = (function (this__5308__auto__,k__5309__auto__,G__58811){
|
|
2010
|
+
var self__ = this;
|
|
2011
|
+
var this__5308__auto____$1 = this;
|
|
2012
|
+
var pred__58839 = cljs.core.keyword_identical_QMARK_;
|
|
2013
|
+
var expr__58840 = k__5309__auto__;
|
|
2014
|
+
if(cljs.core.truth_((pred__58839.cljs$core$IFn$_invoke$arity$2 ? pred__58839.cljs$core$IFn$_invoke$arity$2(new cljs.core.Keyword(null,"origin-db","origin-db",635471481),expr__58840) : pred__58839.call(null, new cljs.core.Keyword(null,"origin-db","origin-db",635471481),expr__58840)))){
|
|
2015
|
+
return (new datahike.db.AsOfDB(G__58811,self__.time_point,self__.__meta,self__.__extmap,null));
|
|
2016
|
+
} else {
|
|
2017
|
+
if(cljs.core.truth_((pred__58839.cljs$core$IFn$_invoke$arity$2 ? pred__58839.cljs$core$IFn$_invoke$arity$2(new cljs.core.Keyword(null,"time-point","time-point",-1243116005),expr__58840) : pred__58839.call(null, new cljs.core.Keyword(null,"time-point","time-point",-1243116005),expr__58840)))){
|
|
2018
|
+
return (new datahike.db.AsOfDB(self__.origin_db,G__58811,self__.__meta,self__.__extmap,null));
|
|
2019
|
+
} else {
|
|
2020
|
+
return (new datahike.db.AsOfDB(self__.origin_db,self__.time_point,self__.__meta,cljs.core.assoc.cljs$core$IFn$_invoke$arity$3(self__.__extmap,k__5309__auto__,G__58811),null));
|
|
2021
|
+
}
|
|
2022
|
+
}
|
|
2023
|
+
}));
|
|
2024
|
+
|
|
2025
|
+
(datahike.db.AsOfDB.prototype.cljs$core$ISeqable$_seq$arity$1 = (function (this__5313__auto__){
|
|
2026
|
+
var self__ = this;
|
|
2027
|
+
var this__5313__auto____$1 = this;
|
|
2028
|
+
return cljs.core.seq(cljs.core.concat.cljs$core$IFn$_invoke$arity$2(new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [(new cljs.core.MapEntry(new cljs.core.Keyword(null,"origin-db","origin-db",635471481),self__.origin_db,null)),(new cljs.core.MapEntry(new cljs.core.Keyword(null,"time-point","time-point",-1243116005),self__.time_point,null))], null),self__.__extmap));
|
|
2029
|
+
}));
|
|
2030
|
+
|
|
2031
|
+
(datahike.db.AsOfDB.prototype.cljs$core$IWithMeta$_with_meta$arity$2 = (function (this__5299__auto__,G__58811){
|
|
2032
|
+
var self__ = this;
|
|
2033
|
+
var this__5299__auto____$1 = this;
|
|
2034
|
+
return (new datahike.db.AsOfDB(self__.origin_db,self__.time_point,G__58811,self__.__extmap,self__.__hash));
|
|
2035
|
+
}));
|
|
2036
|
+
|
|
2037
|
+
(datahike.db.AsOfDB.prototype.cljs$core$ICollection$_conj$arity$2 = (function (this__5305__auto__,entry__5306__auto__){
|
|
2038
|
+
var self__ = this;
|
|
2039
|
+
var this__5305__auto____$1 = this;
|
|
2040
|
+
if(cljs.core.vector_QMARK_(entry__5306__auto__)){
|
|
2041
|
+
return this__5305__auto____$1.cljs$core$IAssociative$_assoc$arity$3(null, cljs.core._nth(entry__5306__auto__,(0)),cljs.core._nth(entry__5306__auto__,(1)));
|
|
2042
|
+
} else {
|
|
2043
|
+
return cljs.core.reduce.cljs$core$IFn$_invoke$arity$3(cljs.core._conj,this__5305__auto____$1,entry__5306__auto__);
|
|
2044
|
+
}
|
|
2045
|
+
}));
|
|
2046
|
+
|
|
2047
|
+
(datahike.db.AsOfDB.getBasis = (function (){
|
|
2048
|
+
return new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Symbol(null,"origin-db","origin-db",-2018964288,null),new cljs.core.Symbol(null,"time-point","time-point",397415522,null)], null);
|
|
2049
|
+
}));
|
|
2050
|
+
|
|
2051
|
+
(datahike.db.AsOfDB.cljs$lang$type = true);
|
|
2052
|
+
|
|
2053
|
+
(datahike.db.AsOfDB.cljs$lang$ctorPrSeq = (function (this__5346__auto__){
|
|
2054
|
+
return (new cljs.core.List(null,"datahike.db/AsOfDB",null,(1),null));
|
|
2055
|
+
}));
|
|
2056
|
+
|
|
2057
|
+
(datahike.db.AsOfDB.cljs$lang$ctorPrWriter = (function (this__5346__auto__,writer__5347__auto__){
|
|
2058
|
+
return cljs.core._write(writer__5347__auto__,"datahike.db/AsOfDB");
|
|
2059
|
+
}));
|
|
2060
|
+
|
|
2061
|
+
/**
|
|
2062
|
+
* Positional factory function for datahike.db/AsOfDB.
|
|
2063
|
+
*/
|
|
2064
|
+
datahike.db.__GT_AsOfDB = (function datahike$db$__GT_AsOfDB(origin_db,time_point){
|
|
2065
|
+
return (new datahike.db.AsOfDB(origin_db,time_point,null,null,null));
|
|
2066
|
+
});
|
|
2067
|
+
|
|
2068
|
+
/**
|
|
2069
|
+
* Factory function for datahike.db/AsOfDB, taking a map of keywords to field values.
|
|
2070
|
+
*/
|
|
2071
|
+
datahike.db.map__GT_AsOfDB = (function datahike$db$map__GT_AsOfDB(G__58816){
|
|
2072
|
+
var extmap__5342__auto__ = (function (){var G__58845 = cljs.core.dissoc.cljs$core$IFn$_invoke$arity$variadic(G__58816,new cljs.core.Keyword(null,"origin-db","origin-db",635471481),cljs.core.prim_seq.cljs$core$IFn$_invoke$arity$2([new cljs.core.Keyword(null,"time-point","time-point",-1243116005)], 0));
|
|
2073
|
+
if(cljs.core.record_QMARK_(G__58816)){
|
|
2074
|
+
return cljs.core.into.cljs$core$IFn$_invoke$arity$2(cljs.core.PersistentArrayMap.EMPTY,G__58845);
|
|
2075
|
+
} else {
|
|
2076
|
+
return G__58845;
|
|
2077
|
+
}
|
|
2078
|
+
})();
|
|
2079
|
+
return (new datahike.db.AsOfDB(new cljs.core.Keyword(null,"origin-db","origin-db",635471481).cljs$core$IFn$_invoke$arity$1(G__58816),new cljs.core.Keyword(null,"time-point","time-point",-1243116005).cljs$core$IFn$_invoke$arity$1(G__58816),null,cljs.core.not_empty(extmap__5342__auto__),null));
|
|
2080
|
+
});
|
|
2081
|
+
|
|
2082
|
+
|
|
2083
|
+
(datahike.db.AsOfDB.prototype.datahike$db$interface$ISearch$ = cljs.core.PROTOCOL_SENTINEL);
|
|
2084
|
+
|
|
2085
|
+
(datahike.db.AsOfDB.prototype.datahike$db$interface$ISearch$_search_context$arity$1 = (function (db){
|
|
2086
|
+
var db__$1 = this;
|
|
2087
|
+
return datahike.db.interface$.context_with_temporal_timepred(datahike.db.interface$._search_context(db__$1.origin_db),datahike.db.as_of_pred(db__$1.time_point));
|
|
2088
|
+
}));
|
|
2089
|
+
|
|
2090
|
+
(datahike.db.AsOfDB.prototype.datahike$db$interface$ISearch$_search$arity$3 = (function (db,pattern,context){
|
|
2091
|
+
var db__$1 = this;
|
|
2092
|
+
return datahike.db.interface$._search(db__$1.origin_db,pattern,context);
|
|
2093
|
+
}));
|
|
2094
|
+
|
|
2095
|
+
(datahike.db.AsOfDB.prototype.datahike$db$interface$ISearch$_batch_search$arity$4 = (function (db,pattern,batch_fn,context){
|
|
2096
|
+
var db__$1 = this;
|
|
2097
|
+
return datahike.db.interface$._batch_search(db__$1.origin_db,pattern,batch_fn,context);
|
|
2098
|
+
}));
|
|
2099
|
+
|
|
2100
|
+
(datahike.db.AsOfDB.prototype.datahike$db$interface$IIndexAccess$ = cljs.core.PROTOCOL_SENTINEL);
|
|
2101
|
+
|
|
2102
|
+
(datahike.db.AsOfDB.prototype.datahike$db$interface$IIndexAccess$_datoms$arity$4 = (function (db,index_type,cs,context){
|
|
2103
|
+
var db__$1 = this;
|
|
2104
|
+
return datahike.db.interface$._datoms(db__$1.origin_db,index_type,cs,context);
|
|
2105
|
+
}));
|
|
2106
|
+
|
|
2107
|
+
(datahike.db.AsOfDB.prototype.datahike$db$interface$IIndexAccess$_seek_datoms$arity$4 = (function (db,index_type,cs,context){
|
|
2108
|
+
var db__$1 = this;
|
|
2109
|
+
return datahike.db.interface$._seek_datoms(db__$1.origin_db,index_type,cs,context);
|
|
2110
|
+
}));
|
|
2111
|
+
|
|
2112
|
+
(datahike.db.AsOfDB.prototype.datahike$db$interface$IIndexAccess$_rseek_datoms$arity$4 = (function (db,index_type,cs,context){
|
|
2113
|
+
var db__$1 = this;
|
|
2114
|
+
return datahike.db.interface$._rseek_datoms(db__$1.origin_db,index_type,cs,context);
|
|
2115
|
+
}));
|
|
2116
|
+
|
|
2117
|
+
(datahike.db.AsOfDB.prototype.datahike$db$interface$IIndexAccess$_index_range$arity$5 = (function (db,attr,start,end,context){
|
|
2118
|
+
var db__$1 = this;
|
|
2119
|
+
return datahike.db.deeper_index_range(db__$1.origin_db,db__$1,attr,start,end,context);
|
|
2120
|
+
}));
|
|
2121
|
+
|
|
2122
|
+
(datahike.db.AsOfDB.prototype.cljs$core$ILookup$ = cljs.core.PROTOCOL_SENTINEL);
|
|
2123
|
+
|
|
2124
|
+
(datahike.db.AsOfDB.prototype.cljs$core$ILookup$_lookup$arity$2 = (function (_,___$1){
|
|
2125
|
+
var ___$2 = this;
|
|
2126
|
+
throw (new Error("-lookup is not supported on AsOfDB"));
|
|
2127
|
+
}));
|
|
2128
|
+
|
|
2129
|
+
(datahike.db.AsOfDB.prototype.cljs$core$ILookup$_lookup$arity$3 = (function (_,___$1,___$2){
|
|
2130
|
+
var ___$3 = this;
|
|
2131
|
+
throw (new Error("-lookup is not supported on AsOfDB"));
|
|
2132
|
+
}));
|
|
2133
|
+
|
|
2134
|
+
(datahike.db.AsOfDB.prototype.cljs$core$IPrintWithWriter$ = cljs.core.PROTOCOL_SENTINEL);
|
|
2135
|
+
|
|
2136
|
+
(datahike.db.AsOfDB.prototype.cljs$core$IPrintWithWriter$_pr_writer$arity$3 = (function (db,w,opts){
|
|
2137
|
+
var db__$1 = this;
|
|
2138
|
+
return (datahike.db.pr_db.cljs$core$IFn$_invoke$arity$3 ? datahike.db.pr_db.cljs$core$IFn$_invoke$arity$3(db__$1,w,opts) : datahike.db.pr_db.call(null, db__$1,w,opts));
|
|
2139
|
+
}));
|
|
2140
|
+
|
|
2141
|
+
(datahike.db.AsOfDB.prototype.datahike$db$interface$IHistory$ = cljs.core.PROTOCOL_SENTINEL);
|
|
2142
|
+
|
|
2143
|
+
(datahike.db.AsOfDB.prototype.datahike$db$interface$IHistory$_time_point$arity$1 = (function (db){
|
|
2144
|
+
var db__$1 = this;
|
|
2145
|
+
return db__$1.time_point;
|
|
2146
|
+
}));
|
|
2147
|
+
|
|
2148
|
+
(datahike.db.AsOfDB.prototype.datahike$db$interface$IHistory$_origin$arity$1 = (function (db){
|
|
2149
|
+
var db__$1 = this;
|
|
2150
|
+
return db__$1.origin_db;
|
|
2151
|
+
}));
|
|
2152
|
+
|
|
2153
|
+
(datahike.db.AsOfDB.prototype.cljs$core$ICounted$ = cljs.core.PROTOCOL_SENTINEL);
|
|
2154
|
+
|
|
2155
|
+
(datahike.db.AsOfDB.prototype.cljs$core$ICounted$_count$arity$1 = (function (db){
|
|
2156
|
+
var db__$1 = this;
|
|
2157
|
+
return cljs.core.count(datahike.db.interface$.datoms(db__$1,new cljs.core.Keyword(null,"eavt","eavt",-666437073),cljs.core.PersistentVector.EMPTY));
|
|
2158
|
+
}));
|
|
2159
|
+
|
|
2160
|
+
(datahike.db.AsOfDB.prototype.cljs$core$IEquiv$ = cljs.core.PROTOCOL_SENTINEL);
|
|
2161
|
+
|
|
2162
|
+
(datahike.db.AsOfDB.prototype.cljs$core$IEquiv$_equiv$arity$2 = (function (db,other){
|
|
2163
|
+
var db__$1 = this;
|
|
2164
|
+
return (datahike.db.equiv_db.cljs$core$IFn$_invoke$arity$2 ? datahike.db.equiv_db.cljs$core$IFn$_invoke$arity$2(db__$1,other) : datahike.db.equiv_db.call(null, db__$1,other));
|
|
2165
|
+
}));
|
|
2166
|
+
|
|
2167
|
+
(datahike.db.AsOfDB.prototype.cljs$core$IEmptyableCollection$ = cljs.core.PROTOCOL_SENTINEL);
|
|
2168
|
+
|
|
2169
|
+
(datahike.db.AsOfDB.prototype.cljs$core$IEmptyableCollection$_empty$arity$1 = (function (_){
|
|
2170
|
+
var ___$1 = this;
|
|
2171
|
+
throw (new Error("-empty is not supported on AsOfDB"));
|
|
2172
|
+
}));
|
|
2173
|
+
|
|
2174
|
+
(datahike.db.AsOfDB.prototype.datahike$db$interface$IDB$ = cljs.core.PROTOCOL_SENTINEL);
|
|
2175
|
+
|
|
2176
|
+
(datahike.db.AsOfDB.prototype.datahike$db$interface$IDB$_schema$arity$1 = (function (db){
|
|
2177
|
+
var db__$1 = this;
|
|
2178
|
+
return datahike.db.interface$._schema(db__$1.origin_db);
|
|
2179
|
+
}));
|
|
2180
|
+
|
|
2181
|
+
(datahike.db.AsOfDB.prototype.datahike$db$interface$IDB$_rschema$arity$1 = (function (db){
|
|
2182
|
+
var db__$1 = this;
|
|
2183
|
+
return datahike.db.interface$._rschema(db__$1.origin_db);
|
|
2184
|
+
}));
|
|
2185
|
+
|
|
2186
|
+
(datahike.db.AsOfDB.prototype.datahike$db$interface$IDB$_system_entities$arity$1 = (function (db){
|
|
2187
|
+
var db__$1 = this;
|
|
2188
|
+
return datahike.db.interface$._system_entities(db__$1.origin_db);
|
|
2189
|
+
}));
|
|
2190
|
+
|
|
2191
|
+
(datahike.db.AsOfDB.prototype.datahike$db$interface$IDB$_attrs_by$arity$2 = (function (db,property){
|
|
2192
|
+
var db__$1 = this;
|
|
2193
|
+
return datahike.db.interface$._attrs_by(db__$1.origin_db,property);
|
|
2194
|
+
}));
|
|
2195
|
+
|
|
2196
|
+
(datahike.db.AsOfDB.prototype.datahike$db$interface$IDB$_temporal_index_QMARK_$arity$1 = (function (db){
|
|
2197
|
+
var db__$1 = this;
|
|
2198
|
+
return datahike.db.interface$._keep_history_QMARK_(db__$1.origin_db);
|
|
2199
|
+
}));
|
|
2200
|
+
|
|
2201
|
+
(datahike.db.AsOfDB.prototype.datahike$db$interface$IDB$_keep_history_QMARK_$arity$1 = (function (db){
|
|
2202
|
+
var db__$1 = this;
|
|
2203
|
+
return datahike.db.interface$._keep_history_QMARK_(db__$1.origin_db);
|
|
2204
|
+
}));
|
|
2205
|
+
|
|
2206
|
+
(datahike.db.AsOfDB.prototype.datahike$db$interface$IDB$_max_tx$arity$1 = (function (db){
|
|
2207
|
+
var db__$1 = this;
|
|
2208
|
+
return datahike.db.interface$._max_tx(db__$1.origin_db);
|
|
2209
|
+
}));
|
|
2210
|
+
|
|
2211
|
+
(datahike.db.AsOfDB.prototype.datahike$db$interface$IDB$_max_eid$arity$1 = (function (db){
|
|
2212
|
+
var db__$1 = this;
|
|
2213
|
+
return datahike.db.interface$._max_eid(db__$1.origin_db);
|
|
2214
|
+
}));
|
|
2215
|
+
|
|
2216
|
+
(datahike.db.AsOfDB.prototype.datahike$db$interface$IDB$_config$arity$1 = (function (db){
|
|
2217
|
+
var db__$1 = this;
|
|
2218
|
+
return datahike.db.interface$._config(db__$1.origin_db);
|
|
2219
|
+
}));
|
|
2220
|
+
|
|
2221
|
+
(datahike.db.AsOfDB.prototype.datahike$db$interface$IDB$_ref_for$arity$2 = (function (db,a_ident){
|
|
2222
|
+
var db__$1 = this;
|
|
2223
|
+
return datahike.db.interface$._ref_for(db__$1.origin_db,a_ident);
|
|
2224
|
+
}));
|
|
2225
|
+
|
|
2226
|
+
(datahike.db.AsOfDB.prototype.datahike$db$interface$IDB$_ident_for$arity$2 = (function (db,a_ref){
|
|
2227
|
+
var db__$1 = this;
|
|
2228
|
+
return datahike.db.interface$._ident_for(db__$1.origin_db,a_ref);
|
|
2229
|
+
}));
|
|
2230
|
+
|
|
2231
|
+
(datahike.db.AsOfDB.prototype.cljs$core$IAssociative$ = cljs.core.PROTOCOL_SENTINEL);
|
|
2232
|
+
|
|
2233
|
+
(datahike.db.AsOfDB.prototype.cljs$core$IAssociative$_contains_key_QMARK_$arity$2 = (function (_,___$1){
|
|
2234
|
+
var ___$2 = this;
|
|
2235
|
+
throw (new Error("-contains-key? is not supported on AsOfDB"));
|
|
2236
|
+
}));
|
|
2237
|
+
|
|
2238
|
+
(datahike.db.AsOfDB.prototype.cljs$core$IAssociative$_assoc$arity$3 = (function (_,___$1,___$2){
|
|
2239
|
+
var ___$3 = this;
|
|
2240
|
+
throw (new Error("-assoc is not supported on AsOfDB"));
|
|
2241
|
+
}));
|
|
2242
|
+
|
|
2243
|
+
(datahike.db.AsOfDB.prototype.cljs$core$ISeqable$ = cljs.core.PROTOCOL_SENTINEL);
|
|
2244
|
+
|
|
2245
|
+
(datahike.db.AsOfDB.prototype.cljs$core$ISeqable$_seq$arity$1 = (function (db){
|
|
2246
|
+
var db__$1 = this;
|
|
2247
|
+
return datahike.db.interface$.datoms(db__$1,new cljs.core.Keyword(null,"eavt","eavt",-666437073),cljs.core.PersistentVector.EMPTY);
|
|
2248
|
+
}));
|
|
2249
|
+
|
|
2250
|
+
/**
|
|
2251
|
+
* @constructor
|
|
2252
|
+
* @implements {cljs.core.IRecord}
|
|
2253
|
+
* @implements {cljs.core.IKVReduce}
|
|
2254
|
+
* @implements {cljs.core.IEquiv}
|
|
2255
|
+
* @implements {cljs.core.IHash}
|
|
2256
|
+
* @implements {cljs.core.ICollection}
|
|
2257
|
+
* @implements {cljs.core.ICounted}
|
|
2258
|
+
* @implements {cljs.core.ISeqable}
|
|
2259
|
+
* @implements {cljs.core.IMeta}
|
|
2260
|
+
* @implements {cljs.core.ICloneable}
|
|
2261
|
+
* @implements {cljs.core.IPrintWithWriter}
|
|
2262
|
+
* @implements {cljs.core.IIterable}
|
|
2263
|
+
* @implements {cljs.core.IWithMeta}
|
|
2264
|
+
* @implements {cljs.core.IAssociative}
|
|
2265
|
+
* @implements {cljs.core.IMap}
|
|
2266
|
+
* @implements {cljs.core.ILookup}
|
|
2267
|
+
*/
|
|
2268
|
+
datahike.db.SinceDB = (function (origin_db,time_point,__meta,__extmap,__hash){
|
|
2269
|
+
this.origin_db = origin_db;
|
|
2270
|
+
this.time_point = time_point;
|
|
2271
|
+
this.__meta = __meta;
|
|
2272
|
+
this.__extmap = __extmap;
|
|
2273
|
+
this.__hash = __hash;
|
|
2274
|
+
this.cljs$lang$protocol_mask$partition0$ = 2230716170;
|
|
2275
|
+
this.cljs$lang$protocol_mask$partition1$ = 139264;
|
|
2276
|
+
});
|
|
2277
|
+
(datahike.db.SinceDB.prototype.cljs$core$ILookup$_lookup$arity$2 = (function (this__5300__auto__,k__5301__auto__){
|
|
2278
|
+
var self__ = this;
|
|
2279
|
+
var this__5300__auto____$1 = this;
|
|
2280
|
+
return this__5300__auto____$1.cljs$core$ILookup$_lookup$arity$3(null, k__5301__auto__,null);
|
|
2281
|
+
}));
|
|
2282
|
+
|
|
2283
|
+
(datahike.db.SinceDB.prototype.cljs$core$ILookup$_lookup$arity$3 = (function (this__5302__auto__,k58850,else__5303__auto__){
|
|
2284
|
+
var self__ = this;
|
|
2285
|
+
var this__5302__auto____$1 = this;
|
|
2286
|
+
var G__58854 = k58850;
|
|
2287
|
+
var G__58854__$1 = (((G__58854 instanceof cljs.core.Keyword))?G__58854.fqn:null);
|
|
2288
|
+
switch (G__58854__$1) {
|
|
2289
|
+
case "origin-db":
|
|
2290
|
+
return self__.origin_db;
|
|
2291
|
+
|
|
2292
|
+
break;
|
|
2293
|
+
case "time-point":
|
|
2294
|
+
return self__.time_point;
|
|
2295
|
+
|
|
2296
|
+
break;
|
|
2297
|
+
default:
|
|
2298
|
+
return cljs.core.get.cljs$core$IFn$_invoke$arity$3(self__.__extmap,k58850,else__5303__auto__);
|
|
2299
|
+
|
|
2300
|
+
}
|
|
2301
|
+
}));
|
|
2302
|
+
|
|
2303
|
+
(datahike.db.SinceDB.prototype.cljs$core$IKVReduce$_kv_reduce$arity$3 = (function (this__5320__auto__,f__5321__auto__,init__5322__auto__){
|
|
2304
|
+
var self__ = this;
|
|
2305
|
+
var this__5320__auto____$1 = this;
|
|
2306
|
+
return cljs.core.reduce.cljs$core$IFn$_invoke$arity$3((function (ret__5323__auto__,p__58855){
|
|
2307
|
+
var vec__58856 = p__58855;
|
|
2308
|
+
var k__5324__auto__ = cljs.core.nth.cljs$core$IFn$_invoke$arity$3(vec__58856,(0),null);
|
|
2309
|
+
var v__5325__auto__ = cljs.core.nth.cljs$core$IFn$_invoke$arity$3(vec__58856,(1),null);
|
|
2310
|
+
return (f__5321__auto__.cljs$core$IFn$_invoke$arity$3 ? f__5321__auto__.cljs$core$IFn$_invoke$arity$3(ret__5323__auto__,k__5324__auto__,v__5325__auto__) : f__5321__auto__.call(null, ret__5323__auto__,k__5324__auto__,v__5325__auto__));
|
|
2311
|
+
}),init__5322__auto__,this__5320__auto____$1);
|
|
2312
|
+
}));
|
|
2313
|
+
|
|
2314
|
+
(datahike.db.SinceDB.prototype.cljs$core$IPrintWithWriter$_pr_writer$arity$3 = (function (this__5315__auto__,writer__5316__auto__,opts__5317__auto__){
|
|
2315
|
+
var self__ = this;
|
|
2316
|
+
var this__5315__auto____$1 = this;
|
|
2317
|
+
var pr_pair__5318__auto__ = (function (keyval__5319__auto__){
|
|
2318
|
+
return cljs.core.pr_sequential_writer(writer__5316__auto__,cljs.core.pr_writer,""," ","",opts__5317__auto__,keyval__5319__auto__);
|
|
2319
|
+
});
|
|
2320
|
+
return cljs.core.pr_sequential_writer(writer__5316__auto__,pr_pair__5318__auto__,"#datahike.db.SinceDB{",", ","}",opts__5317__auto__,cljs.core.concat.cljs$core$IFn$_invoke$arity$2(new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [(new cljs.core.PersistentVector(null,2,(5),cljs.core.PersistentVector.EMPTY_NODE,[new cljs.core.Keyword(null,"origin-db","origin-db",635471481),self__.origin_db],null)),(new cljs.core.PersistentVector(null,2,(5),cljs.core.PersistentVector.EMPTY_NODE,[new cljs.core.Keyword(null,"time-point","time-point",-1243116005),self__.time_point],null))], null),self__.__extmap));
|
|
2321
|
+
}));
|
|
2322
|
+
|
|
2323
|
+
(datahike.db.SinceDB.prototype.cljs$core$IIterable$_iterator$arity$1 = (function (G__58849){
|
|
2324
|
+
var self__ = this;
|
|
2325
|
+
var G__58849__$1 = this;
|
|
2326
|
+
return (new cljs.core.RecordIter((0),G__58849__$1,2,new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"origin-db","origin-db",635471481),new cljs.core.Keyword(null,"time-point","time-point",-1243116005)], null),(cljs.core.truth_(self__.__extmap)?cljs.core._iterator(self__.__extmap):cljs.core.nil_iter())));
|
|
2327
|
+
}));
|
|
2328
|
+
|
|
2329
|
+
(datahike.db.SinceDB.prototype.cljs$core$IMeta$_meta$arity$1 = (function (this__5298__auto__){
|
|
2330
|
+
var self__ = this;
|
|
2331
|
+
var this__5298__auto____$1 = this;
|
|
2332
|
+
return self__.__meta;
|
|
2333
|
+
}));
|
|
2334
|
+
|
|
2335
|
+
(datahike.db.SinceDB.prototype.cljs$core$ICloneable$_clone$arity$1 = (function (this__5295__auto__){
|
|
2336
|
+
var self__ = this;
|
|
2337
|
+
var this__5295__auto____$1 = this;
|
|
2338
|
+
return (new datahike.db.SinceDB(self__.origin_db,self__.time_point,self__.__meta,self__.__extmap,self__.__hash));
|
|
2339
|
+
}));
|
|
2340
|
+
|
|
2341
|
+
(datahike.db.SinceDB.prototype.cljs$core$ICounted$_count$arity$1 = (function (this__5304__auto__){
|
|
2342
|
+
var self__ = this;
|
|
2343
|
+
var this__5304__auto____$1 = this;
|
|
2344
|
+
return (2 + cljs.core.count(self__.__extmap));
|
|
2345
|
+
}));
|
|
2346
|
+
|
|
2347
|
+
(datahike.db.SinceDB.prototype.cljs$core$IHash$_hash$arity$1 = (function (this__5296__auto__){
|
|
2348
|
+
var self__ = this;
|
|
2349
|
+
var this__5296__auto____$1 = this;
|
|
2350
|
+
var h__5111__auto__ = self__.__hash;
|
|
2351
|
+
if((!((h__5111__auto__ == null)))){
|
|
2352
|
+
return h__5111__auto__;
|
|
2353
|
+
} else {
|
|
2354
|
+
var h__5111__auto____$1 = (function (coll__5297__auto__){
|
|
2355
|
+
return (652373921 ^ cljs.core.hash_unordered_coll(coll__5297__auto__));
|
|
2356
|
+
})(this__5296__auto____$1);
|
|
2357
|
+
(self__.__hash = h__5111__auto____$1);
|
|
2358
|
+
|
|
2359
|
+
return h__5111__auto____$1;
|
|
2360
|
+
}
|
|
2361
|
+
}));
|
|
2362
|
+
|
|
2363
|
+
(datahike.db.SinceDB.prototype.cljs$core$IEquiv$_equiv$arity$2 = (function (this58851,other58852){
|
|
2364
|
+
var self__ = this;
|
|
2365
|
+
var this58851__$1 = this;
|
|
2366
|
+
return (((!((other58852 == null)))) && ((((this58851__$1.constructor === other58852.constructor)) && (((cljs.core._EQ_.cljs$core$IFn$_invoke$arity$2(this58851__$1.origin_db,other58852.origin_db)) && (((cljs.core._EQ_.cljs$core$IFn$_invoke$arity$2(this58851__$1.time_point,other58852.time_point)) && (cljs.core._EQ_.cljs$core$IFn$_invoke$arity$2(this58851__$1.__extmap,other58852.__extmap)))))))));
|
|
2367
|
+
}));
|
|
2368
|
+
|
|
2369
|
+
(datahike.db.SinceDB.prototype.cljs$core$IMap$_dissoc$arity$2 = (function (this__5310__auto__,k__5311__auto__){
|
|
2370
|
+
var self__ = this;
|
|
2371
|
+
var this__5310__auto____$1 = this;
|
|
2372
|
+
if(cljs.core.contains_QMARK_(new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null,"origin-db","origin-db",635471481),null,new cljs.core.Keyword(null,"time-point","time-point",-1243116005),null], null), null),k__5311__auto__)){
|
|
2373
|
+
return cljs.core.dissoc.cljs$core$IFn$_invoke$arity$2(cljs.core._with_meta(cljs.core.into.cljs$core$IFn$_invoke$arity$2(cljs.core.PersistentArrayMap.EMPTY,this__5310__auto____$1),self__.__meta),k__5311__auto__);
|
|
2374
|
+
} else {
|
|
2375
|
+
return (new datahike.db.SinceDB(self__.origin_db,self__.time_point,self__.__meta,cljs.core.not_empty(cljs.core.dissoc.cljs$core$IFn$_invoke$arity$2(self__.__extmap,k__5311__auto__)),null));
|
|
2376
|
+
}
|
|
2377
|
+
}));
|
|
2378
|
+
|
|
2379
|
+
(datahike.db.SinceDB.prototype.cljs$core$IAssociative$_contains_key_QMARK_$arity$2 = (function (this__5307__auto__,k58850){
|
|
2380
|
+
var self__ = this;
|
|
2381
|
+
var this__5307__auto____$1 = this;
|
|
2382
|
+
var G__58859 = k58850;
|
|
2383
|
+
var G__58859__$1 = (((G__58859 instanceof cljs.core.Keyword))?G__58859.fqn:null);
|
|
2384
|
+
switch (G__58859__$1) {
|
|
2385
|
+
case "origin-db":
|
|
2386
|
+
case "time-point":
|
|
2387
|
+
return true;
|
|
2388
|
+
|
|
2389
|
+
break;
|
|
2390
|
+
default:
|
|
2391
|
+
return cljs.core.contains_QMARK_(self__.__extmap,k58850);
|
|
2392
|
+
|
|
2393
|
+
}
|
|
2394
|
+
}));
|
|
2395
|
+
|
|
2396
|
+
(datahike.db.SinceDB.prototype.cljs$core$IAssociative$_assoc$arity$3 = (function (this__5308__auto__,k__5309__auto__,G__58849){
|
|
2397
|
+
var self__ = this;
|
|
2398
|
+
var this__5308__auto____$1 = this;
|
|
2399
|
+
var pred__58860 = cljs.core.keyword_identical_QMARK_;
|
|
2400
|
+
var expr__58861 = k__5309__auto__;
|
|
2401
|
+
if(cljs.core.truth_((pred__58860.cljs$core$IFn$_invoke$arity$2 ? pred__58860.cljs$core$IFn$_invoke$arity$2(new cljs.core.Keyword(null,"origin-db","origin-db",635471481),expr__58861) : pred__58860.call(null, new cljs.core.Keyword(null,"origin-db","origin-db",635471481),expr__58861)))){
|
|
2402
|
+
return (new datahike.db.SinceDB(G__58849,self__.time_point,self__.__meta,self__.__extmap,null));
|
|
2403
|
+
} else {
|
|
2404
|
+
if(cljs.core.truth_((pred__58860.cljs$core$IFn$_invoke$arity$2 ? pred__58860.cljs$core$IFn$_invoke$arity$2(new cljs.core.Keyword(null,"time-point","time-point",-1243116005),expr__58861) : pred__58860.call(null, new cljs.core.Keyword(null,"time-point","time-point",-1243116005),expr__58861)))){
|
|
2405
|
+
return (new datahike.db.SinceDB(self__.origin_db,G__58849,self__.__meta,self__.__extmap,null));
|
|
2406
|
+
} else {
|
|
2407
|
+
return (new datahike.db.SinceDB(self__.origin_db,self__.time_point,self__.__meta,cljs.core.assoc.cljs$core$IFn$_invoke$arity$3(self__.__extmap,k__5309__auto__,G__58849),null));
|
|
2408
|
+
}
|
|
2409
|
+
}
|
|
2410
|
+
}));
|
|
2411
|
+
|
|
2412
|
+
(datahike.db.SinceDB.prototype.cljs$core$ISeqable$_seq$arity$1 = (function (this__5313__auto__){
|
|
2413
|
+
var self__ = this;
|
|
2414
|
+
var this__5313__auto____$1 = this;
|
|
2415
|
+
return cljs.core.seq(cljs.core.concat.cljs$core$IFn$_invoke$arity$2(new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [(new cljs.core.MapEntry(new cljs.core.Keyword(null,"origin-db","origin-db",635471481),self__.origin_db,null)),(new cljs.core.MapEntry(new cljs.core.Keyword(null,"time-point","time-point",-1243116005),self__.time_point,null))], null),self__.__extmap));
|
|
2416
|
+
}));
|
|
2417
|
+
|
|
2418
|
+
(datahike.db.SinceDB.prototype.cljs$core$IWithMeta$_with_meta$arity$2 = (function (this__5299__auto__,G__58849){
|
|
2419
|
+
var self__ = this;
|
|
2420
|
+
var this__5299__auto____$1 = this;
|
|
2421
|
+
return (new datahike.db.SinceDB(self__.origin_db,self__.time_point,G__58849,self__.__extmap,self__.__hash));
|
|
2422
|
+
}));
|
|
2423
|
+
|
|
2424
|
+
(datahike.db.SinceDB.prototype.cljs$core$ICollection$_conj$arity$2 = (function (this__5305__auto__,entry__5306__auto__){
|
|
2425
|
+
var self__ = this;
|
|
2426
|
+
var this__5305__auto____$1 = this;
|
|
2427
|
+
if(cljs.core.vector_QMARK_(entry__5306__auto__)){
|
|
2428
|
+
return this__5305__auto____$1.cljs$core$IAssociative$_assoc$arity$3(null, cljs.core._nth(entry__5306__auto__,(0)),cljs.core._nth(entry__5306__auto__,(1)));
|
|
2429
|
+
} else {
|
|
2430
|
+
return cljs.core.reduce.cljs$core$IFn$_invoke$arity$3(cljs.core._conj,this__5305__auto____$1,entry__5306__auto__);
|
|
2431
|
+
}
|
|
2432
|
+
}));
|
|
2433
|
+
|
|
2434
|
+
(datahike.db.SinceDB.getBasis = (function (){
|
|
2435
|
+
return new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Symbol(null,"origin-db","origin-db",-2018964288,null),new cljs.core.Symbol(null,"time-point","time-point",397415522,null)], null);
|
|
2436
|
+
}));
|
|
2437
|
+
|
|
2438
|
+
(datahike.db.SinceDB.cljs$lang$type = true);
|
|
2439
|
+
|
|
2440
|
+
(datahike.db.SinceDB.cljs$lang$ctorPrSeq = (function (this__5346__auto__){
|
|
2441
|
+
return (new cljs.core.List(null,"datahike.db/SinceDB",null,(1),null));
|
|
2442
|
+
}));
|
|
2443
|
+
|
|
2444
|
+
(datahike.db.SinceDB.cljs$lang$ctorPrWriter = (function (this__5346__auto__,writer__5347__auto__){
|
|
2445
|
+
return cljs.core._write(writer__5347__auto__,"datahike.db/SinceDB");
|
|
2446
|
+
}));
|
|
2447
|
+
|
|
2448
|
+
/**
|
|
2449
|
+
* Positional factory function for datahike.db/SinceDB.
|
|
2450
|
+
*/
|
|
2451
|
+
datahike.db.__GT_SinceDB = (function datahike$db$__GT_SinceDB(origin_db,time_point){
|
|
2452
|
+
return (new datahike.db.SinceDB(origin_db,time_point,null,null,null));
|
|
2453
|
+
});
|
|
2454
|
+
|
|
2455
|
+
/**
|
|
2456
|
+
* Factory function for datahike.db/SinceDB, taking a map of keywords to field values.
|
|
2457
|
+
*/
|
|
2458
|
+
datahike.db.map__GT_SinceDB = (function datahike$db$map__GT_SinceDB(G__58853){
|
|
2459
|
+
var extmap__5342__auto__ = (function (){var G__58863 = cljs.core.dissoc.cljs$core$IFn$_invoke$arity$variadic(G__58853,new cljs.core.Keyword(null,"origin-db","origin-db",635471481),cljs.core.prim_seq.cljs$core$IFn$_invoke$arity$2([new cljs.core.Keyword(null,"time-point","time-point",-1243116005)], 0));
|
|
2460
|
+
if(cljs.core.record_QMARK_(G__58853)){
|
|
2461
|
+
return cljs.core.into.cljs$core$IFn$_invoke$arity$2(cljs.core.PersistentArrayMap.EMPTY,G__58863);
|
|
2462
|
+
} else {
|
|
2463
|
+
return G__58863;
|
|
2464
|
+
}
|
|
2465
|
+
})();
|
|
2466
|
+
return (new datahike.db.SinceDB(new cljs.core.Keyword(null,"origin-db","origin-db",635471481).cljs$core$IFn$_invoke$arity$1(G__58853),new cljs.core.Keyword(null,"time-point","time-point",-1243116005).cljs$core$IFn$_invoke$arity$1(G__58853),null,cljs.core.not_empty(extmap__5342__auto__),null));
|
|
2467
|
+
});
|
|
2468
|
+
|
|
2469
|
+
|
|
2470
|
+
(datahike.db.SinceDB.prototype.datahike$db$interface$ISearch$ = cljs.core.PROTOCOL_SENTINEL);
|
|
2471
|
+
|
|
2472
|
+
(datahike.db.SinceDB.prototype.datahike$db$interface$ISearch$_search_context$arity$1 = (function (db){
|
|
2473
|
+
var db__$1 = this;
|
|
2474
|
+
return datahike.db.interface$.context_with_temporal_timepred(datahike.db.interface$._search_context(db__$1.origin_db),datahike.db.since_pred(db__$1.time_point));
|
|
2475
|
+
}));
|
|
2476
|
+
|
|
2477
|
+
(datahike.db.SinceDB.prototype.datahike$db$interface$ISearch$_search$arity$3 = (function (db,pattern,context){
|
|
2478
|
+
var db__$1 = this;
|
|
2479
|
+
return datahike.db.interface$._search(db__$1.origin_db,pattern,context);
|
|
2480
|
+
}));
|
|
2481
|
+
|
|
2482
|
+
(datahike.db.SinceDB.prototype.datahike$db$interface$ISearch$_batch_search$arity$4 = (function (db,pattern,batch_fn,context){
|
|
2483
|
+
var db__$1 = this;
|
|
2484
|
+
return datahike.db.interface$._batch_search(db__$1.origin_db,pattern,batch_fn,context);
|
|
2485
|
+
}));
|
|
2486
|
+
|
|
2487
|
+
(datahike.db.SinceDB.prototype.datahike$db$interface$IIndexAccess$ = cljs.core.PROTOCOL_SENTINEL);
|
|
2488
|
+
|
|
2489
|
+
(datahike.db.SinceDB.prototype.datahike$db$interface$IIndexAccess$_datoms$arity$4 = (function (db,index_type,cs,context){
|
|
2490
|
+
var db__$1 = this;
|
|
2491
|
+
return datahike.db.interface$._datoms(db__$1.origin_db,index_type,cs,context);
|
|
2492
|
+
}));
|
|
2493
|
+
|
|
2494
|
+
(datahike.db.SinceDB.prototype.datahike$db$interface$IIndexAccess$_seek_datoms$arity$4 = (function (db,index_type,cs,context){
|
|
2495
|
+
var db__$1 = this;
|
|
2496
|
+
return datahike.db.interface$._seek_datoms(db__$1.origin_db,index_type,cs,context);
|
|
2497
|
+
}));
|
|
2498
|
+
|
|
2499
|
+
(datahike.db.SinceDB.prototype.datahike$db$interface$IIndexAccess$_rseek_datoms$arity$4 = (function (db,index_type,cs,context){
|
|
2500
|
+
var db__$1 = this;
|
|
2501
|
+
return datahike.db.interface$._rseek_datoms(db__$1.origin_db,index_type,cs,context);
|
|
2502
|
+
}));
|
|
2503
|
+
|
|
2504
|
+
(datahike.db.SinceDB.prototype.datahike$db$interface$IIndexAccess$_index_range$arity$5 = (function (db,attr,start,end,context){
|
|
2505
|
+
var db__$1 = this;
|
|
2506
|
+
return datahike.db.deeper_index_range(db__$1.origin_db,db__$1,attr,start,end,context);
|
|
2507
|
+
}));
|
|
2508
|
+
|
|
2509
|
+
(datahike.db.SinceDB.prototype.cljs$core$ILookup$ = cljs.core.PROTOCOL_SENTINEL);
|
|
2510
|
+
|
|
2511
|
+
(datahike.db.SinceDB.prototype.cljs$core$ILookup$_lookup$arity$2 = (function (_,___$1){
|
|
2512
|
+
var ___$2 = this;
|
|
2513
|
+
throw (new Error("-lookup is not supported on SinceDB"));
|
|
2514
|
+
}));
|
|
2515
|
+
|
|
2516
|
+
(datahike.db.SinceDB.prototype.cljs$core$ILookup$_lookup$arity$3 = (function (_,___$1,___$2){
|
|
2517
|
+
var ___$3 = this;
|
|
2518
|
+
throw (new Error("-lookup is not supported on SinceDB"));
|
|
2519
|
+
}));
|
|
2520
|
+
|
|
2521
|
+
(datahike.db.SinceDB.prototype.cljs$core$IPrintWithWriter$ = cljs.core.PROTOCOL_SENTINEL);
|
|
2522
|
+
|
|
2523
|
+
(datahike.db.SinceDB.prototype.cljs$core$IPrintWithWriter$_pr_writer$arity$3 = (function (db,w,opts){
|
|
2524
|
+
var db__$1 = this;
|
|
2525
|
+
return (datahike.db.pr_db.cljs$core$IFn$_invoke$arity$3 ? datahike.db.pr_db.cljs$core$IFn$_invoke$arity$3(db__$1,w,opts) : datahike.db.pr_db.call(null, db__$1,w,opts));
|
|
2526
|
+
}));
|
|
2527
|
+
|
|
2528
|
+
(datahike.db.SinceDB.prototype.datahike$db$interface$IHistory$ = cljs.core.PROTOCOL_SENTINEL);
|
|
2529
|
+
|
|
2530
|
+
(datahike.db.SinceDB.prototype.datahike$db$interface$IHistory$_time_point$arity$1 = (function (db){
|
|
2531
|
+
var db__$1 = this;
|
|
2532
|
+
return db__$1.time_point;
|
|
2533
|
+
}));
|
|
2534
|
+
|
|
2535
|
+
(datahike.db.SinceDB.prototype.datahike$db$interface$IHistory$_origin$arity$1 = (function (db){
|
|
2536
|
+
var db__$1 = this;
|
|
2537
|
+
return db__$1.origin_db;
|
|
2538
|
+
}));
|
|
2539
|
+
|
|
2540
|
+
(datahike.db.SinceDB.prototype.cljs$core$ICounted$ = cljs.core.PROTOCOL_SENTINEL);
|
|
2541
|
+
|
|
2542
|
+
(datahike.db.SinceDB.prototype.cljs$core$ICounted$_count$arity$1 = (function (db){
|
|
2543
|
+
var db__$1 = this;
|
|
2544
|
+
return cljs.core.count(datahike.db.interface$.datoms(db__$1,new cljs.core.Keyword(null,"eavt","eavt",-666437073),cljs.core.PersistentVector.EMPTY));
|
|
2545
|
+
}));
|
|
2546
|
+
|
|
2547
|
+
(datahike.db.SinceDB.prototype.cljs$core$IEquiv$ = cljs.core.PROTOCOL_SENTINEL);
|
|
2548
|
+
|
|
2549
|
+
(datahike.db.SinceDB.prototype.cljs$core$IEquiv$_equiv$arity$2 = (function (db,other){
|
|
2550
|
+
var db__$1 = this;
|
|
2551
|
+
return (datahike.db.equiv_db.cljs$core$IFn$_invoke$arity$2 ? datahike.db.equiv_db.cljs$core$IFn$_invoke$arity$2(db__$1,other) : datahike.db.equiv_db.call(null, db__$1,other));
|
|
2552
|
+
}));
|
|
2553
|
+
|
|
2554
|
+
(datahike.db.SinceDB.prototype.cljs$core$IEmptyableCollection$ = cljs.core.PROTOCOL_SENTINEL);
|
|
2555
|
+
|
|
2556
|
+
(datahike.db.SinceDB.prototype.cljs$core$IEmptyableCollection$_empty$arity$1 = (function (_){
|
|
2557
|
+
var ___$1 = this;
|
|
2558
|
+
throw (new Error("-empty is not supported on SinceDB"));
|
|
2559
|
+
}));
|
|
2560
|
+
|
|
2561
|
+
(datahike.db.SinceDB.prototype.datahike$db$interface$IDB$ = cljs.core.PROTOCOL_SENTINEL);
|
|
2562
|
+
|
|
2563
|
+
(datahike.db.SinceDB.prototype.datahike$db$interface$IDB$_schema$arity$1 = (function (db){
|
|
2564
|
+
var db__$1 = this;
|
|
2565
|
+
return datahike.db.interface$._schema(db__$1.origin_db);
|
|
2566
|
+
}));
|
|
2567
|
+
|
|
2568
|
+
(datahike.db.SinceDB.prototype.datahike$db$interface$IDB$_rschema$arity$1 = (function (db){
|
|
2569
|
+
var db__$1 = this;
|
|
2570
|
+
return datahike.db.interface$._rschema(db__$1.origin_db);
|
|
2571
|
+
}));
|
|
2572
|
+
|
|
2573
|
+
(datahike.db.SinceDB.prototype.datahike$db$interface$IDB$_system_entities$arity$1 = (function (db){
|
|
2574
|
+
var db__$1 = this;
|
|
2575
|
+
return datahike.db.interface$._system_entities(db__$1.origin_db);
|
|
2576
|
+
}));
|
|
2577
|
+
|
|
2578
|
+
(datahike.db.SinceDB.prototype.datahike$db$interface$IDB$_attrs_by$arity$2 = (function (db,property){
|
|
2579
|
+
var db__$1 = this;
|
|
2580
|
+
return datahike.db.interface$._attrs_by(db__$1.origin_db,property);
|
|
2581
|
+
}));
|
|
2582
|
+
|
|
2583
|
+
(datahike.db.SinceDB.prototype.datahike$db$interface$IDB$_temporal_index_QMARK_$arity$1 = (function (db){
|
|
2584
|
+
var db__$1 = this;
|
|
2585
|
+
return datahike.db.interface$._keep_history_QMARK_(db__$1.origin_db);
|
|
2586
|
+
}));
|
|
2587
|
+
|
|
2588
|
+
(datahike.db.SinceDB.prototype.datahike$db$interface$IDB$_keep_history_QMARK_$arity$1 = (function (db){
|
|
2589
|
+
var db__$1 = this;
|
|
2590
|
+
return datahike.db.interface$._keep_history_QMARK_(db__$1.origin_db);
|
|
2591
|
+
}));
|
|
2592
|
+
|
|
2593
|
+
(datahike.db.SinceDB.prototype.datahike$db$interface$IDB$_max_tx$arity$1 = (function (db){
|
|
2594
|
+
var db__$1 = this;
|
|
2595
|
+
return datahike.db.interface$._max_tx(db__$1.origin_db);
|
|
2596
|
+
}));
|
|
2597
|
+
|
|
2598
|
+
(datahike.db.SinceDB.prototype.datahike$db$interface$IDB$_max_eid$arity$1 = (function (db){
|
|
2599
|
+
var db__$1 = this;
|
|
2600
|
+
return datahike.db.interface$._max_eid(db__$1.origin_db);
|
|
2601
|
+
}));
|
|
2602
|
+
|
|
2603
|
+
(datahike.db.SinceDB.prototype.datahike$db$interface$IDB$_config$arity$1 = (function (db){
|
|
2604
|
+
var db__$1 = this;
|
|
2605
|
+
return datahike.db.interface$._config(db__$1.origin_db);
|
|
2606
|
+
}));
|
|
2607
|
+
|
|
2608
|
+
(datahike.db.SinceDB.prototype.datahike$db$interface$IDB$_ref_for$arity$2 = (function (db,a_ident){
|
|
2609
|
+
var db__$1 = this;
|
|
2610
|
+
return datahike.db.interface$._ref_for(db__$1.origin_db,a_ident);
|
|
2611
|
+
}));
|
|
2612
|
+
|
|
2613
|
+
(datahike.db.SinceDB.prototype.datahike$db$interface$IDB$_ident_for$arity$2 = (function (db,a_ref){
|
|
2614
|
+
var db__$1 = this;
|
|
2615
|
+
return datahike.db.interface$._ident_for(db__$1.origin_db,a_ref);
|
|
2616
|
+
}));
|
|
2617
|
+
|
|
2618
|
+
(datahike.db.SinceDB.prototype.cljs$core$IAssociative$ = cljs.core.PROTOCOL_SENTINEL);
|
|
2619
|
+
|
|
2620
|
+
(datahike.db.SinceDB.prototype.cljs$core$IAssociative$_contains_key_QMARK_$arity$2 = (function (_,___$1){
|
|
2621
|
+
var ___$2 = this;
|
|
2622
|
+
throw (new Error("-contains-key? is not supported on SinceDB"));
|
|
2623
|
+
}));
|
|
2624
|
+
|
|
2625
|
+
(datahike.db.SinceDB.prototype.cljs$core$IAssociative$_assoc$arity$3 = (function (_,___$1,___$2){
|
|
2626
|
+
var ___$3 = this;
|
|
2627
|
+
throw (new Error("-assoc is not supported on SinceDB"));
|
|
2628
|
+
}));
|
|
2629
|
+
|
|
2630
|
+
(datahike.db.SinceDB.prototype.cljs$core$ISeqable$ = cljs.core.PROTOCOL_SENTINEL);
|
|
2631
|
+
|
|
2632
|
+
(datahike.db.SinceDB.prototype.cljs$core$ISeqable$_seq$arity$1 = (function (db){
|
|
2633
|
+
var db__$1 = this;
|
|
2634
|
+
return datahike.db.interface$.datoms(db__$1,new cljs.core.Keyword(null,"eavt","eavt",-666437073),cljs.core.PersistentVector.EMPTY);
|
|
2635
|
+
}));
|
|
2636
|
+
datahike.db.equiv_db_index = (function datahike$db$equiv_db_index(x,y){
|
|
2637
|
+
var xs = cljs.core.seq(x);
|
|
2638
|
+
var ys = cljs.core.seq(y);
|
|
2639
|
+
while(true){
|
|
2640
|
+
if((xs == null)){
|
|
2641
|
+
return (ys == null);
|
|
2642
|
+
} else {
|
|
2643
|
+
if(cljs.core._EQ_.cljs$core$IFn$_invoke$arity$2(cljs.core.first(xs),cljs.core.first(ys))){
|
|
2644
|
+
var G__59011 = cljs.core.next(xs);
|
|
2645
|
+
var G__59012 = cljs.core.next(ys);
|
|
2646
|
+
xs = G__59011;
|
|
2647
|
+
ys = G__59012;
|
|
2648
|
+
continue;
|
|
2649
|
+
} else {
|
|
2650
|
+
return false;
|
|
2651
|
+
|
|
2652
|
+
}
|
|
2653
|
+
}
|
|
2654
|
+
break;
|
|
2655
|
+
}
|
|
2656
|
+
});
|
|
2657
|
+
datahike.db.equiv_db = (function datahike$db$equiv_db(db,other){
|
|
2658
|
+
return (((((other instanceof datahike.db.DB)) || ((other instanceof datahike.db.FilteredDB)))) && ((((((!((other instanceof datahike.db.DB)))) || (cljs.core._EQ_.cljs$core$IFn$_invoke$arity$2(cljs.core.hash(db),cljs.core.hash(other))))) && (((cljs.core._EQ_.cljs$core$IFn$_invoke$arity$2(datahike.db.interface$._schema(db),datahike.db.interface$._schema(other))) && (datahike.db.equiv_db_index(datahike.db.interface$.datoms(db,new cljs.core.Keyword(null,"eavt","eavt",-666437073),cljs.core.PersistentVector.EMPTY),datahike.db.interface$.datoms(other,new cljs.core.Keyword(null,"eavt","eavt",-666437073),cljs.core.PersistentVector.EMPTY))))))));
|
|
2659
|
+
});
|
|
2660
|
+
datahike.db.pr_db = (function datahike$db$pr_db(db,w,opts){
|
|
2661
|
+
cljs.core._write(w,"#datahike/DB {");
|
|
2662
|
+
|
|
2663
|
+
cljs.core._write(w,[":max-tx ",cljs.core.str.cljs$core$IFn$_invoke$arity$1(datahike.db.interface$._max_tx(db))," "].join(''));
|
|
2664
|
+
|
|
2665
|
+
cljs.core._write(w,[":max-eid ",cljs.core.str.cljs$core$IFn$_invoke$arity$1(datahike.db.interface$._max_eid(db))," "].join(''));
|
|
2666
|
+
|
|
2667
|
+
return cljs.core._write(w,"}");
|
|
2668
|
+
});
|
|
2669
|
+
datahike.db.validate_schema_key = (function datahike$db$validate_schema_key(a,k,v,expected){
|
|
2670
|
+
if((((v == null)) || (cljs.core.contains_QMARK_(expected,v)))){
|
|
2671
|
+
return null;
|
|
2672
|
+
} else {
|
|
2673
|
+
throw cljs.core.ex_info.cljs$core$IFn$_invoke$arity$2(["Bad attribute specification for ",cljs.core.pr_str.cljs$core$IFn$_invoke$arity$variadic(cljs.core.prim_seq.cljs$core$IFn$_invoke$arity$2([cljs.core.PersistentArrayMap.createAsIfByAssoc([a,cljs.core.PersistentArrayMap.createAsIfByAssoc([k,v])])], 0)),", expected one of ",cljs.core.str.cljs$core$IFn$_invoke$arity$1(expected)].join(''),new cljs.core.PersistentArrayMap(null, 4, [new cljs.core.Keyword(null,"error","error",-978969032),new cljs.core.Keyword("schema","validation","schema/validation",1178447161),new cljs.core.Keyword(null,"attribute","attribute",-2074029119),a,new cljs.core.Keyword(null,"key","key",-1516042587),k,new cljs.core.Keyword(null,"value","value",305978217),v], null));
|
|
2674
|
+
}
|
|
2675
|
+
});
|
|
2676
|
+
datahike.db.validate_tuple_schema = (function datahike$db$validate_tuple_schema(a,kv){
|
|
2677
|
+
if(cljs.core._EQ_.cljs$core$IFn$_invoke$arity$2(new cljs.core.Keyword("db.type","tuple","db.type/tuple",938234914),new cljs.core.Keyword("db","valueType","db/valueType",1827971944).cljs$core$IFn$_invoke$arity$1(kv))){
|
|
2678
|
+
var G__58864 = cljs.core.some(new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword("db","tupleType","db/tupleType",448013354),null,new cljs.core.Keyword("db","tupleTypes","db/tupleTypes",1512507626),null,new cljs.core.Keyword("db","tupleAttrs","db/tupleAttrs",250080092),null], null), null),cljs.core.keys(kv));
|
|
2679
|
+
var G__58864__$1 = (((G__58864 instanceof cljs.core.Keyword))?G__58864.fqn:null);
|
|
2680
|
+
switch (G__58864__$1) {
|
|
2681
|
+
case "db/tupleAttrs":
|
|
2682
|
+
if((!(cljs.core.vector_QMARK_(new cljs.core.Keyword("db","tupleAttrs","db/tupleAttrs",250080092).cljs$core$IFn$_invoke$arity$1(kv))))){
|
|
2683
|
+
throw cljs.core.ex_info.cljs$core$IFn$_invoke$arity$2(["Bad attribute specification for ",cljs.core.str.cljs$core$IFn$_invoke$arity$1(a),": {:db/tupleAttrs ...} should be a vector}"].join(''),new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null,"error","error",-978969032),new cljs.core.Keyword("schema","validation","schema/validation",1178447161),new cljs.core.Keyword(null,"attribute","attribute",-2074029119),a,new cljs.core.Keyword(null,"key","key",-1516042587),new cljs.core.Keyword("db","tupleAttrs","db/tupleAttrs",250080092)], null));
|
|
2684
|
+
} else {
|
|
2685
|
+
return null;
|
|
2686
|
+
}
|
|
2687
|
+
|
|
2688
|
+
break;
|
|
2689
|
+
case "db/tupleTypes":
|
|
2690
|
+
if((!(cljs.core.vector_QMARK_(new cljs.core.Keyword("db","tupleTypes","db/tupleTypes",1512507626).cljs$core$IFn$_invoke$arity$1(kv))))){
|
|
2691
|
+
throw cljs.core.ex_info.cljs$core$IFn$_invoke$arity$2(["Bad attribute specification for ",cljs.core.str.cljs$core$IFn$_invoke$arity$1(a),": {:db/tupleTypes ...} should be a vector}"].join(''),new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null,"error","error",-978969032),new cljs.core.Keyword("schema","validation","schema/validation",1178447161),new cljs.core.Keyword(null,"attribute","attribute",-2074029119),a,new cljs.core.Keyword(null,"key","key",-1516042587),new cljs.core.Keyword("db","tupleTypes","db/tupleTypes",1512507626)], null));
|
|
2692
|
+
} else {
|
|
2693
|
+
return null;
|
|
2694
|
+
}
|
|
2695
|
+
|
|
2696
|
+
break;
|
|
2697
|
+
case "db/tupleType":
|
|
2698
|
+
if((!((new cljs.core.Keyword("db","tupleType","db/tupleType",448013354).cljs$core$IFn$_invoke$arity$1(kv) instanceof cljs.core.Keyword)))){
|
|
2699
|
+
throw cljs.core.ex_info.cljs$core$IFn$_invoke$arity$2(["Bad attribute specification for ",cljs.core.str.cljs$core$IFn$_invoke$arity$1(a),": {:db/tupleType ...} should be a keyword}"].join(''),new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null,"error","error",-978969032),new cljs.core.Keyword("schema","validation","schema/validation",1178447161),new cljs.core.Keyword(null,"attribute","attribute",-2074029119),a,new cljs.core.Keyword(null,"key","key",-1516042587),new cljs.core.Keyword("db","tupleType","db/tupleType",448013354)], null));
|
|
2700
|
+
} else {
|
|
2701
|
+
return null;
|
|
2702
|
+
}
|
|
2703
|
+
|
|
2704
|
+
break;
|
|
2705
|
+
default:
|
|
2706
|
+
throw (new Error(["No matching clause: ",cljs.core.str.cljs$core$IFn$_invoke$arity$1(G__58864__$1)].join('')));
|
|
2707
|
+
|
|
2708
|
+
}
|
|
2709
|
+
} else {
|
|
2710
|
+
return null;
|
|
2711
|
+
}
|
|
2712
|
+
});
|
|
2713
|
+
datahike.db.validate_schema = (function datahike$db$validate_schema(schema){
|
|
2714
|
+
var seq__58865 = cljs.core.seq(schema);
|
|
2715
|
+
var chunk__58866 = null;
|
|
2716
|
+
var count__58867 = (0);
|
|
2717
|
+
var i__58868 = (0);
|
|
2718
|
+
while(true){
|
|
2719
|
+
if((i__58868 < count__58867)){
|
|
2720
|
+
var vec__58875 = chunk__58866.cljs$core$IIndexed$_nth$arity$2(null, i__58868);
|
|
2721
|
+
var a_ident = cljs.core.nth.cljs$core$IFn$_invoke$arity$3(vec__58875,(0),null);
|
|
2722
|
+
var kv = cljs.core.nth.cljs$core$IFn$_invoke$arity$3(vec__58875,(1),null);
|
|
2723
|
+
var comp_QMARK__59014 = new cljs.core.Keyword("db","isComponent","db/isComponent",423352398).cljs$core$IFn$_invoke$arity$2(kv,false);
|
|
2724
|
+
datahike.db.validate_schema_key(a_ident,new cljs.core.Keyword("db","isComponent","db/isComponent",423352398),new cljs.core.Keyword("db","isComponent","db/isComponent",423352398).cljs$core$IFn$_invoke$arity$1(kv),new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 2, [true,null,false,null], null), null));
|
|
2725
|
+
|
|
2726
|
+
if(cljs.core.truth_((function (){var and__5000__auto__ = comp_QMARK__59014;
|
|
2727
|
+
if(cljs.core.truth_(and__5000__auto__)){
|
|
2728
|
+
return cljs.core.not_EQ_.cljs$core$IFn$_invoke$arity$2(new cljs.core.Keyword("db","valueType","db/valueType",1827971944).cljs$core$IFn$_invoke$arity$1(kv),new cljs.core.Keyword("db.type","ref","db.type/ref",-1728373079));
|
|
2729
|
+
} else {
|
|
2730
|
+
return and__5000__auto__;
|
|
2731
|
+
}
|
|
2732
|
+
})())){
|
|
2733
|
+
throw cljs.core.ex_info.cljs$core$IFn$_invoke$arity$2(["Bad attribute specification for ",cljs.core.str.cljs$core$IFn$_invoke$arity$1(a_ident),": {:db/isComponent true} should also have {:db/valueType :db.type/ref}"].join(''),new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null,"error","error",-978969032),new cljs.core.Keyword("schema","validation","schema/validation",1178447161),new cljs.core.Keyword(null,"attribute","attribute",-2074029119),a_ident,new cljs.core.Keyword(null,"key","key",-1516042587),new cljs.core.Keyword("db","isComponent","db/isComponent",423352398)], null));
|
|
2734
|
+
} else {
|
|
2735
|
+
}
|
|
2736
|
+
|
|
2737
|
+
datahike.db.validate_schema_key(a_ident,new cljs.core.Keyword("db","unique","db/unique",329396388),new cljs.core.Keyword("db","unique","db/unique",329396388).cljs$core$IFn$_invoke$arity$1(kv),new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword("db.unique","identity","db.unique/identity",1675950722),null,new cljs.core.Keyword("db.unique","value","db.unique/value",276903088),null], null), null));
|
|
2738
|
+
|
|
2739
|
+
datahike.db.validate_schema_key(a_ident,new cljs.core.Keyword("db","valueType","db/valueType",1827971944),new cljs.core.Keyword("db","valueType","db/valueType",1827971944).cljs$core$IFn$_invoke$arity$1(kv),new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword("db.type","tuple","db.type/tuple",938234914),null,new cljs.core.Keyword("db.type","ref","db.type/ref",-1728373079),null], null), null));
|
|
2740
|
+
|
|
2741
|
+
datahike.db.validate_schema_key(a_ident,new cljs.core.Keyword("db","cardinality","db/cardinality",-104975659),new cljs.core.Keyword("db","cardinality","db/cardinality",-104975659).cljs$core$IFn$_invoke$arity$1(kv),new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword("db.cardinality","many","db.cardinality/many",772806234),null,new cljs.core.Keyword("db.cardinality","one","db.cardinality/one",1428352190),null], null), null));
|
|
2742
|
+
|
|
2743
|
+
datahike.db.validate_tuple_schema(a_ident,kv);
|
|
2744
|
+
|
|
2745
|
+
|
|
2746
|
+
var G__59015 = seq__58865;
|
|
2747
|
+
var G__59016 = chunk__58866;
|
|
2748
|
+
var G__59017 = count__58867;
|
|
2749
|
+
var G__59018 = (i__58868 + (1));
|
|
2750
|
+
seq__58865 = G__59015;
|
|
2751
|
+
chunk__58866 = G__59016;
|
|
2752
|
+
count__58867 = G__59017;
|
|
2753
|
+
i__58868 = G__59018;
|
|
2754
|
+
continue;
|
|
2755
|
+
} else {
|
|
2756
|
+
var temp__5804__auto__ = cljs.core.seq(seq__58865);
|
|
2757
|
+
if(temp__5804__auto__){
|
|
2758
|
+
var seq__58865__$1 = temp__5804__auto__;
|
|
2759
|
+
if(cljs.core.chunked_seq_QMARK_(seq__58865__$1)){
|
|
2760
|
+
var c__5525__auto__ = cljs.core.chunk_first(seq__58865__$1);
|
|
2761
|
+
var G__59020 = cljs.core.chunk_rest(seq__58865__$1);
|
|
2762
|
+
var G__59021 = c__5525__auto__;
|
|
2763
|
+
var G__59022 = cljs.core.count(c__5525__auto__);
|
|
2764
|
+
var G__59023 = (0);
|
|
2765
|
+
seq__58865 = G__59020;
|
|
2766
|
+
chunk__58866 = G__59021;
|
|
2767
|
+
count__58867 = G__59022;
|
|
2768
|
+
i__58868 = G__59023;
|
|
2769
|
+
continue;
|
|
2770
|
+
} else {
|
|
2771
|
+
var vec__58878 = cljs.core.first(seq__58865__$1);
|
|
2772
|
+
var a_ident = cljs.core.nth.cljs$core$IFn$_invoke$arity$3(vec__58878,(0),null);
|
|
2773
|
+
var kv = cljs.core.nth.cljs$core$IFn$_invoke$arity$3(vec__58878,(1),null);
|
|
2774
|
+
var comp_QMARK__59024 = new cljs.core.Keyword("db","isComponent","db/isComponent",423352398).cljs$core$IFn$_invoke$arity$2(kv,false);
|
|
2775
|
+
datahike.db.validate_schema_key(a_ident,new cljs.core.Keyword("db","isComponent","db/isComponent",423352398),new cljs.core.Keyword("db","isComponent","db/isComponent",423352398).cljs$core$IFn$_invoke$arity$1(kv),new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 2, [true,null,false,null], null), null));
|
|
2776
|
+
|
|
2777
|
+
if(cljs.core.truth_((function (){var and__5000__auto__ = comp_QMARK__59024;
|
|
2778
|
+
if(cljs.core.truth_(and__5000__auto__)){
|
|
2779
|
+
return cljs.core.not_EQ_.cljs$core$IFn$_invoke$arity$2(new cljs.core.Keyword("db","valueType","db/valueType",1827971944).cljs$core$IFn$_invoke$arity$1(kv),new cljs.core.Keyword("db.type","ref","db.type/ref",-1728373079));
|
|
2780
|
+
} else {
|
|
2781
|
+
return and__5000__auto__;
|
|
2782
|
+
}
|
|
2783
|
+
})())){
|
|
2784
|
+
throw cljs.core.ex_info.cljs$core$IFn$_invoke$arity$2(["Bad attribute specification for ",cljs.core.str.cljs$core$IFn$_invoke$arity$1(a_ident),": {:db/isComponent true} should also have {:db/valueType :db.type/ref}"].join(''),new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null,"error","error",-978969032),new cljs.core.Keyword("schema","validation","schema/validation",1178447161),new cljs.core.Keyword(null,"attribute","attribute",-2074029119),a_ident,new cljs.core.Keyword(null,"key","key",-1516042587),new cljs.core.Keyword("db","isComponent","db/isComponent",423352398)], null));
|
|
2785
|
+
} else {
|
|
2786
|
+
}
|
|
2787
|
+
|
|
2788
|
+
datahike.db.validate_schema_key(a_ident,new cljs.core.Keyword("db","unique","db/unique",329396388),new cljs.core.Keyword("db","unique","db/unique",329396388).cljs$core$IFn$_invoke$arity$1(kv),new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword("db.unique","identity","db.unique/identity",1675950722),null,new cljs.core.Keyword("db.unique","value","db.unique/value",276903088),null], null), null));
|
|
2789
|
+
|
|
2790
|
+
datahike.db.validate_schema_key(a_ident,new cljs.core.Keyword("db","valueType","db/valueType",1827971944),new cljs.core.Keyword("db","valueType","db/valueType",1827971944).cljs$core$IFn$_invoke$arity$1(kv),new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword("db.type","tuple","db.type/tuple",938234914),null,new cljs.core.Keyword("db.type","ref","db.type/ref",-1728373079),null], null), null));
|
|
2791
|
+
|
|
2792
|
+
datahike.db.validate_schema_key(a_ident,new cljs.core.Keyword("db","cardinality","db/cardinality",-104975659),new cljs.core.Keyword("db","cardinality","db/cardinality",-104975659).cljs$core$IFn$_invoke$arity$1(kv),new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword("db.cardinality","many","db.cardinality/many",772806234),null,new cljs.core.Keyword("db.cardinality","one","db.cardinality/one",1428352190),null], null), null));
|
|
2793
|
+
|
|
2794
|
+
datahike.db.validate_tuple_schema(a_ident,kv);
|
|
2795
|
+
|
|
2796
|
+
|
|
2797
|
+
var G__59026 = cljs.core.next(seq__58865__$1);
|
|
2798
|
+
var G__59027 = null;
|
|
2799
|
+
var G__59028 = (0);
|
|
2800
|
+
var G__59029 = (0);
|
|
2801
|
+
seq__58865 = G__59026;
|
|
2802
|
+
chunk__58866 = G__59027;
|
|
2803
|
+
count__58867 = G__59028;
|
|
2804
|
+
i__58868 = G__59029;
|
|
2805
|
+
continue;
|
|
2806
|
+
}
|
|
2807
|
+
} else {
|
|
2808
|
+
return null;
|
|
2809
|
+
}
|
|
2810
|
+
}
|
|
2811
|
+
break;
|
|
2812
|
+
}
|
|
2813
|
+
});
|
|
2814
|
+
datahike.db.to_old_schema = (function datahike$db$to_old_schema(new_schema){
|
|
2815
|
+
if(((cljs.core.vector_QMARK_(new_schema)) || (cljs.core.seq_QMARK_(new_schema)))){
|
|
2816
|
+
return cljs.core.reduce.cljs$core$IFn$_invoke$arity$3((function (acc,p__58881){
|
|
2817
|
+
var map__58882 = p__58881;
|
|
2818
|
+
var map__58882__$1 = cljs.core.__destructure_map(map__58882);
|
|
2819
|
+
var schema_entity = map__58882__$1;
|
|
2820
|
+
var ident = cljs.core.get.cljs$core$IFn$_invoke$arity$2(map__58882__$1,new cljs.core.Keyword("db","ident","db/ident",-737096));
|
|
2821
|
+
return cljs.core.assoc.cljs$core$IFn$_invoke$arity$3(acc,ident,schema_entity);
|
|
2822
|
+
}),cljs.core.PersistentArrayMap.EMPTY,new_schema);
|
|
2823
|
+
} else {
|
|
2824
|
+
return new_schema;
|
|
2825
|
+
}
|
|
2826
|
+
});
|
|
2827
|
+
datahike.db.validate_write_schema = (function datahike$db$validate_write_schema(schema){
|
|
2828
|
+
if(datahike.schema.old_schema_valid_QMARK_(schema)){
|
|
2829
|
+
return null;
|
|
2830
|
+
} else {
|
|
2831
|
+
var G__58884 = (function(){throw cljs.core.ex_info.cljs$core$IFn$_invoke$arity$2("Incomplete schema attributes, expected at least :db/valueType, :db/cardinality",datahike.schema.explain_old_schema(schema))})();
|
|
2832
|
+
var fexpr__58883 = taoensso.timbre._log_BANG_.cljs$core$IFn$_invoke$arity$14(taoensso.timbre._STAR_config_STAR_,new cljs.core.Keyword(null,"error","error",-978969032),"datahike.db",null,777,null,new cljs.core.Keyword(null,"p","p",151049309),new cljs.core.Keyword(null,"auto","auto",-566279492),(new cljs.core.Delay((function (){
|
|
2833
|
+
return new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, ["Incomplete schema attributes, expected at least :db/valueType, :db/cardinality",datahike.schema.explain_old_schema(schema)], null);
|
|
2834
|
+
}),null)),null,(249),null,null,null);
|
|
2835
|
+
return (fexpr__58883.cljs$core$IFn$_invoke$arity$1 ? fexpr__58883.cljs$core$IFn$_invoke$arity$1(G__58884) : fexpr__58883.call(null, G__58884));
|
|
2836
|
+
}
|
|
2837
|
+
});
|
|
2838
|
+
datahike.db.init_max_eid = (function datahike$db$init_max_eid(eavt){
|
|
2839
|
+
var temp__5802__auto__ = (function (){var G__58885 = eavt;
|
|
2840
|
+
var G__58886 = datahike.datom.datom.cljs$core$IFn$_invoke$arity$4((0),null,null,(536870912));
|
|
2841
|
+
var G__58887 = datahike.datom.datom.cljs$core$IFn$_invoke$arity$4(((536870912) - (1)),null,null,(2147483647));
|
|
2842
|
+
var G__58888 = new cljs.core.Keyword(null,"eavt","eavt",-666437073);
|
|
2843
|
+
return (datahike.index._slice.cljs$core$IFn$_invoke$arity$4 ? datahike.index._slice.cljs$core$IFn$_invoke$arity$4(G__58885,G__58886,G__58887,G__58888) : datahike.index._slice.call(null, G__58885,G__58886,G__58887,G__58888));
|
|
2844
|
+
})();
|
|
2845
|
+
if(cljs.core.truth_(temp__5802__auto__)){
|
|
2846
|
+
var datoms = temp__5802__auto__;
|
|
2847
|
+
return new cljs.core.Keyword(null,"e","e",1381269198).cljs$core$IFn$_invoke$arity$1(cljs.core.first(cljs.core.rseq(cljs.core.vec(datoms))));
|
|
2848
|
+
} else {
|
|
2849
|
+
return (0);
|
|
2850
|
+
}
|
|
2851
|
+
});
|
|
2852
|
+
datahike.db.get_max_tx = (function datahike$db$get_max_tx(eavt){
|
|
2853
|
+
return cljs.core.transduce.cljs$core$IFn$_invoke$arity$4(cljs.core.map.cljs$core$IFn$_invoke$arity$1((function (d){
|
|
2854
|
+
return datahike.datom.datom_tx(d);
|
|
2855
|
+
})),cljs.core.max,(536870912),(datahike.index._all.cljs$core$IFn$_invoke$arity$1 ? datahike.index._all.cljs$core$IFn$_invoke$arity$1(eavt) : datahike.index._all.call(null, eavt)));
|
|
2856
|
+
});
|
|
2857
|
+
datahike.db.ref_datoms = (function (){var idents = cljs.core.reduce.cljs$core$IFn$_invoke$arity$3((function (m,p__58889){
|
|
2858
|
+
var map__58890 = p__58889;
|
|
2859
|
+
var map__58890__$1 = cljs.core.__destructure_map(map__58890);
|
|
2860
|
+
var ident = cljs.core.get.cljs$core$IFn$_invoke$arity$2(map__58890__$1,new cljs.core.Keyword("db","ident","db/ident",-737096));
|
|
2861
|
+
var id = cljs.core.get.cljs$core$IFn$_invoke$arity$2(map__58890__$1,new cljs.core.Keyword("db","id","db/id",-1388397098));
|
|
2862
|
+
return cljs.core.assoc.cljs$core$IFn$_invoke$arity$3(m,ident,id);
|
|
2863
|
+
}),cljs.core.PersistentArrayMap.EMPTY,datahike.constants.system_schema);
|
|
2864
|
+
return cljs.core.vec(cljs.core.mapcat.cljs$core$IFn$_invoke$arity$variadic((function (p__58891){
|
|
2865
|
+
var map__58892 = p__58891;
|
|
2866
|
+
var map__58892__$1 = cljs.core.__destructure_map(map__58892);
|
|
2867
|
+
var i = map__58892__$1;
|
|
2868
|
+
var id = cljs.core.get.cljs$core$IFn$_invoke$arity$2(map__58892__$1,new cljs.core.Keyword("db","id","db/id",-1388397098));
|
|
2869
|
+
return cljs.core.reduce_kv((function (coll,k,v){
|
|
2870
|
+
var v_ref = (idents.cljs$core$IFn$_invoke$arity$1 ? idents.cljs$core$IFn$_invoke$arity$1(v) : idents.call(null, v));
|
|
2871
|
+
var d_val = (cljs.core.truth_((function (){var and__5000__auto__ = cljs.core.not_EQ_.cljs$core$IFn$_invoke$arity$2(k,new cljs.core.Keyword("db","ident","db/ident",-737096));
|
|
2872
|
+
if(and__5000__auto__){
|
|
2873
|
+
return v_ref;
|
|
2874
|
+
} else {
|
|
2875
|
+
return and__5000__auto__;
|
|
2876
|
+
}
|
|
2877
|
+
})())?v_ref:v);
|
|
2878
|
+
return cljs.core.conj.cljs$core$IFn$_invoke$arity$2(coll,datahike.datom.datom.cljs$core$IFn$_invoke$arity$4(id,(idents.cljs$core$IFn$_invoke$arity$1 ? idents.cljs$core$IFn$_invoke$arity$1(k) : idents.call(null, k)),d_val,(536870912)));
|
|
2879
|
+
}),cljs.core.PersistentVector.EMPTY,cljs.core.dissoc.cljs$core$IFn$_invoke$arity$2(i,new cljs.core.Keyword("db","id","db/id",-1388397098)));
|
|
2880
|
+
}),cljs.core.prim_seq.cljs$core$IFn$_invoke$arity$2([datahike.constants.system_schema], 0)));
|
|
2881
|
+
})();
|
|
2882
|
+
/**
|
|
2883
|
+
* Maps IDs of system entities to their names (keyword) and attribute names to the attribute's specification
|
|
2884
|
+
*/
|
|
2885
|
+
datahike.db.get_ident_ref_map = (function datahike$db$get_ident_ref_map(schema){
|
|
2886
|
+
return cljs.core.reduce.cljs$core$IFn$_invoke$arity$3((function (m,p__58893){
|
|
2887
|
+
var vec__58894 = p__58893;
|
|
2888
|
+
var a = cljs.core.nth.cljs$core$IFn$_invoke$arity$3(vec__58894,(0),null);
|
|
2889
|
+
var map__58897 = cljs.core.nth.cljs$core$IFn$_invoke$arity$3(vec__58894,(1),null);
|
|
2890
|
+
var map__58897__$1 = cljs.core.__destructure_map(map__58897);
|
|
2891
|
+
var id = cljs.core.get.cljs$core$IFn$_invoke$arity$2(map__58897__$1,new cljs.core.Keyword("db","id","db/id",-1388397098));
|
|
2892
|
+
if(cljs.core.truth_(a)){
|
|
2893
|
+
return cljs.core.assoc.cljs$core$IFn$_invoke$arity$3(m,a,id);
|
|
2894
|
+
} else {
|
|
2895
|
+
return null;
|
|
2896
|
+
}
|
|
2897
|
+
}),cljs.core.PersistentArrayMap.EMPTY,schema);
|
|
2898
|
+
});
|
|
2899
|
+
/**
|
|
2900
|
+
* Prefer create-database in api, schema only in index for attribute reference database.
|
|
2901
|
+
*/
|
|
2902
|
+
datahike.db.empty_db = (function datahike$db$empty_db(var_args){
|
|
2903
|
+
var G__58899 = arguments.length;
|
|
2904
|
+
switch (G__58899) {
|
|
2905
|
+
case 0:
|
|
2906
|
+
return datahike.db.empty_db.cljs$core$IFn$_invoke$arity$0();
|
|
2907
|
+
|
|
2908
|
+
break;
|
|
2909
|
+
case 1:
|
|
2910
|
+
return datahike.db.empty_db.cljs$core$IFn$_invoke$arity$1((arguments[(0)]));
|
|
2911
|
+
|
|
2912
|
+
break;
|
|
2913
|
+
case 2:
|
|
2914
|
+
return datahike.db.empty_db.cljs$core$IFn$_invoke$arity$2((arguments[(0)]),(arguments[(1)]));
|
|
2915
|
+
|
|
2916
|
+
break;
|
|
2917
|
+
case 3:
|
|
2918
|
+
return datahike.db.empty_db.cljs$core$IFn$_invoke$arity$3((arguments[(0)]),(arguments[(1)]),(arguments[(2)]));
|
|
2919
|
+
|
|
2920
|
+
break;
|
|
2921
|
+
default:
|
|
2922
|
+
throw (new Error(["Invalid arity: ",cljs.core.str.cljs$core$IFn$_invoke$arity$1(arguments.length)].join('')));
|
|
2923
|
+
|
|
2924
|
+
}
|
|
2925
|
+
});
|
|
2926
|
+
|
|
2927
|
+
(datahike.db.empty_db.cljs$core$IFn$_invoke$arity$0 = (function (){
|
|
2928
|
+
return datahike.db.empty_db.cljs$core$IFn$_invoke$arity$3(null,null,null);
|
|
2929
|
+
}));
|
|
2930
|
+
|
|
2931
|
+
(datahike.db.empty_db.cljs$core$IFn$_invoke$arity$1 = (function (schema){
|
|
2932
|
+
return datahike.db.empty_db.cljs$core$IFn$_invoke$arity$3(schema,null,null);
|
|
2933
|
+
}));
|
|
2934
|
+
|
|
2935
|
+
(datahike.db.empty_db.cljs$core$IFn$_invoke$arity$2 = (function (schema,user_config){
|
|
2936
|
+
return datahike.db.empty_db.cljs$core$IFn$_invoke$arity$3(schema,user_config,null);
|
|
2937
|
+
}));
|
|
2938
|
+
|
|
2939
|
+
(datahike.db.empty_db.cljs$core$IFn$_invoke$arity$3 = (function (schema,user_config,store){
|
|
2940
|
+
if((((schema == null)) || (((cljs.core.map_QMARK_(schema)) || (cljs.core.coll_QMARK_(schema)))))){
|
|
2941
|
+
} else {
|
|
2942
|
+
throw (new Error("Assert failed: (or (nil? schema) (map? schema) (coll? schema))"));
|
|
2943
|
+
}
|
|
2944
|
+
|
|
2945
|
+
var complete_config = cljs.core.merge.cljs$core$IFn$_invoke$arity$variadic(cljs.core.prim_seq.cljs$core$IFn$_invoke$arity$2([datahike.config.storeless_config(),user_config], 0));
|
|
2946
|
+
var _ = datahike.config.validate_config(complete_config);
|
|
2947
|
+
var complete_config__$1 = datahike.config.remove_nils(complete_config);
|
|
2948
|
+
var map__58900 = complete_config__$1;
|
|
2949
|
+
var map__58900__$1 = cljs.core.__destructure_map(map__58900);
|
|
2950
|
+
var keep_history_QMARK_ = cljs.core.get.cljs$core$IFn$_invoke$arity$2(map__58900__$1,new cljs.core.Keyword(null,"keep-history?","keep-history?",1081751619));
|
|
2951
|
+
var index = cljs.core.get.cljs$core$IFn$_invoke$arity$2(map__58900__$1,new cljs.core.Keyword(null,"index","index",-1531685915));
|
|
2952
|
+
var schema_flexibility = cljs.core.get.cljs$core$IFn$_invoke$arity$2(map__58900__$1,new cljs.core.Keyword(null,"schema-flexibility","schema-flexibility",-1255871751));
|
|
2953
|
+
var attribute_refs_QMARK_ = cljs.core.get.cljs$core$IFn$_invoke$arity$2(map__58900__$1,new cljs.core.Keyword(null,"attribute-refs?","attribute-refs?",-1070298065));
|
|
2954
|
+
var on_read_QMARK_ = cljs.core._EQ_.cljs$core$IFn$_invoke$arity$2(new cljs.core.Keyword(null,"read","read",1140058661),schema_flexibility);
|
|
2955
|
+
var schema__$1 = datahike.db.to_old_schema(schema);
|
|
2956
|
+
var ___$1 = ((on_read_QMARK_)?datahike.db.validate_schema(schema__$1):datahike.db.validate_write_schema(schema__$1));
|
|
2957
|
+
var complete_schema = cljs.core.merge.cljs$core$IFn$_invoke$arity$variadic(cljs.core.prim_seq.cljs$core$IFn$_invoke$arity$2([schema__$1,(cljs.core.truth_(attribute_refs_QMARK_)?datahike.constants.ref_implicit_schema:new cljs.core.PersistentArrayMap(null, 4, [new cljs.core.Keyword("db","ident","db/ident",-737096),new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword("db","unique","db/unique",329396388),new cljs.core.Keyword("db.unique","identity","db.unique/identity",1675950722)], null),new cljs.core.Keyword("db","txInstant","db/txInstant",-990494199),new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword("db","noHistory","db/noHistory",-1975127444),true], null),new cljs.core.Keyword("db.entity","attrs","db.entity/attrs",655746694),new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword("db","cardinality","db/cardinality",-104975659),new cljs.core.Keyword("db.cardinality","many","db.cardinality/many",772806234)], null),new cljs.core.Keyword("db.entity","preds","db.entity/preds",-872853699),new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword("db","cardinality","db/cardinality",-104975659),new cljs.core.Keyword("db.cardinality","many","db.cardinality/many",772806234)], null)], null))], 0));
|
|
2958
|
+
var rschema = datahike.db.utils.rschema(complete_schema);
|
|
2959
|
+
var ident_ref_map = (cljs.core.truth_(attribute_refs_QMARK_)?datahike.db.get_ident_ref_map(complete_schema):cljs.core.PersistentArrayMap.EMPTY);
|
|
2960
|
+
var ref_ident_map = (cljs.core.truth_(attribute_refs_QMARK_)?clojure.set.map_invert(ident_ref_map):cljs.core.PersistentArrayMap.EMPTY);
|
|
2961
|
+
var system_entities = (cljs.core.truth_(attribute_refs_QMARK_)?datahike.constants.system_entities:cljs.core.PersistentHashSet.EMPTY);
|
|
2962
|
+
var indexed = (cljs.core.truth_(attribute_refs_QMARK_)?cljs.core.set(cljs.core.map.cljs$core$IFn$_invoke$arity$2(ident_ref_map,new cljs.core.Keyword("db","index","db/index",-1531680669).cljs$core$IFn$_invoke$arity$1(rschema))):new cljs.core.Keyword("db","index","db/index",-1531680669).cljs$core$IFn$_invoke$arity$1(rschema));
|
|
2963
|
+
var index_config = cljs.core.merge.cljs$core$IFn$_invoke$arity$variadic(cljs.core.prim_seq.cljs$core$IFn$_invoke$arity$2([new cljs.core.Keyword(null,"index-config","index-config",-1462945443).cljs$core$IFn$_invoke$arity$1(complete_config__$1),new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"indexed","indexed",390758624),indexed], null)], 0));
|
|
2964
|
+
var eavt = (cljs.core.truth_(attribute_refs_QMARK_)?datahike.index.init_index.cljs$core$IFn$_invoke$arity$6(index,store,datahike.db.ref_datoms,new cljs.core.Keyword(null,"eavt","eavt",-666437073),(0),index_config):datahike.index.empty_index.cljs$core$IFn$_invoke$arity$4(index,store,new cljs.core.Keyword(null,"eavt","eavt",-666437073),index_config));
|
|
2965
|
+
var aevt = (cljs.core.truth_(attribute_refs_QMARK_)?datahike.index.init_index.cljs$core$IFn$_invoke$arity$6(index,store,datahike.db.ref_datoms,new cljs.core.Keyword(null,"aevt","aevt",-585148059),(0),index_config):datahike.index.empty_index.cljs$core$IFn$_invoke$arity$4(index,store,new cljs.core.Keyword(null,"aevt","aevt",-585148059),index_config));
|
|
2966
|
+
var indexed_datoms = cljs.core.filter.cljs$core$IFn$_invoke$arity$2((function (p__58901){
|
|
2967
|
+
var vec__58902 = p__58901;
|
|
2968
|
+
var ___$2 = cljs.core.nth.cljs$core$IFn$_invoke$arity$3(vec__58902,(0),null);
|
|
2969
|
+
var a = cljs.core.nth.cljs$core$IFn$_invoke$arity$3(vec__58902,(1),null);
|
|
2970
|
+
var ___$3 = cljs.core.nth.cljs$core$IFn$_invoke$arity$3(vec__58902,(2),null);
|
|
2971
|
+
var ___$4 = cljs.core.nth.cljs$core$IFn$_invoke$arity$3(vec__58902,(3),null);
|
|
2972
|
+
return cljs.core.contains_QMARK_(indexed,a);
|
|
2973
|
+
}),datahike.db.ref_datoms);
|
|
2974
|
+
var avet = (cljs.core.truth_(attribute_refs_QMARK_)?datahike.index.init_index.cljs$core$IFn$_invoke$arity$6(index,store,indexed_datoms,new cljs.core.Keyword(null,"avet","avet",1383857032),(0),index_config):datahike.index.empty_index.cljs$core$IFn$_invoke$arity$4(index,store,new cljs.core.Keyword(null,"avet","avet",1383857032),index_config));
|
|
2975
|
+
var max_eid = (cljs.core.truth_(attribute_refs_QMARK_)?datahike.constants.ue0:(0));
|
|
2976
|
+
var max_tx = (cljs.core.truth_(attribute_refs_QMARK_)?datahike.constants.utx0:(536870912));
|
|
2977
|
+
return datahike.db.map__GT_DB(cljs.core.merge.cljs$core$IFn$_invoke$arity$variadic(cljs.core.prim_seq.cljs$core$IFn$_invoke$arity$2([cljs.core.PersistentHashMap.fromArrays([new cljs.core.Keyword(null,"schema","schema",-1582001791),new cljs.core.Keyword(null,"max-tx","max-tx",1119558339),new cljs.core.Keyword(null,"hash","hash",-13781596),new cljs.core.Keyword(null,"meta","meta",1499536964),new cljs.core.Keyword(null,"aevt","aevt",-585148059),new cljs.core.Keyword(null,"system-entities","system-entities",-1452000411),new cljs.core.Keyword(null,"config","config",994861415),new cljs.core.Keyword(null,"avet","avet",1383857032),new cljs.core.Keyword(null,"max-eid","max-eid",2134868075),new cljs.core.Keyword(null,"eavt","eavt",-666437073),new cljs.core.Keyword(null,"op-count","op-count",-1218914478),new cljs.core.Keyword(null,"ref-ident-map","ref-ident-map",107296375),new cljs.core.Keyword(null,"rschema","rschema",-1196134054),new cljs.core.Keyword(null,"ident-ref-map","ident-ref-map",1187514335)],[complete_schema,max_tx,(0),new cljs.core.PersistentArrayMap(null, 6, [new cljs.core.Keyword("hitchhiker.tree","version","hitchhiker.tree/version",1436950731),"0.2.222",new cljs.core.Keyword("datahike","id","datahike/id",1340776847),hasch.core.uuid.cljs$core$IFn$_invoke$arity$0(),new cljs.core.Keyword("konserve","version","konserve/version",-1231967757),"0.9.340",new cljs.core.Keyword("datahike","version","datahike/version",1963809523),"DEVELOPMENT",new cljs.core.Keyword("persistent.set","version","persistent.set/version",1155662645),"0.3.116",new cljs.core.Keyword("datahike","created-at","datahike/created-at",1694094551),datahike.tools.get_date.call(null, )], null),aevt,system_entities,complete_config__$1,avet,max_eid,eavt,(cljs.core.truth_(attribute_refs_QMARK_)?cljs.core.count(datahike.db.ref_datoms):(0)),ref_ident_map,rschema,ident_ref_map]),(cljs.core.truth_(keep_history_QMARK_)?new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null,"temporal-eavt","temporal-eavt",-1065512715),eavt,new cljs.core.Keyword(null,"temporal-aevt","temporal-aevt",341636346),aevt,new cljs.core.Keyword(null,"temporal-avet","temporal-avet",-558341228),avet], null):null)], 0)));
|
|
2978
|
+
}));
|
|
2979
|
+
|
|
2980
|
+
(datahike.db.empty_db.cljs$lang$maxFixedArity = 3);
|
|
2981
|
+
|
|
2982
|
+
datahike.db.init_db = (function datahike$db$init_db(var_args){
|
|
2983
|
+
var G__58908 = arguments.length;
|
|
2984
|
+
switch (G__58908) {
|
|
2985
|
+
case 1:
|
|
2986
|
+
return datahike.db.init_db.cljs$core$IFn$_invoke$arity$1((arguments[(0)]));
|
|
2987
|
+
|
|
2988
|
+
break;
|
|
2989
|
+
case 2:
|
|
2990
|
+
return datahike.db.init_db.cljs$core$IFn$_invoke$arity$2((arguments[(0)]),(arguments[(1)]));
|
|
2991
|
+
|
|
2992
|
+
break;
|
|
2993
|
+
case 3:
|
|
2994
|
+
return datahike.db.init_db.cljs$core$IFn$_invoke$arity$3((arguments[(0)]),(arguments[(1)]),(arguments[(2)]));
|
|
2995
|
+
|
|
2996
|
+
break;
|
|
2997
|
+
case 4:
|
|
2998
|
+
return datahike.db.init_db.cljs$core$IFn$_invoke$arity$4((arguments[(0)]),(arguments[(1)]),(arguments[(2)]),(arguments[(3)]));
|
|
2999
|
+
|
|
3000
|
+
break;
|
|
3001
|
+
default:
|
|
3002
|
+
throw (new Error(["Invalid arity: ",cljs.core.str.cljs$core$IFn$_invoke$arity$1(arguments.length)].join('')));
|
|
3003
|
+
|
|
3004
|
+
}
|
|
3005
|
+
});
|
|
3006
|
+
|
|
3007
|
+
(datahike.db.init_db.cljs$core$IFn$_invoke$arity$1 = (function (datoms){
|
|
3008
|
+
return datahike.db.init_db.cljs$core$IFn$_invoke$arity$4(datoms,null,null,null);
|
|
3009
|
+
}));
|
|
3010
|
+
|
|
3011
|
+
(datahike.db.init_db.cljs$core$IFn$_invoke$arity$2 = (function (datoms,schema){
|
|
3012
|
+
return datahike.db.init_db.cljs$core$IFn$_invoke$arity$4(datoms,schema,null,null);
|
|
3013
|
+
}));
|
|
3014
|
+
|
|
3015
|
+
(datahike.db.init_db.cljs$core$IFn$_invoke$arity$3 = (function (datoms,schema,user_config){
|
|
3016
|
+
return datahike.db.init_db.cljs$core$IFn$_invoke$arity$4(datoms,schema,user_config,null);
|
|
3017
|
+
}));
|
|
3018
|
+
|
|
3019
|
+
(datahike.db.init_db.cljs$core$IFn$_invoke$arity$4 = (function (datoms,schema,user_config,store){
|
|
3020
|
+
datahike.db.validate_schema(schema);
|
|
3021
|
+
|
|
3022
|
+
var map__58909 = cljs.core.merge.cljs$core$IFn$_invoke$arity$variadic(cljs.core.prim_seq.cljs$core$IFn$_invoke$arity$2([datahike.config.storeless_config(),user_config], 0));
|
|
3023
|
+
var map__58909__$1 = cljs.core.__destructure_map(map__58909);
|
|
3024
|
+
var complete_config = map__58909__$1;
|
|
3025
|
+
var index = cljs.core.get.cljs$core$IFn$_invoke$arity$2(map__58909__$1,new cljs.core.Keyword(null,"index","index",-1531685915));
|
|
3026
|
+
var keep_history_QMARK_ = cljs.core.get.cljs$core$IFn$_invoke$arity$2(map__58909__$1,new cljs.core.Keyword(null,"keep-history?","keep-history?",1081751619));
|
|
3027
|
+
var attribute_refs_QMARK_ = cljs.core.get.cljs$core$IFn$_invoke$arity$2(map__58909__$1,new cljs.core.Keyword(null,"attribute-refs?","attribute-refs?",-1070298065));
|
|
3028
|
+
var _ = datahike.config.validate_config(complete_config);
|
|
3029
|
+
var complete_schema = cljs.core.merge.cljs$core$IFn$_invoke$arity$variadic(cljs.core.prim_seq.cljs$core$IFn$_invoke$arity$2([schema,(cljs.core.truth_(attribute_refs_QMARK_)?datahike.constants.ref_implicit_schema:new cljs.core.PersistentArrayMap(null, 4, [new cljs.core.Keyword("db","ident","db/ident",-737096),new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword("db","unique","db/unique",329396388),new cljs.core.Keyword("db.unique","identity","db.unique/identity",1675950722)], null),new cljs.core.Keyword("db","txInstant","db/txInstant",-990494199),new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword("db","noHistory","db/noHistory",-1975127444),true], null),new cljs.core.Keyword("db.entity","attrs","db.entity/attrs",655746694),new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword("db","cardinality","db/cardinality",-104975659),new cljs.core.Keyword("db.cardinality","many","db.cardinality/many",772806234)], null),new cljs.core.Keyword("db.entity","preds","db.entity/preds",-872853699),new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword("db","cardinality","db/cardinality",-104975659),new cljs.core.Keyword("db.cardinality","many","db.cardinality/many",772806234)], null)], null))], 0));
|
|
3030
|
+
var rschema = datahike.db.utils.rschema(complete_schema);
|
|
3031
|
+
var ident_ref_map = (cljs.core.truth_(attribute_refs_QMARK_)?datahike.db.get_ident_ref_map(schema):cljs.core.PersistentArrayMap.EMPTY);
|
|
3032
|
+
var ref_ident_map = (cljs.core.truth_(attribute_refs_QMARK_)?clojure.set.map_invert(ident_ref_map):cljs.core.PersistentArrayMap.EMPTY);
|
|
3033
|
+
var system_entities = (cljs.core.truth_(attribute_refs_QMARK_)?datahike.constants.system_entities:cljs.core.PersistentHashSet.EMPTY);
|
|
3034
|
+
var indexed = (cljs.core.truth_(attribute_refs_QMARK_)?cljs.core.set(cljs.core.map.cljs$core$IFn$_invoke$arity$2(ident_ref_map,new cljs.core.Keyword("db","index","db/index",-1531680669).cljs$core$IFn$_invoke$arity$1(rschema))):new cljs.core.Keyword("db","index","db/index",-1531680669).cljs$core$IFn$_invoke$arity$1(rschema));
|
|
3035
|
+
var new_datoms = (cljs.core.truth_(attribute_refs_QMARK_)?cljs.core.concat.cljs$core$IFn$_invoke$arity$2(datahike.db.ref_datoms,datoms):datoms);
|
|
3036
|
+
var indexed_datoms = cljs.core.filter.cljs$core$IFn$_invoke$arity$2((function (p__58910){
|
|
3037
|
+
var vec__58911 = p__58910;
|
|
3038
|
+
var ___$1 = cljs.core.nth.cljs$core$IFn$_invoke$arity$3(vec__58911,(0),null);
|
|
3039
|
+
var a = cljs.core.nth.cljs$core$IFn$_invoke$arity$3(vec__58911,(1),null);
|
|
3040
|
+
var ___$2 = cljs.core.nth.cljs$core$IFn$_invoke$arity$3(vec__58911,(2),null);
|
|
3041
|
+
var ___$3 = cljs.core.nth.cljs$core$IFn$_invoke$arity$3(vec__58911,(3),null);
|
|
3042
|
+
return cljs.core.contains_QMARK_(indexed,a);
|
|
3043
|
+
}),new_datoms);
|
|
3044
|
+
var op_count = (0);
|
|
3045
|
+
var index_config = cljs.core.assoc.cljs$core$IFn$_invoke$arity$3(new cljs.core.Keyword(null,"index-config","index-config",-1462945443).cljs$core$IFn$_invoke$arity$1(complete_config),new cljs.core.Keyword(null,"indexed","indexed",390758624),indexed);
|
|
3046
|
+
var avet = datahike.index.init_index.cljs$core$IFn$_invoke$arity$6(index,store,indexed_datoms,new cljs.core.Keyword(null,"avet","avet",1383857032),op_count,index_config);
|
|
3047
|
+
var eavt = datahike.index.init_index.cljs$core$IFn$_invoke$arity$6(index,store,new_datoms,new cljs.core.Keyword(null,"eavt","eavt",-666437073),op_count,index_config);
|
|
3048
|
+
var aevt = datahike.index.init_index.cljs$core$IFn$_invoke$arity$6(index,store,new_datoms,new cljs.core.Keyword(null,"aevt","aevt",-585148059),op_count,index_config);
|
|
3049
|
+
var max_eid = datahike.db.init_max_eid(eavt);
|
|
3050
|
+
var max_tx = datahike.db.get_max_tx(eavt);
|
|
3051
|
+
var op_count__$1 = cljs.core.count(new_datoms);
|
|
3052
|
+
return datahike.db.map__GT_DB(cljs.core.merge.cljs$core$IFn$_invoke$arity$variadic(cljs.core.prim_seq.cljs$core$IFn$_invoke$arity$2([cljs.core.PersistentHashMap.fromArrays([new cljs.core.Keyword(null,"schema","schema",-1582001791),new cljs.core.Keyword(null,"max-tx","max-tx",1119558339),new cljs.core.Keyword(null,"hash","hash",-13781596),new cljs.core.Keyword(null,"meta","meta",1499536964),new cljs.core.Keyword(null,"aevt","aevt",-585148059),new cljs.core.Keyword(null,"system-entities","system-entities",-1452000411),new cljs.core.Keyword(null,"config","config",994861415),new cljs.core.Keyword(null,"avet","avet",1383857032),new cljs.core.Keyword(null,"max-eid","max-eid",2134868075),new cljs.core.Keyword(null,"eavt","eavt",-666437073),new cljs.core.Keyword(null,"op-count","op-count",-1218914478),new cljs.core.Keyword(null,"ref-ident-map","ref-ident-map",107296375),new cljs.core.Keyword(null,"rschema","rschema",-1196134054),new cljs.core.Keyword(null,"ident-ref-map","ident-ref-map",1187514335)],[complete_schema,max_tx,cljs.core.reduce.cljs$core$IFn$_invoke$arity$3((function (p1__58905_SHARP_,p2__58906_SHARP_){
|
|
3053
|
+
return (p1__58905_SHARP_ + cljs.core.hash(p2__58906_SHARP_));
|
|
3054
|
+
}),(0),datoms),new cljs.core.PersistentArrayMap(null, 6, [new cljs.core.Keyword("hitchhiker.tree","version","hitchhiker.tree/version",1436950731),"0.2.222",new cljs.core.Keyword("datahike","id","datahike/id",1340776847),hasch.core.uuid.cljs$core$IFn$_invoke$arity$0(),new cljs.core.Keyword("konserve","version","konserve/version",-1231967757),"0.9.340",new cljs.core.Keyword("datahike","version","datahike/version",1963809523),"DEVELOPMENT",new cljs.core.Keyword("persistent.set","version","persistent.set/version",1155662645),"0.3.116",new cljs.core.Keyword("datahike","created-at","datahike/created-at",1694094551),datahike.tools.get_date.call(null, )], null),aevt,system_entities,complete_config,avet,max_eid,eavt,op_count__$1,ref_ident_map,rschema,ident_ref_map]),(cljs.core.truth_(keep_history_QMARK_)?new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null,"temporal-eavt","temporal-eavt",-1065512715),datahike.index.empty_index.cljs$core$IFn$_invoke$arity$4(index,store,new cljs.core.Keyword(null,"eavt","eavt",-666437073),index_config),new cljs.core.Keyword(null,"temporal-aevt","temporal-aevt",341636346),datahike.index.empty_index.cljs$core$IFn$_invoke$arity$4(index,store,new cljs.core.Keyword(null,"aevt","aevt",-585148059),index_config),new cljs.core.Keyword(null,"temporal-avet","temporal-avet",-558341228),datahike.index.empty_index.cljs$core$IFn$_invoke$arity$4(index,store,new cljs.core.Keyword(null,"avet","avet",1383857032),index_config)], null):null)], 0)));
|
|
3055
|
+
}));
|
|
3056
|
+
|
|
3057
|
+
(datahike.db.init_db.cljs$lang$maxFixedArity = 4);
|
|
3058
|
+
|
|
3059
|
+
datahike.db.metrics = (function datahike$db$metrics(db){
|
|
3060
|
+
var update_count_in = (function (m,ks){
|
|
3061
|
+
return cljs.core.update_in.cljs$core$IFn$_invoke$arity$3(m,ks,(function (p1__58914_SHARP_){
|
|
3062
|
+
if(cljs.core.truth_(p1__58914_SHARP_)){
|
|
3063
|
+
return (p1__58914_SHARP_ + (1));
|
|
3064
|
+
} else {
|
|
3065
|
+
return (1);
|
|
3066
|
+
}
|
|
3067
|
+
}));
|
|
3068
|
+
});
|
|
3069
|
+
var counts_map = cljs.core.reduce.cljs$core$IFn$_invoke$arity$3((function (m,datom){
|
|
3070
|
+
return update_count_in(update_count_in(m,new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"per-attr-counts","per-attr-counts",-1919906118),datahike.db.interface$._ident_for(db,datom.a)], null)),new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"per-entity-counts","per-entity-counts",1260627176),datom.e], null));
|
|
3071
|
+
}),new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null,"per-attr-counts","per-attr-counts",-1919906118),cljs.core.PersistentArrayMap.EMPTY,new cljs.core.Keyword(null,"per-entity-counts","per-entity-counts",1260627176),cljs.core.PersistentArrayMap.EMPTY], null),(function (){var G__58916 = db.eavt;
|
|
3072
|
+
return (datahike.index._seq.cljs$core$IFn$_invoke$arity$1 ? datahike.index._seq.cljs$core$IFn$_invoke$arity$1(G__58916) : datahike.index._seq.call(null, G__58916));
|
|
3073
|
+
})());
|
|
3074
|
+
var sum_indexed_attr_counts = (function (attr_counts){
|
|
3075
|
+
return cljs.core.reduce.cljs$core$IFn$_invoke$arity$3(cljs.core._PLUS_,(0),cljs.core.vals(medley.core.filter_keys((function (p1__58915_SHARP_){
|
|
3076
|
+
return cljs.core.contains_QMARK_(new cljs.core.Keyword("db","index","db/index",-1531680669).cljs$core$IFn$_invoke$arity$1(db.rschema),p1__58915_SHARP_);
|
|
3077
|
+
}),attr_counts)));
|
|
3078
|
+
});
|
|
3079
|
+
var G__58917 = cljs.core.merge.cljs$core$IFn$_invoke$arity$variadic(cljs.core.prim_seq.cljs$core$IFn$_invoke$arity$2([counts_map,new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null,"count","count",2139924085),(function (){var G__58918 = db.eavt;
|
|
3080
|
+
return (datahike.index._count.cljs$core$IFn$_invoke$arity$1 ? datahike.index._count.cljs$core$IFn$_invoke$arity$1(G__58918) : datahike.index._count.call(null, G__58918));
|
|
3081
|
+
})(),new cljs.core.Keyword(null,"avet-count","avet-count",-354285704),sum_indexed_attr_counts(new cljs.core.Keyword(null,"per-attr-counts","per-attr-counts",-1919906118).cljs$core$IFn$_invoke$arity$1(counts_map))], null)], 0));
|
|
3082
|
+
if(cljs.core.truth_(datahike.db.interface$._keep_history_QMARK_(db))){
|
|
3083
|
+
return cljs.core.merge.cljs$core$IFn$_invoke$arity$variadic(cljs.core.prim_seq.cljs$core$IFn$_invoke$arity$2([G__58917,new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null,"temporal-count","temporal-count",-1137467340),(function (){var G__58919 = db.temporal_eavt;
|
|
3084
|
+
return (datahike.index._count.cljs$core$IFn$_invoke$arity$1 ? datahike.index._count.cljs$core$IFn$_invoke$arity$1(G__58919) : datahike.index._count.call(null, G__58919));
|
|
3085
|
+
})(),new cljs.core.Keyword(null,"temporal-avet-count","temporal-avet-count",-1711422856),sum_indexed_attr_counts(cljs.core.reduce.cljs$core$IFn$_invoke$arity$3((function (m,datom){
|
|
3086
|
+
return update_count_in(m,new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [datahike.db.interface$._ident_for(db,datom.a)], null));
|
|
3087
|
+
}),cljs.core.PersistentArrayMap.EMPTY,(function (){var G__58920 = db.temporal_eavt;
|
|
3088
|
+
return (datahike.index._seq.cljs$core$IFn$_invoke$arity$1 ? datahike.index._seq.cljs$core$IFn$_invoke$arity$1(G__58920) : datahike.index._seq.call(null, G__58920));
|
|
3089
|
+
})()))], null)], 0));
|
|
3090
|
+
} else {
|
|
3091
|
+
return G__58917;
|
|
3092
|
+
}
|
|
3093
|
+
});
|
|
3094
|
+
|
|
3095
|
+
//# sourceMappingURL=datahike.db.js.map
|