README
This commit is contained in:
parent
eb4f25f5c5
commit
efab1e28a4
4 changed files with 7 additions and 6 deletions
|
|
@ -9,7 +9,7 @@ $ cargo build --release
|
||||||
## Run
|
## Run
|
||||||
|
|
||||||
```
|
```
|
||||||
(babashka.pods/load-pod "examples/pods/pod-babashka-filewatcher/target/release/pod-babashka-filewatcher")
|
(babashka.pods/load-pod "target/release/pod-babashka-filewatcher")
|
||||||
(def chan (pod.babashka.filewatcher/watch "/tmp"))
|
(def chan (pod.babashka.filewatcher/watch "/tmp"))
|
||||||
(require '[clojure.core.async :as async])
|
(require '[clojure.core.async :as async])
|
||||||
(loop [] (prn (async/<!! chan)) (recur))
|
(loop [] (prn (async/<!! chan)) (recur))
|
||||||
|
|
|
||||||
|
|
@ -7,6 +7,7 @@ Run `./compile`
|
||||||
## Run
|
## Run
|
||||||
|
|
||||||
``` clojure
|
``` clojure
|
||||||
(babashka.pods/load-pod "examples/pods/pod-babashka-hsqldb/pod-babashka-hsqldb")
|
(babashka.pods/load-pod "./pod-babashka-hsqldb")
|
||||||
(pod.hsqldb/execute! "jdbc:hsqldb:mem:testdb;sql.syntax_mys=true" ["create table foo ( foo int );"])'
|
(pod.babashka.hsqldb/execute! "jdbc:hsqldb:mem:testdb;sql.syntax_mys=true" ["create table foo ( foo int );"])'
|
||||||
|
;;=> [#:next.jdbc{:update-count 0}]
|
||||||
```
|
```
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@
|
||||||
(def stdin (PushbackInputStream. System/in))
|
(def stdin (PushbackInputStream. System/in))
|
||||||
|
|
||||||
(def lookup
|
(def lookup
|
||||||
{'pod.hsqldb/execute! jdbc/execute!})
|
{'pod.babashka.hsqldb/execute! jdbc/execute!})
|
||||||
|
|
||||||
(defn write [v]
|
(defn write [v]
|
||||||
(bencode/write-bencode System/out v)
|
(bencode/write-bencode System/out v)
|
||||||
|
|
@ -32,7 +32,7 @@
|
||||||
op (keyword op)]
|
op (keyword op)]
|
||||||
(case op
|
(case op
|
||||||
:describe (do (write {"format" "edn"
|
:describe (do (write {"format" "edn"
|
||||||
"namespaces" [{"name" "pod.hsqldb"
|
"namespaces" [{"name" "pod.babashka.hsqldb"
|
||||||
"vars" [{"name" "execute!"}]}]})
|
"vars" [{"name" "execute!"}]}]})
|
||||||
(recur))
|
(recur))
|
||||||
:invoke (let [var (-> (get message "var")
|
:invoke (let [var (-> (get message "var")
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,7 @@ To run this:
|
||||||
Then run as pod:
|
Then run as pod:
|
||||||
|
|
||||||
``` clojure
|
``` clojure
|
||||||
(babashka.pods/load-pod ["examples/pods/pod-lispyclouds-sqlite/pod-lispyclouds-sqlite.py"])
|
(babashka.pods/load-pod ["./pod-lispyclouds-sqlite.py"])
|
||||||
(require '[pod.lispy-clouds.sqlite :as sqlite])
|
(require '[pod.lispy-clouds.sqlite :as sqlite])
|
||||||
(sqlite/execute! "create table if not exists foo ( int foo )")
|
(sqlite/execute! "create table if not exists foo ( int foo )")
|
||||||
(sqlite/execute! "delete from foo")
|
(sqlite/execute! "delete from foo")
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue