Datomic Cloud DB name with slash causes exception


#1

If I try to connect to a db with a name containing a slash /, I get an exception. This feels like a bug. I am able to name DBs with a / in Datomic on-prem.

(d/create-database client {:db-name "foo"})
=> true
(d/create-database client {:db-name "foo/bar"})
=> true
(d/connect client {:db-name "foo"})
=> {:db-name "foo", :database-id "55e543d1-14f0-4c9a-b3a9-8fa089a730e9", :t 3, :next-t 4, :type :datomic.client/conn}
(d/connect client {:db-name "foo/bar"})
clojure.lang.ExceptionInfo: Datomic Client Exception
clojure.lang.Compiler$CompilerException: clojure.lang.ExceptionInfo: Datomic Client Exception {:cognitect.anomalies/category :cognitect.anomalies/forbidden, :datomic.client/http-result {:status nil, :headers nil, :body nil}}, compiling:(form-init3645246680023467651.clj:1:16)

We like to name DBs with a / so you can simply pass the DB name to the keyword function, creating a namespaced keyword from it. I could not locate any documentation saying certain characters are prohibited. Is this a bug?


#2

Thanks Kenny, we’ll document the legal characters.