Fork me on GitHub
#datomic
<
2019-01-16
>
marcol00:01:53

How do we use the push command for datomic.ion.dev through lein?

marcol04:01:21

So once the repl is running, I manage to call the push function in datomic.ion.dev, (datomic.ion.dev/push {}), although I'm getting the following error IOException CreateProcess error=2, The system cannot find the file specified java.lang.ProcessImpl.create (ProcessImpl.java:-2) Not sure how to debug this and what could be wrong, has anybody ever encountered this?

Chris11:01:05

Is there a way to define which bits of a schema a peer server can use? It looks like filters (https://docs.datomic.com/on-prem/filters.html) could be used for this but it doesn't seem to be their intended use case. Is there a better option? The best practices guide briefly mentions aliasing schema elements for different applications, is that a better direction?

marshall15:01:07

@marcol ions require the use of a deps.edn project

Dustin Getz15:01:30

Are reverse navigations always cardinality many

Dustin Getz15:01:03

unless they are :unique

favila16:01:20

isComponent implies a 1-1 relationship, so the reverse of an isComponent attr will be cardinality-one

favila16:01:53

you're right though, in theory a unique ref should have the same property

favila16:01:30

I wonder if every isComponent should also assert unique just to get the extra constraint checked

favila16:01:18

nm, a unique ref doesn't imply that no other attr points to the entityvalue

Dustin Getz16:01:48

is unique ref a thing?

Ben Hammond16:01:56

it is possible to transact a ref to someone else's component entity

Ben Hammond16:01:03

although frowned upon

favila16:01:16

it's a constraint that datomic doesn't enforce

favila16:01:12

if you don't enforce it yourself retractEntity behavior may surprise you

Dustin Getz16:01:12

Yeah. so unique scalars aren’t refs so you can’t pull them backwards; unique refs are :many; so it’s just component refs that are :card/one

favila16:01:45

@dustingetz I think card-many isComponent will also have reverse-ref card-one

favila16:01:08

if you have extra they will just be dropped

favila16:01:14

(using d/entity or d/pull api)

mss17:01:07

what does will release Clojure resources mean specifically? kill the process with the peer? or just terminate things like the core async thread pool?

favila17:01:08

afaik it just calls shutdown-agents

favila17:01:20

so the agent thread pool is killed

favila17:01:57

unless you have another non-daemon thread running your process will probably die after that

mss18:01:27

makes sense. thanks for the clarification

favila18:01:55

I think (shutdown true) is mostly for java users of datomic

favila18:01:08

who don't know/care about the clojure system and just want all of it to shut off

tjg18:01:05

Given a datomic DB or schema, what do people use to generate an entity-relationship diagram? escherize/drytomic, or perhaps Hodur can be used this way?

lilactown19:01:09

I tried hodur but it was a bit too opinionated/simple for my taste

lilactown19:01:44

I tried it specifically because I wanted to get diagrams for free 😛

😄 5
dpsutton22:01:26

setting up schema at work. i was prototyping with :db/valueType ref but now i prefer to go to string. The docs say there is no way to do this. What should i do at this point? Must I come up with a new name for my attribute? Can i do some renaming shenanigans? This is all on our test db

favila22:01:53

rename attribute to something else (or retract it's db/ident completely) then make a new attribute

favila22:01:54

once you make an attribute you cannot change its type or remove it

favila22:01:10

you also cannot excise attributes

dpsutton22:01:34

what's the difference between retracting and excising

favila22:01:49

retracting adds a retraction datom

favila22:01:54

excising deletes old datoms

dpsutton22:01:03

i see. thanks