prepare function doesn't throw an error for invalid SQL
wsporto opened this issue · comments
wsporto commented
Example:
import Database from "libsql";
const opts = {
authToken: process.env.TURSO_AUTH_TOKEN || ''
} as any;
const db = new Database(process.env.TURSO_DATABASE_URL || '', opts)
console.log(db.prepare('select invalidcolumn')); //doesn't throw error;
console.log(db.prepare('select * as')); //throw error
Using the 'better-sqlite' driver it throws an error in both situations.