Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

prepare function doesn't throw an error for invalid SQL #108

Open
wsporto opened this issue May 2, 2024 · 0 comments
Open

prepare function doesn't throw an error for invalid SQL #108

wsporto opened this issue May 2, 2024 · 0 comments
Labels
api compat bug Something isn't working help wanted Extra attention is needed

Comments

@wsporto
Copy link

wsporto commented May 2, 2024

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.

@penberg penberg added bug Something isn't working help wanted Extra attention is needed api compat labels Jun 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api compat bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants