From b7d76b7b33890cbf9a7648cb2a429907b84d2ba7 Mon Sep 17 00:00:00 2001 From: boda <6238558+boda-sh@users.noreply.github.com> Date: Fri, 22 Nov 2024 02:59:16 +0000 Subject: [PATCH] Use jsr:@db/sqlite in runtime/tutorials/connecting_to_databases.md (#1177) --- runtime/tutorials/connecting_to_databases.md | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/runtime/tutorials/connecting_to_databases.md b/runtime/tutorials/connecting_to_databases.md index 328765765..11d09e1eb 100644 --- a/runtime/tutorials/connecting_to_databases.md +++ b/runtime/tutorials/connecting_to_databases.md @@ -113,14 +113,17 @@ There are two primary solutions to connect to SQLite in Deno: ### Connect to SQLite with the FFI Module -[sqlite3](https://deno.land/x/sqlite3) provides JavaScript bindings to the +[@db/sqlite](https://jsr.io/@db/sqlite) provides JavaScript bindings to the SQLite3 C API, using [Deno FFI](../reference/deno_namespace_apis.md#ffi). ```ts -import { Database } from "https://deno.land/x/sqlite3@LATEST_VERSION/mod.ts"; +import { Database } from "jsr:@db/sqlite@0.12"; const db = new Database("test.db"); +const [version] = db.prepare("select sqlite_version()").value<[string]>()!; +console.log(version); + db.close(); ```