|
26 | 26 | data (last fragments)] |
27 | 27 | `(throw (ex-info (str ~@(map (fn [m#] (if (string? m#) m# (list 'pr-str m#))) msgs)) ~data))))) |
28 | 28 |
|
29 | | -(defn seqable? [x] |
| 29 | +(defn #?@(:clj [^Boolean seqable?] |
| 30 | + :cljs [^boolean seqable?]) |
| 31 | + [x] |
30 | 32 | (and (not (string? x)) |
31 | 33 | #?(:cljs (or (cljs.core/seqable? x) |
32 | 34 | (da/array? x)) |
|
115 | 117 |
|
116 | 118 | ;; ---------------------------------------------------------------------------- |
117 | 119 |
|
118 | | -(declare hash-datom equiv-datom seq-datom val-at-datom nth-datom assoc-datom) |
| 120 | +;; using defn instead of declare because of http://dev.clojure.org/jira/browse/CLJS-1871 |
| 121 | +(defn- ^:declared hash-datom [d]) |
| 122 | +(defn- ^:declared equiv-datom [a b]) |
| 123 | +(defn- ^:declared seq-datom [d]) |
| 124 | +(defn- ^:declared nth-datom ([d i]) ([d i nf])) |
| 125 | +(defn- ^:declared assoc-datom [d k v]) |
| 126 | +(defn- ^:declared val-at-datom [d k nf]) |
119 | 127 |
|
120 | 128 | (deftype Datom [e a v tx added] |
121 | 129 | #?@(:cljs |
|
368 | 376 |
|
369 | 377 | ;; ---------------------------------------------------------------------------- |
370 | 378 |
|
371 | | -(declare hash-db hash-fdb equiv-db empty-db pr-db resolve-datom validate-attr components->pattern indexing?) |
| 379 | +;; using defn instead of declare because of http://dev.clojure.org/jira/browse/CLJS-1871 |
| 380 | +(defn- ^:declared hash-db [db]) |
| 381 | +(defn- ^:declared hash-fdb [db]) |
| 382 | +(defn- ^:declared equiv-db [a b]) |
| 383 | +(defn- ^:declared empty-db ([]) ([schema])) |
| 384 | +#?(:cljs (defn ^:declared pr-db [db w opts])) |
| 385 | +(defn- ^:declared resolve-datom [db e a v t]) |
| 386 | +(defn- ^:declared validate-attr [attr at]) |
| 387 | +(defn- ^:declared components->pattern [db index cs]) |
| 388 | +(defn ^:declared indexing? [db attr]) |
372 | 389 |
|
373 | 390 | (defrecord-updatable DB [schema eavt aevt avet max-eid max-tx rschema hash] |
374 | 391 | #?@(:cljs |
|
681 | 698 |
|
682 | 699 | ;; ---------------------------------------------------------------------------- |
683 | 700 |
|
684 | | -(declare entid-strict entid-some ref?) |
| 701 | +;; using defn instead of declare because of http://dev.clojure.org/jira/browse/CLJS-1871 |
| 702 | +(defn ^:declared entid-strict [db eid]) |
| 703 | +(defn ^:declared entid-some [db eid]) |
| 704 | +(defn ^:declared ref? [db attr]) |
685 | 705 |
|
686 | 706 | (defn- resolve-datom [db e a v t] |
687 | 707 | (when a (validate-attr a (list 'resolve-datom 'db e a v t))) |
|
985 | 1005 | ~expr |
986 | 1006 | (cond-let ~@rest))))) |
987 | 1007 |
|
988 | | -(declare transact-tx-data) |
| 1008 | +;; using defn instead of declare because of http://dev.clojure.org/jira/browse/CLJS-1871 |
| 1009 | +(defn ^:declared transact-tx-data [report es]) |
989 | 1010 |
|
990 | 1011 | (defn retry-with-tempid [report es tempid upserted-eid] |
991 | 1012 | (if (contains? (:tempids report) tempid) |
|
0 commit comments