This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-07-14
Channels
- # aleph (16)
- # bangalore-clj (4)
- # beginners (19)
- # boot (27)
- # cider (81)
- # clara (2)
- # cljs-dev (343)
- # cljsrn (97)
- # clojure (224)
- # clojure-hk (1)
- # clojure-italy (25)
- # clojure-russia (5)
- # clojure-serbia (2)
- # clojure-spec (7)
- # clojure-uk (27)
- # clojurescript (97)
- # cursive (8)
- # datomic (48)
- # docker (1)
- # emacs (15)
- # hoplon (39)
- # jobs (4)
- # lumo (13)
- # off-topic (2)
- # om (66)
- # onyx (7)
- # parinfer (5)
- # pedestal (2)
- # play-clj (10)
- # protorepl (2)
- # quil (1)
- # re-frame (38)
- # reagent (33)
- # spacemacs (1)
- # specter (4)
- # sql (19)
- # test-check (31)
- # unrepl (4)
- # untangled (3)
Maybe for larger lists. I've never used it. I never need order over more than ~10 items at a time
If you do a pull on a :db/id and get a number back, then enter that number in the "Entities" tab of the Datomic Console, you would expect to get something back every time. Trouble is I get no response. It seems there's something I don't understand.
I have functions & schemas, I want d/transact
in the same transaction, that will throws error.
this code will throws
@(d/transact conn (concat schemas functions))
but working while I separates theme
@(d/transact conn schemas)
@(d/transact conn functions)
@isaac Yep, thats exactly what I expect. You cannot create and use the attributes (schema) in the same transaction.
it would be nice if there was an API to start a peer server in-memory/in-process to simplify testing setup/teardown
no, that uses the peer API, I want to write some tests using the client API without having to kick off a separate peer server process
Calling (d/pull db '[*] id)
, where id
is 17592186045473, which is of course the original number, gives me a hash-map that has all the attributes I would expect in it.
I am trying to work with idents, doing this: (d/pull db '[*] [:account/name "bank-fee"])
, and get the error message "Attribute values not unique: :account/name". Not sure what that means. There is only one :account/name
called "bank-fee", and in the schema I marked :account/name
to be :indexed. Is there something else I can do to make my little pull statement work, or am I going about it wrong?
@cjmurphy your entity needs to be unique for lookup refs to work: http://docs.datomic.com/identity.html#lookup-refs
Thanks @schmee (and @jaret from before). I'm using the YuppieChef thing, so I think that translates to :unique-identity
- will give it a try.
:unique-value and :unique-identity are different @cjmurphy but both will allow lookup refs
Hmm - they both somehow seem to stop upserting, which I'm relying on when importing data.
Yes :unique-identity
(using Yuppiechef) gets me past that error on that attribute. And furthermore allows me to d/pull
using an ident. Thanks @schmee
Is it necessary to backup an S3 Datomic backup file? e.g. is it possible for datomic’s backup process to corrupt a backup file due to malfunction?
kleinheit.datomic.impl=> (a/<!! (c/q conn {:query '[:find ?e :where [?e :advertiser/advertiser ?v] [(subs ?v 0 1) "a"]] :args [(c/db conn)]}))
{:dbs [{:database-id "datomic:"
:history false
:next-t 2002
:t 1001}]
:cognitect.anomalies/category :cognitect.anomalies/incorrect
:cognitect.anomalies/message "The following forms do not name predicates or fns: (subs)"}
you can, as long as the symbol is available inside the namespace you evaluate the query
ah sorry... Datomic client
I see now. It might not be supported because of the above (the peer is not the same runtime evaluating the query)
in this case I believe you need to the use the peer API
you may still not be able to use subs via the client api, but even on the peer api this seems wrong
@U09R86PA4 you are correct!