Fork me on GitHub
#datomic
<
2021-11-23
>
Benjamin11:11:37

what is the difference between calling d/entid and passing the attr as keyword?

(d/qseq
    '[:find ?val
      :in $ ?attr
      :where [_  ?attr ?val]]
    db
    (d/entid attr))

(d/qseq
    '[:find ?val
      :in $ ?attr
      :where [_  ?attr ?val]]
    db
    attr)
also entid is a peer only thing, right? So is passing the keyword the way to go on the client?

βœ”οΈ 1
stuarthalloway12:11:43

Hi @U02CV2P4J6S! If you are finding all values for an attribute you do not need query and might be better served with https://docs.datomic.com/cloud/query/raw-index-access.html#datoms.

clojure-spin 1
stuarthalloway12:11:06

But to answer your specific question: While entid is a peer API, entity ids and keywords are both fundamental to Datomic's data model and present in all flavors of Datomic.

Benjamin13:11:58

ah sounds like datoms is what I need then thanks

Ivan Fedorov15:11:59

Was there any article on Datomic schema migrations? Also, is it common to use ragtime?

thumbnail18:11:23

We use conformity, but I think ragtime is a fair bet nowadays

Daniel Jomphe18:11:35

I asked the same question last summer and had this answer, which we used successfully. https://clojurians.slack.com/archives/C03RZMDSH/p1627657775006800

Daniel Jomphe18:11:08

You can follow the thread's discussion by clicking on the link...

Ivan Fedorov09:11:48

Thanks @UHJH8MG6S ! Thanks @U0514DPR7 ! Yeah I think that idempotent-tx by @U0P7ZBZCK is awesome!

1
☺️ 1
Ivan Fedorov10:11:07

found this https://github.com/magnetcoop/stork _ ouch! tied to on-prem version

Benjamin17:11:12

mything/name mything/my-name what is better? I though 1 is bad because it hides the core function when I destructure with keys . Does it matter?

potetm17:11:33

{n :mything/name}

potetm17:11:59

destructure like that^ and you can use the kw you prefer w/o fear of shadowing

πŸ‘ 1
bmaddy22:11:39

Does anyone else see weird netty error messages when running Datomic in a docker container? I see the following when connecting (peer, dev protocol). Everything still seems to work just fine though so it's not an actual problem. I'd just be happy to make a little change if someone knows a quick fix.

Nov 23, 2021 3:13:08 PM org.apache.activemq.artemis.core.remoting.impl.netty.NettyConnector createConnection
ERROR: AMQ214016: Failed to create netty connection
java.net.UnknownHostException: datomic
	at java.base/java.net.InetAddress$CachedAddresses.get(InetAddress.java:797)

tvaughan11:11:45

We've been running datomic on-prem (transactor, peer, and console) in containers for about two years and haven't seen this one before

thanks3 1
bmaddy17:11:53

Thanks for mentioning that--it's nice to have it confirmed that it's on my end.

πŸ‘ 1