dyedgreen / deno-sqlite

Deno SQLite module
https://deno.land/x/sqlite
MIT License
409 stars 36 forks source link

Unable to use placeholders in `CREATE TABLE` query #173

Closed papiro closed 2 years ago

papiro commented 2 years ago

I would expect the following to create a table called "foos":

db.query("CREATE TABLE ? (bar, baz)", ["foos"])

It throws the error SqliteError: near "?": syntax error.

Ultimately I would like to also use placeholders for the column names. Is this not possible?

dyedgreen commented 2 years ago

SQLite unfortunately does not allow for placeholders as table names.