any-sqlite
TypeScript icon, indicating that this package has built-in type declarations

1.0.4 • Public • Published

any-sqlite

react native or node sqlite with a common interface

import { open } from "any-sqlite";

async main() {
  const db = await open("yo.db")
  await db.execute("create table foo (bar, baz)")
  await db.execute("insert into foo (bar, baz) values (?, ?)", [1, 2])
  await db.batch([
        ["insert into foo (bar, baz) values (?, ?)", [1, 2]],
        ["insert into foo (bar, baz) values (?, ?)", [2, 3]]
    ])
  let rows = await db.execute("select * from foo")
}

Readme

Keywords

Package Sidebar

Install

npm i any-sqlite

Weekly Downloads

3

Version

1.0.4

License

MIT

Unpacked Size

20.9 kB

Total Files

43

Last publish

Collaborators

  • earonesty