diff --git a/src-node/datomish/js_sqlite.cljs b/src-node/datomish/js_sqlite.cljs new file mode 100644 index 00000000..40f289ec --- /dev/null +++ b/src-node/datomish/js_sqlite.cljs @@ -0,0 +1,20 @@ +;; This Source Code Form is subject to the terms of the Mozilla Public +;; License, v. 2.0. If a copy of the MPL was not distributed with this +;; file, You can obtain one at http://mozilla.org/MPL/2.0/. + +(ns datomish.js-sqlite + (:require + [datomish.sqlite :as s] + [datomish.js-util :refer [is-node?]] + [datomish.promise-sqlite :as promise-sqlite])) + +(def open promise-sqlite/open) + +(extend-protocol s/ISQLiteConnectionFactory + string + (!]]]) - #?@(:cljs [[datomish.promise-sqlite] + #?@(:cljs [[datomish.js-sqlite] [datomish.pair-chan] [datomish.test-macros :refer-macros [deftest-async deftest-db]] [datomish.node-tempfile :refer [tempfile]] diff --git a/test/datomish/places/import_test.cljc b/test/datomish/places/import_test.cljc index 4ade271c..af5a5ead 100644 --- a/test/datomish/places/import_test.cljc +++ b/test/datomish/places/import_test.cljc @@ -21,7 +21,7 @@ [datomish.test-macros :refer [deftest-async]] [clojure.test :as t :refer [is are deftest testing]] [clojure.core.async :refer [go !]]]) - #?@(:cljs [[datomish.promise-sqlite] + #?@(:cljs [[datomish.js-sqlite] [datomish.pair-chan] [datomish.test-macros :refer-macros [deftest-async]] [datomish.node-tempfile :refer [tempfile]] diff --git a/test/datomish/promise_sqlite_test.cljs b/test/datomish/promise_sqlite_test.cljs index dde6f23c..ad5d797d 100644 --- a/test/datomish/promise_sqlite_test.cljs +++ b/test/datomish/promise_sqlite_test.cljs @@ -14,7 +14,7 @@ [cljs.test :refer-macros [is are deftest testing async]] [datomish.pair-chan] [datomish.sqlite :as s] - [datomish.promise-sqlite :as ps])) + [datomish.js-sqlite :as ps])) (deftest-async test-all-rows (with-tempfile [t (tempfile)] diff --git a/test/datomish/query_test.cljc b/test/datomish/query_test.cljc index cd93d777..9564a85f 100644 --- a/test/datomish/query_test.cljc +++ b/test/datomish/query_test.cljc @@ -16,7 +16,7 @@ [datomish.test-macros :refer [deftest-async]] [clojure.test :as t :refer [is are deftest testing]] [clojure.core.async :refer [go !]]]) - #?@(:cljs [[datomish.promise-sqlite] + #?@(:cljs [[datomish.js-sqlite] [datomish.pair-chan] [datomish.test-macros :refer-macros [deftest-async]] [datomish.node-tempfile :refer [tempfile]] diff --git a/test/datomish/test/query.cljc b/test/datomish/test/query.cljc index a34a2f69..7d239daa 100644 --- a/test/datomish/test/query.cljc +++ b/test/datomish/test/query.cljc @@ -22,7 +22,7 @@ [tempfile.core :refer [tempfile with-tempfile]] [clojure.test :as t :refer [is are deftest testing]]]) #?@(:cljs - [[datomish.promise-sqlite] + [[datomish.js-sqlite] [datomish.test-macros :refer-macros [deftest-db]] [honeysql.core :as sql :refer-macros [param]] [datomish.node-tempfile :refer [tempfile]] diff --git a/test/datomish/tofinoish_test.cljc b/test/datomish/tofinoish_test.cljc index 199a4df9..444f0f6b 100644 --- a/test/datomish/tofinoish_test.cljc +++ b/test/datomish/tofinoish_test.cljc @@ -17,7 +17,7 @@ [datomish.test-macros :refer [deftest-async deftest-db]] [clojure.test :as t :refer [is are deftest testing]] [clojure.core.async :refer [go !]]]) - #?@(:cljs [[datomish.promise-sqlite] + #?@(:cljs [[datomish.js-sqlite] [datomish.pair-chan] [datomish.test-macros :refer-macros [deftest-async deftest-db]] [datomish.node-tempfile :refer [tempfile]]