Skip to content

Latest commit

 

History

History
20 lines (16 loc) · 672 Bytes

README.md

File metadata and controls

20 lines (16 loc) · 672 Bytes

pod-lispyclouds-sqlite

To run this:

  • Install python3 and sqlite3
  • Create a virtualenv: python3 -m venv ~/.virtualenvs/babashka
  • Switch to it: source ~/.virtualenvs/babashka/bin/activate
  • Run: pip install bcoding to install the bencode lib
  • Create a new db: sqlite3 /tmp/babashka.db "create table foo (foo int);"

Then run as pod:

(babashka.pods/load-pod ["./pod-lispyclouds-sqlite.py"])
(require '[pod.lispyclouds.sqlite :as sqlite])
(sqlite/execute! "create table if not exists foo ( int foo )")
(sqlite/execute! "delete from foo")
(sqlite/execute! "insert into foo values (1), (2)")
(sqlite/execute! "select * from foo") ;;=> ([1] [2])