Skip to content

Commit

Permalink
0.0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
DjDeveloperr committed Dec 15, 2021
1 parent c4dfb36 commit eb11fef
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 3 deletions.
30 changes: 28 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,37 @@
# deno_sqlite

Deno FFI bindings to SQLite3 C API.
Fast, native bindings to SQLite3 C API, using Deno FFI.

```ts
import { Database } from "https://deno.land/x/[email protected]/mod.ts";

const db = new Database("test.db");

const [version] = db.queryArray("select sqlite_version()")[0];
console.log(version);

db.close();
```

## Documentation

Check out the documentation
[here](https://doc.deno.land/https://deno.land/x/[email protected]/mod.ts).

## Native Library

By default, this module will look for existing SQLite3 dynamic library on your
path, which is `sqlite3.dll` on Windows, `libsqlite3.so` on Linux, and
`libsqlite3.dylib` on macOS. If the library you want to use is not on path, then
you can use the `DENO_SQLITE_PATH` environment variable. You will have to
install SQLite3 separately if it's not already installed, since it is not
bundled with this module.

## Related

- [x/sqlite](https://deno.land/x/sqlite), WASM based
- [deno_sqlite3](https://github.com/littledivy/deno_sqlite3), rustqlite bindings
- [deno_sqlite3](https://github.com/littledivy/deno_sqlite3), `rustqlite`
bindings

## License

Expand Down
2 changes: 1 addition & 1 deletion test/test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Database, SQLITE_VERSION } from "../mod.ts";
import { assertEquals } from "https://deno.land/std@0.115.0/testing/asserts.ts";
import { assertEquals } from "https://deno.land/std@0.117.0/testing/asserts.ts";

Deno.test("sqlite", async (t) => {
// Remove any existing test.db.
Expand Down

0 comments on commit eb11fef

Please sign in to comment.