Fork me on GitHub
#datomic
<
2016-08-11
>
yonatanel08:08:13

@stuarthalloway: I know this is an old answer, but what did you mean by "For attributes that are marked :db/index true, it would be possible for the query engine to use predicates to avoid streaming all values of an attribute. That is planned, but not yet implemented."? Isn't that what the index is for? From https://groups.google.com/forum/#!msg/datomic/IxyFQnodrF0/in1vewXEzs8J. And here's another example where it comes up: https://groups.google.com/forum/#!msg/datomic/fsowOBbhvXU/dWHpj7JiDdQJ

yonatanel08:08:35

Can anyone explain the following? In http://docs.datomic.com/clojure/#datomic.api/datoms it says

:vaet contains datoms for attributes of :db.type/ref
:vaet is the reverse index
It looks like a mistake when reading it since there's one line for each index but two lines for :vaet, but it might mean that :vaet is the reverse of :eavt.

danielstockton09:08:06

Has anyone solved the datomic (recent) with aleph problems without excluding hornetq server and depending on hornet 2.4.8? https://groups.google.com/forum/#!msg/datomic/pZombLbp-tQ/pyU37oAnAgAJ

danielstockton10:08:03

@timgilbert the id of the database value is the uri afaict, unless you're using the mem db (:id (d/db conn))

robert-stuttaford10:08:51

@danielstockton yep, just confirmed, you do get the uri out if you use :id, which gives you a java.util.URI. str on that value to get back to the value you gave to d/connect

robert-stuttaford10:08:05

(keys some-db) reveals a bunch of interesting things: (:id :memidx :indexing :mid-index :index :history :memlog :basisT :nextT :indexBasisT :elements :keys :ids :index-root-id :index-rev :asOfT :sinceT :raw :filt)

timgilbert12:08:17

Oh, interesting. Thanks guys!

val_waeselynck16:08:34

Do you see anything wrong with the following transaction? I'm getting a IllegalArgumentExceptionInfo :db.error/not-an-entity Unable to resolve entity: :bot.log.msg.kind/outgoing in datom [#db/id[:bs.parts/raw-data -1] :bot.log.msg/kind :bot.log.msg.kind/outgoing] when using it with datomic.api/with

val_waeselynck16:08:42

Even more strangely, it seems to work if I wait a few minutes.

robert-stuttaford17:08:06

@val_waeselynck: is :bot.log.msg/kind valuetype ref or keyword? if ref, have you previously transacted [:db/add <tempid> :db/ident :bot.log.msg.kind/outgoing] ?

val_waeselynck17:08:08

it's ref, and yes I have transacted it

potetm18:08:42

Alright, I have an offbeat question. When you pass d/tx-range an #inst, does it resolve that to a t in order to pull from the log? If so, how is that resolution done?

jaret19:08:44

@potetm: http://docs.datomic.com/best-practices.html#t-instead-of-txInstant You could have several transactions processed within the same second (inst), but different t.

jaret19:08:10

"Datomic's own t time value exactly orders transactions in monotonically ascending order, with each transaction receiving its own t value."

potetm20:08:22

Hey @jaret! I see what you mean, multiple t values could be applicable for a given #inst. I was wondering how that resolution happened. For example, does it look in the index? (Yeah this in reference to the issue I just updated 😄 )

potetm20:08:41

I thought someone here might just know offhand, and that would explain it.

potetm20:08:58

In hindsight, it was a real shot in the dark.

devn22:08:25

s/safe/going to work/

marshall22:08:31

They should if you follow the steps as written

d._.b23:08:06

Heya folks, I am having some trouble wrapping my head around modeling data in Datomic. Let's say I have Company which has 0 or many Applications. I would like to ensure that while I only have a few types of Applications named: "A", "B", and "C", that a Company cannot have more than one "A" application. I imagine something like:

Company
name: string, cardinality: one, unique: value
applications: ref, cardinality: many, unique: ???

Application
_company: company, cardinality: one
name: string, cardinality: one, unique: ???

d._.b23:08:54

An Application will have additional attributes beyond just a name and a reference back to company.

d._.b23:08:42

Reasoning out loud: I can't set unique on an attribute which has a cardinality of many, so would I use unique: identity on an application?

d._.b23:08:49

Should I use an enum for the name, since there is a limited, known set of application names?