Discussion:
Minimal lein project example for Datomic Pro?
Bastien Guerry
2017-06-12 15:56:16 UTC
Permalink
Hi all,

I try to use the latest Datomic Pro (free edition) with postgresql as a
storage service.

I created the user and db on psql, and I can run the transactor fine. It
returns:

System started
datomic:sql://<DB-NAME>?jdbc:postgresql://localhost:5432/datomic?user=datomic&password=datomic,
you may need to change the user and password parameters to work with your
jdbc driver

which seems OK.

Then I create a minimal leiningen project and I'm confused - I used to use

[com.datomic/datomic-free "0.9.5561.50"]

and both the documentation
(here: http://docs.datomic.com/integrating-peer-lib.html#sec-3) and this
example
(here: https://github.com/Clojurous/shouter-datomic-heroku/blob/master/project.clj)
seems to suggest

[com.datomic/datomic-pro "0.9.5561.50"]

but this cannot be found. Is it just a matter of updating clojars.org?

Going (optimistically!) ahead with the -free version and trying to connect
to a database, I tried this:

(ns testapp.db (:require [datomic.api :as d]))
(def uri
"datomic:sql://test-db?jdbc:postgresql://localhost:5432/datomic?user=datomic&password=datomic")
(def conn (d/connect uri))

it returns

CompilerException java.lang.IllegalArgumentException:
:db.error/unsupported-protocol Unsupported protocol :sql,
compiling:(form-init7146187594652385193.clj:9:12)

So I guess the second error vanishes when using the correct dependency. Is
that right?

I feel like a minimal example of a lein project for Datomic pro would be a
huge plus for beginners.

Thanks in advance for any feedback!

Bastien
--
You received this message because you are subscribed to the Google Groups "Datomic" group.
To unsubscribe from this group and stop receiving emails from it, send an email to datomic+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
terjesb
2017-06-12 16:12:09 UTC
Permalink
Hi, Bastien. Per http://docs.datomic.com/integrating-peer-lib.html, take a
look at this:

Datomic Pro users can get the Datomic peer library directly from the maven
repository hosted at my.datomic.com. See the download and integration
instructions by logging into your account at https://my.datomic.com.
Post by Bastien Guerry
Hi all,
I try to use the latest Datomic Pro (free edition) with postgresql as a
storage service.
I created the user and db on psql, and I can run the transactor fine. It
System started
datomic:sql://<DB-NAME>?jdbc:postgresql://localhost:5432/datomic?user=datomic&password=datomic,
you may need to change the user and password parameters to work with your
jdbc driver
which seems OK.
Then I create a minimal leiningen project and I'm confused - I used to use
[com.datomic/datomic-free "0.9.5561.50"]
http://docs.datomic.com/integrating-peer-lib.html#sec-3) and this example
https://github.com/Clojurous/shouter-datomic-heroku/blob/master/project.clj)
seems to suggest
[com.datomic/datomic-pro "0.9.5561.50"]
but this cannot be found. Is it just a matter of updating clojars.org?
Going (optimistically!) ahead with the -free version and trying to connect
(ns testapp.db (:require [datomic.api :as d]))
(def uri
"datomic:sql://test-db?jdbc:postgresql://localhost:5432/datomic?user=datomic&password=datomic")
(def conn (d/connect uri))
it returns
:db.error/unsupported-protocol Unsupported protocol :sql,
compiling:(form-init7146187594652385193.clj:9:12)
So I guess the second error vanishes when using the correct dependency.
Is that right?
I feel like a minimal example of a lein project for Datomic pro would be a
huge plus for beginners.
Thanks in advance for any feedback!
Bastien
--
You received this message because you are subscribed to the Google Groups "Datomic" group.
To unsubscribe from this group and stop receiving emails from it, send an email to datomic+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Bastien Guerry
2017-06-12 18:26:50 UTC
Permalink
Hi terjesb,
Hi, Bastien. Per http://docs.datomic.com/integrating-peer-lib.html
This is it, thanks a bunch for your reactivity!

I have Datomic Pro running fine with a Postgresql storage and the
console is okay too.

Have a nice day,
--
Bastien
--
You received this message because you are subscribed to the Google Groups "Datomic" group.
To unsubscribe from this group and stop receiving emails from it, send an email to datomic+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Loading...