README
Better Sqlite 3
Installation
npm install --save rescript-types-better-sqlite-3
Summary
This package contains rescript type definitions for better-sqlite3.
The fastest and simplest library for SQLite in Node.js.
- Full transaction support
- High performance, efficiency, and safety
- Easy-to-use synchronous API (better concurrency than an asynchronous API... yes, you read that correctly)
- Support for user-defined functions, aggregates, virtual tables, and extensions
- 64-bit integers (invisible until you need them)
- Worker thread support (for large/slow queries)
Usage
open BetterSqlite3
let db = Database.make("foobar.db")
let resultExample = {
id: 0,
name: "",
email: "",
}
let row = db->Database.prepare("SELECT * FROM users WHERE id = ?", resultExample)->Statement.get(userId)
Console.log(row)
Details
Files were exported from https://codeberg.org/lil5/rescript-reasonably-typed/src/branch/main/types/better-sqlite-3.