Fork me on GitHub
#datomic
<
2015-11-12
>
nha09:11:30

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...

Lambda/Sierra13:11:15

@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.

nha13:11:31

Ok sure. I will thanks

iwillig18:11:00

in this function doc, t value is time? (java.util.Date)

iwillig18:11:32

or datomic time

Lambda/Sierra18:11:36

@iwillig: t is a Datomic-specific value representing time. It's just a counter.

iwillig18:11:22

is there a way to go from datetime to datomic t without using the log ?

Lambda/Sierra18:11:51

Most Datomic API functions that take a "time point" argument accept any one of t, a transaction entity ID, or a java.util.Date.

iwillig18:11:21

I guess my question is something like this

iwillig18:11:35

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?

iwillig18:11:00

maybe i should open a support ticket for this

Lambda/Sierra18:11:46

@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.

iwillig18:11:59

so I should just request all of the transactions for that date range and then filter the transaction but group-id

iwillig18:11:53

i am not explaining it clearly sorry

Lambda/Sierra19:11:03

@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)

Lambda/Sierra19:11:37

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.

iwillig19:11:16

okay thanks

raywillig19:11:55

@nha: not sure if this will help or if you already got it figured out but boot's uber task has a -j option that will keep your dependency jars as jars without exploding them in the process of making your uberjar