-
Notifications
You must be signed in to change notification settings - Fork 11
/
README.md.tmpl
33 lines (21 loc) · 1.43 KB
/
README.md.tmpl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
<!--- Generated with the deno_generate_package.sh script, don't edit by hand! -->
# `x/sqlite_http` Deno Module
[![Tags](https://img.shields.io/github/release/asg017/sqlite-http)](https://github.com/asg017/sqlite-http/releases)
[![Doc](https://doc.deno.land/badge.svg)](https://doc.deno.land/https/deno.land/x/sqlite-http@${VERSION}/mod.ts)
The [`sqlite-http`](https://github.com/asg017/sqlite-http) SQLite extension is available to Deno developers with the [`x/sqlite_http`](https://deno.land/x/sqlite-http) Deno module. It works with [`x/sqlite3`](https://deno.land/x/sqlite3), the fastest and native Deno SQLite3 module.
```js
import { Database } from "https://deno.land/x/sqlite3@0.8.0/mod.ts";
import * as sqlite_http from "https://deno.land/x/sqlite_http@v${VERSION}/mod.ts";
const db = new Database(":memory:");
db.enableLoadExtension = true;
sqlite_http.load(db);
const [version] = db
.prepare("select http_version()")
.value<[string]>()!;
console.log(version);
```
Like `x/sqlite3`, `x/sqlite_http` requires network and filesystem permissions to download and cache the pre-compiled SQLite extension for your machine. Though `x/sqlite3` already requires `--allow-ffi` and `--unstable`, so you might as well use `--allow-all`/`-A`.
```bash
deno run -A --unstable <file>
```
`x/sqlite_http` does not work with [`x/sqlite`](https://deno.land/x/sqlite@v3.7.0), which is a WASM-based Deno SQLite module that does not support loading extensions.