does datomic mem-db support tuple type ? i tried to add a tuple field and it barfed so not sure ?
This should be dependent on datomic lib version, not storage type
lib version? where is that found ? we use cloud db for production
how do you create a mem db with cloud?
you dont .. you use one or the other. looks like dev-local has some thing dev-local-tu for doing test like things where you blow away the db around each test, which is what we want. but i think mem-db does not support tuple
AFAIK before dev-local there were no mem-dbs with cloud
so I’m not sure what you are doing
if you use a peer-server with on-prem you could do it, but that depends on the peer lib’s version. There was also this: https://github.com/ComputeSoftware/datomic-client-memdb
that the one we using, but we just run that locally , when on prod using cloud db , we switch between one and the other
so, that depends on an on-prem lib, and that on-prem lib’s version is what’s dictating whether tuples are supported or not (most likely)
I’m just saying there’s more to the story than “mem-db -> no tuple types”
on-prem 0.9.5927 added tuples: https://docs.datomic.com/on-prem/changes.html#0.9.5927
I imported a prod db via dev-local/import-cloud. Is there a way to get a breakdown of the size of the db.log file?
I'm also curious if import-cloud provides a way to import the current version of the database with no historical retracts.
Are there any issues with running multiple import-cloud in parallel?
So I have an entity with a child with cardinality many, and I query for all entities where one of these child entities matches a value. I tried
'(or
(and
[?e :child-element-key ?ste]
[(.contains ^java.lang.String ?ste "value")]))
But that didn't work, is there another way to do this?clojure.core/list
isn’t needed--you are already quoting
Thanks, sorry I copied and modified this from my code where I wasn't quoting
this is generally how you do it; it’s going to be difficult to diagnose your problem without a complete example. You could try simplifying the query with specific data to see what’s going wrong. e.g.:
(d/q '[:find ?e
:where
(or
(and
[?e :child-element-key ?ste]
[(.contains ^java.lang.String ?ste "value")]))]
[[1 :child-element-key "value1"]
[2 :child-element-key "nope"]])
=> #{[1]}
Ok thanks, I wasn't sure if I was completely off base, probably an issue in my data then. Thank you!
Yes definitely was a problem in the data, thanks for the help though!