Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem with the printer #52

Open
mauricioszabo opened this issue Mar 23, 2020 · 0 comments
Open

Problem with the printer #52

mauricioszabo opened this issue Mar 23, 2020 · 0 comments

Comments

@mauricioszabo
Copy link

I found a strange behavior on the UNREPL printer while using datahike. Lauching a REPL with:

clj -Sdeps '{:deps {io.replikativ/datahike {:mvn/version "0.2.1"}}}'

and running the following code:

(ns dc.context
  (:require [datahike.api :as d]))

(def uri "datahike:mem://dc")
(def schema [{:db/ident :page/title
              :db/valueType :db.type/string
              :db/cardinality :db.cardinality/one
              :db/unique :db.unique/identity}])
(d/create-database uri :initial-tx schema)
(def conn (d/connect uri))
(:db-before
 (d/transact conn [{:page/title "Welcome"}
                   {:page/title "Hello World"}]))

It prints, for the last statement, the following:

[:eval #datahike.db.DB {1 :db/cardinality, 1 :db/ident, 1 :db/unique, 1 :db/valueType, 536870913 :db/txInstant} 13]

As you can see, there's multiple 1 keys. In a normal REPL, it prints:

#datahike/DB {:schema {:db/ident #:db{:unique :db.unique/identity}, :page/title #:db{:ident :page/title, :valueType :db.type/string, :cardinality :db.cardinality/one, :unique :db.unique/identity}, 1 :page/title}}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant