Skip to content

Commit

Permalink
Merge pull request #977 from fluree/fix/cljs-update
Browse files Browse the repository at this point in the history
Fix/cljs update
  • Loading branch information
dpetran authored Feb 24, 2025
2 parents d55adde + 0dd85d4 commit ec5667e
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 9 deletions.
2 changes: 1 addition & 1 deletion src/clj/fluree/db/datatype.cljc
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

#?(:clj (set! *warn-on-reflection* true))

(time-literals/print-time-literals-clj!)
#?(:clj (time-literals/print-time-literals-clj!))

(def default-data-types
{const/iri-id const/$id
Expand Down
7 changes: 5 additions & 2 deletions src/clj/fluree/db/flake/index/novelty.cljc
Original file line number Diff line number Diff line change
Expand Up @@ -421,7 +421,10 @@
:garbage (:address garbage-res))]
(log/info "Index refresh complete:" end-stats)
;; kick off automatic garbage collection
(async/thread
(garbage/clean-garbage indexed-db max-old-indexes))
#?(:clj
(async/thread
(garbage/clean-garbage indexed-db max-old-indexes))
:cljs
(<? (garbage/clean-garbage indexed-db max-old-indexes)))
indexed-db)))))
db))))
8 changes: 4 additions & 4 deletions src/clj/fluree/db/query/exec/eval.cljc
Original file line number Diff line number Diff line change
Expand Up @@ -419,7 +419,7 @@
:cljs
(.getHours (if (string? x)
(datatype/coerce (:value x) (:datatype-iri x))
datetime)))))
x)))))

(defn minutes
[x]
Expand Down Expand Up @@ -454,9 +454,9 @@
(.toString (.getOffset ^OffsetDateTime (->offset-date-time (:value x))))
#{const/iri-xsd-time}
(.toString (.getOffset ^OffsetTime (->offset-time (:value x)))))
:cljs (.getTimeZoneOffset ^js/Date (if (string? datetime)
(datatype/coerce (:value datetime) (:datatype-iri datetime))
datetime)))))
:cljs (.getTimeZoneOffset ^js/Date (if (string? x)
(datatype/coerce (:value x) (:datatype-iri x))
x)))))

(defn sha256
[{x :value}]
Expand Down
3 changes: 2 additions & 1 deletion src/clj/fluree/db/storage.cljc
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,8 @@
(defn split-address
"Splits `address` into the fully qualified storage method and local path."
[address]
(str/split address #":(?!.*:)" 2))
(let [i (str/last-index-of address ":")]
[(subs address 0 i) (subs address (inc i))]))

(defn valid-identifier?
[x]
Expand Down
2 changes: 1 addition & 1 deletion src/clj/fluree/db/virtual_graph/parse.cljc
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
[fluree.db.query.exec.update :as exec.update]
[fluree.db.query.exec.where :as where]
[fluree.db.query.exec.where :as exec.where]
#?(:cljs fluree.db.query.exec.select :refer [SubgraphSelector])
#?(:cljs [fluree.db.query.exec.select :refer [SubgraphSelector]])
[fluree.db.query.fql.parse :as q-parse])
#?(:clj (:import (fluree.db.query.exec.select SubgraphSelector))))

Expand Down

0 comments on commit ec5667e

Please sign in to comment.