Fork me on GitHub
#datomic
<
2015-09-04
>
damien11:09:37

Hi all - question about using couchbase as storage in Datomic. I have started my transactor and it connects to my test bucket just fine. When I open Datomic console I can see my bucket under the storage alias I provided but the DB drop down is empty. It's blank and I can't run by queries with the error "DB name cannot be blank"

bhagany11:09:16

@damien: it sounds to me like you need to create a db, like here: http://docs.datomic.com/tutorial.html#making-a-database

bhagany11:09:21

@damien: to dispel what may be a confusion - the storage and the db are different things.

damien13:09:58

@bhagany thanks, good to go 👍

clojuregeek13:09:27

does anyone know of a good example of using datomic in clojure? I'd like to see one. The examples here are for java and groovy.. but.. i'm not seeing a whole lot for clojure on Datomic github 😭 I'd like to see where the attributes go and init of the application

marshall13:09:34

@clojuregeek: This repo: https://github.com/Datomic/day-of-datomic has quite a few examples of using Datomic from Clojure

clojuregeek14:09:26

yes there are some small things, i was kind of hoping to see a small example that was complete. but I can work with that.. thanks simple_smile

bhagany14:09:56

@clojuregeek: I haven't done this myself yet, but when I get to the point you're at, I plan to take a look at how juxt's modular sets up datomic projects: https://github.com/juxt/modular

clojuregeek14:09:21

cool, i'll check it out

clojuregeek16:09:13

anyone use lein-datomic ?

micah22:09:29

Anyone find that you can't query on certain attributes in datomic? It's F-ing weird!

micah22:09:34

airworthy.repl=> (into {} (api/entity (db/db) 277076930200612)) {:airport/city "GRAYSLAKE", :airport/name "Campbell Airport", :airport/type :airport, :airport/public true, :airport/lng -88.0740880555556, :airport/lat 42.3246111111111, :airport/state "IL", :airport/code "C81", :airport/elev 788}

micah22:09:50

note the airport/lng attribute

micah22:09:12

airworthy.repl=> (api/q '[:find ?e :in $ :where [?e :airport/lng]] (db/db)) #{}

micah22:09:42

Yet a query for all entities with :airport/lng attribute yields an empty set. WTF?

micah22:09:23

:airport/lat works fine...

micah22:09:25

airworthy.repl=> (count (api/q '[:find ?e :in $ :where [?e :airport/lat]] (db/db))) 19339

micah22:09:42

every other attribute is query-able... just not :airport/lng

micah22:09:16

OK... by transacting all the airport entities (without changing any values) the problem is solved

micah22:09:46

I guess an index got blown away somehow and transacting the entities repopulated it. Puzzling. Sorry for spamming the room here.