This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(let [url "datomic:mem://test-bigint" #_ "datomic:sql://test-bigint?jdbc:postgresql://192.168.99.100:5432/datomic?user=datomic&password=datomic" | |
_ (d/delete-database url) | |
_ (d/create-database url) | |
test-conn (d/connect url) | |
] | |
@(d/transact test-conn [{:db/ident :test/bigint | |
:db/cardinality :db.cardinality/one | |
:db/valueType :db.type/bigint | |
:db/unique :db.unique/identity}]) | |
@(d/transact test-conn [{:test/bigint 1N} {:test/bigint (biginteger 2)} {:test/bigint 73018638354N} {:test/bigint (biginteger 73018638355)}]) | |
(let [db (d/db test-conn)] | |
[(mapv #(d/q '[:find ?e . | |
:in $ ?v | |
:where | |
[?e :test/bigint ?v]] db %) [1N 2N 73018638354N 73018638355N (biginteger 1) (biginteger 2) (biginteger 73018638354N) (biginteger 73018638355N)]) | |
(mapv #(d/entity db [:test/bigint %]) [1N 2N 73018638354N 73018638355N (biginteger 1) (biginteger 2) (biginteger 73018638354N) (biginteger 73018638355N)]) | |
])) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment