This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-01-23
Channels
- # arachne (3)
- # aws (1)
- # bangalore-clj (2)
- # beginners (19)
- # boot (151)
- # cider (72)
- # cljs-dev (9)
- # cljsjs (7)
- # cljsrn (37)
- # clojure (215)
- # clojure-austin (1)
- # clojure-denmark (2)
- # clojure-dev (68)
- # clojure-india (1)
- # clojure-ireland (2)
- # clojure-italy (4)
- # clojure-mke (1)
- # clojure-nl (4)
- # clojure-russia (4)
- # clojure-serbia (1)
- # clojure-spec (29)
- # clojure-uk (23)
- # clojurescript (23)
- # cursive (24)
- # datomic (71)
- # emacs (5)
- # events (1)
- # gsoc (11)
- # hoplon (20)
- # klipse (4)
- # lambdaisland (2)
- # leiningen (3)
- # luminus (3)
- # off-topic (30)
- # om (40)
- # om-next (1)
- # onyx (15)
- # pedestal (19)
- # perun (7)
- # planck (23)
- # proton (1)
- # protorepl (2)
- # re-frame (35)
- # reagent (21)
- # ring-swagger (38)
- # rum (19)
- # spacemacs (9)
- # untangled (11)
- # vim (5)
- # yada (4)
can an entity have attributes with a different namespace? [<e-id> <attribute> ...] [1 :person/name] [1 :movie/title]
does the "/" in attribute carry any meaning?
I started getting strange error while deleting entity. Message says
"java.lang.IllegalArgumentException: :db.error/reset-tx-instant You can set :db/txInstant only on the current transaction.”
.My delete function looks like this (defn delete-entity [conn entity-id person-id]
(t/info "delete-entity" entity-id person-id)
(d/transact conn [[:db.fn/retractEntity entity-id]]))
. Not sure what is going on and what does that error mean. Any tips? I was able to find only one google search with this error and that one didn’t help@drewverlee yes, an entity can have attributes from multiple namespaces, it has no special meaning
namespaces do help keep things organised so I’d recommend you don’t mix them
Does anyone know if there’s a way for a database function to return/execute multiple transactions?
I’m doing a data migration in a database function and it needs to do a :db/add for the entity and have a transaction
so (datomic/transact conn [[:db/add id :attribute value]{:db/id #db/id[:db.part/tx] :tx-attribute value2}])
for each entity
Is there a way of running a 'migration function', with either vanilla datomic or conformity? In conformity you might add a migration that says all my users
have :user/first-name
attributes. But what is the best way to then iterate over all my users and transact that new data for each user?
@mbutler I've needed a "data migration" like that as well
I'd just build my own "migrate" tool that does both schema migrations and data migrations
no need to make a transactor fn for that IMO
@pesterhazy Thanks, that does appear the best answer atm. If anyone else has some experience of this let me know 🙂
@podviaznikov Can you provide more info about the entity ID you’re passing to the function? I would expect that error if, for instance, you tried to call retractEntity on a transaction eid
@mbutler I do this all the time with sql migrations - I don't like any of the existing frameworks and it's so simple to build
Datomic 0.9.5554 is now available https://groups.google.com/d/topic/datomic/d74excL8JaI/discussion
is it possible to use datalog without datomic?
@marshall I’ll double check if it was regular entity id. I think it was, but will check. Thanks!
hi, can I get an enlightenment how datomic sends and receives data (esp. does it store data or is just a layer to a database)? for example, my old understanding of Client-Server is: Client (e.g. mobile) -> sends data (e.g. JSON) over HTTP -> Server (e.g. Liberator/Pedestal?) -> stores it to Database (e.g. Datomic) ... is this wrong? or something is missing in the flow?
in storage is the address of a transactor (which is the only process allowed to write to storage)
peers see this address and connect to a transactor. The transactor gives peers a live stream of writes to datomic (the tx-queue), and also accepts transactions to write.
@ejelome well, it has its own expectation for how its keys and values are laid out, but it does not have its own storage service
@ejelome it is parasitic on some other tech for storage, e.g. dynamodb, a sql database, cassandra, etc
but the only thing it needs is transactional update, blob storage, and retrieval by a key
ahhh, so it just says how to store and retrieve data but the actual storage is a separate layer
e.g. if storage is sql, peers make a sql query (select * from datomic_kvs where id="xxx") against storage to perform "reads"
oh, so it kind of has pre-made way to deal with kind of database you'll store/retrieve the data
I would assume it's differently handled on diff databases, e.g. rdbms is diff. to nosql is diff. to <insert another kind of db>
yes, that is true. but they're all used as key-value stores, there's not that much difference
great! this answered one of the two question (storage): http://docs.datomic.com/storage.html#outline-container-1
so then, knowing that it just provisions a database, does datomic also need some sort of way to handle incoming traffic? e.g. liberator/pedestal?
looking at the chart: app
<-> client
<-> http+transit
<-> server
the client
is liberator/pedestal
?
that's where your code is that "uses" datomic as a db and which doesn't care about datomic's arch
I'm actually confused with the app
and client
because I usually think of the app
as the client
itself
e.g. if you have a traditional CRUD webapp, you have client, server, and db. swap out DB with something else (e.g. mysql vs datomic), the arch remains the same
oh, I was limiting myself with the jargon (e.g. client as strictly front-end), that's why