Fork me on GitHub
#datomic
<
2017-02-19
>
ezmiller7708:02:53

anyone know why trying to delete a database like so (with the client api`): (delete-database “datomic:) might yield the following error: > ClassCastException [trace missing]

ezmiller7709:02:07

Figured out that the syntax for the client is different, of course. So for list-databases it looks like this: (pprint (<!! (list-databases {:account-id client/PRO_ACCOUNT, :secret "datemo", :region "none", :endpoint "localhost:8998", :service "peer-server", :access-key “datemo”})))

ezmiller7709:02:28

The map is like what you provide to connect.

ezmiller7709:02:03

But still can’t get the delete-database command to work using this syntax, and providing in addition a :db-name symbol.

ezmiller7709:02:07

{:cognitect.anomalies/category :cognitect.anomalies/incorrect,
 :datomic.client/http-error {:cause "Invalid Op”}}

ezmiller7709:02:45

http-error made me think that maybe the peer-server wasn’t running, but it is. then, though, i wondered if it doesn’t make sense in the first place to delete a database through a peer-server connection since the peer-server start-up syntax seems to require you to specify a particular db by name.

ezmiller7709:02:57

i.e. you’d be deleting the database to which the peer-server is connected. logically, it seems that that should invalidate the peer server connection…