This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2015-11-12
Channels
- # admin-announcements (3)
- # beginners (13)
- # boot (52)
- # cbus (1)
- # cider (13)
- # cljs-dev (70)
- # cljsjs (16)
- # cljsrn (124)
- # clojure (129)
- # clojure-austin (3)
- # clojure-boston (2)
- # clojure-russia (238)
- # clojure-sg (3)
- # clojurescript (119)
- # cursive (18)
- # datomic (22)
- # editors-rus (2)
- # events (1)
- # hoplon (160)
- # jobs (1)
- # jobs-rus (8)
- # ldnclj (31)
- # ldnproclodo (1)
- # lein-figwheel (4)
- # leiningen (8)
- # off-topic (3)
- # om (335)
- # onyx (29)
- # re-frame (15)
- # reagent (12)
- # robots (1)
- # yada (19)
Adding datomic-pro - [com.datomic/datomic-pro "0.9.5153" :exclusions [org.slf4j/slf4j-nop org.slf4j/slf4j-log4j12]] causes the following message when running boot aot pom uber jar
:
Writing pom.xml and pom.properties...
Adding uberjar entries...
Error while extracting /Users/nha/.m2/repository/org/apache/tomcat/tomcat-juli/7.0.27/tomcat-juli-7.0.27.jar:META-INF/LICENSE: java.io.FileNotFoundException: /Users/nha/.boot/cache/tmp/Users/nha/repo/vendor/saapas/20r6/mv1vpv/META-INF/LICENSE (Is a directory)
Writing clojure-backend-0.1.0-SNAPSHOT.jar...
@nha That looks like a problem with how Boot is trying to create an Uberjar. I suspect it's because some library JAR has a file named META-INF/LICENSE
and another JAR has a directory named META-INF/LICENSE/
. This isn't specific to Datomic— maybe ask for advice in #C053K90BR or #C03S1KBA2.
@iwillig: t
is a Datomic-specific value representing time. It's just a counter.
thanks @stuartsierra
Most Datomic API functions that take a "time point" argument accept any one of t
, a transaction entity ID, or a java.util.Date.
Given to three arguments, two as java.util.Date (start end), and a identifier on each transaction (:audit/group-id) what is the best (fastest) way to query for these txs & datoms?
@iwillig: Not sure I understand the description of your problem. If there are attributes on the transaction entities, then you can query for them using d/q
. If you have start/end Dates, you can use d/tx-range
to find all the transactions between those dates.
so I should just request all of the transactions for that date range and then filter the transaction but group-id
@iwillig: Yes, what you describe will work. Or, as an alternative, something like (d/q '[:find ?tx :where [?tx :group-id 42] [?tx :db/txInstant ?inst] [(< ?inst #inst "2015-01-01")] [(>= ?inst #inst "2014-01-01")]] db)
One or the other might be faster depending on which set is smaller — transactions in the range of dates, or transactions with that :group-id
.