Appearance
SQLite
Node.js 内置模块 SQLite 处于实验阶段,不保证稳定。
import { DatabaseSync } from 'node:sqlite';
const db = new DatabaseSync('C:/demo/test.db');
const findById = db.prepare('SELECT * FROM book WHERE id = ?');
const record = findById.get(1);
console.log(record);ExperimentalWarning: SQLite is an experimental feature and might change at any time
(Use `node --trace-warnings ...` to show where the warning was created)