diff --git a/src/datomish/jdbc_sqlite.clj b/src/datomish/jdbc_sqlite.clj index 421707d5..a3f5a5b9 100644 --- a/src/datomish/jdbc_sqlite.clj +++ b/src/datomish/jdbc_sqlite.clj @@ -38,3 +38,12 @@ (j/get-connection spec) (assoc spec :connection) (->JDBCSQLiteConnection))))) + +(extend-protocol s/ISQLiteConnectionFactory + String + ( (.open sqlite.DB path (clj->js {:mode mode})) (.then ->SQLite3Connection)))) + +(extend-protocol s/ISQLiteConnectionFactory + string + (!]]]) + #?@(:cljs [[datomish.pair-chan] + [datomish.test-macros :refer-macros [deftest-async]] + [datomish.node-tempfile :refer [tempfile]] + [cljs.test :as t :refer-macros [is are deftest testing async]] + [cljs.core.async :as a :refer [!]]]))) + +(deftest-async test-all-rows + (with-tempfile [t (tempfile)] + (let [db (