sqlite-lean

Sqlite3 bindings for lean4 (mirror)

  1. 1
  2. 2
  3. 3
  4. 4
  5. 5
  6. 6
  7. 7
  8. 8
  9. 9
  10. 10
  11. 11
  12. 12
  13. 13
  14. 14
import FFI

open IO

def double (f : Nat -> Nat) n := f (f n)
def inc := fun n => n + 1

def main : IO Unit := do
  let conn  Sqlite.connect "test.sqlite3"
  let a :=
    match  Sqlite.exec conn "select 1 + 1;" with
     | Sqlite.Result.error e => e
     | _ => "ok"
  println s!"Hello, {conn} {a}"