Skip to content

p14n/logscale

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Logscale

Datascript with a foundationdb backend.

See tests for examples

(deftest single-insert-test
  (let [fdb (sut/create-datascript-function {:schema tu/schema
                                             :root-keys ["test" "string"]
                                             :datascript-opts tu/opts})]
    (testing "Database saves to fdb"
      (reset ["test" "string" 0])
      (fdb
       #(d/transact! % [{:db/id -1
                         :name  "Dean"
                         :age   94
                         :aka   ["Me"]}]))
      (is (= #{["Dean" 94 "Me"]}
             (fdb #(d/q `[:find  ?n ?a ?s
                          :where [?e :name "Dean"]
                          [?e :name ?n]
                          [?e :age  ?a]
                          [?e :aka  ?s]]
                        (d/db %))))))))

About

Datascript with a foundationdb backend

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published