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

near "?": syntax error in "INSERT INTO "users" (?) VALUES (?)" #1289

Open
meili19916 opened this issue Dec 2, 2024 · 4 comments
Open

near "?": syntax error in "INSERT INTO "users" (?) VALUES (?)" #1289

meili19916 opened this issue Dec 2, 2024 · 4 comments

Comments

@meili19916
Copy link

When I run the demo to insert a email,it failed with error "near "?": syntax error in "INSERT INTO "users" (?) VALUES (?)"";
Xcode 16.1
iphone os 17.3.1
pod 'SQLite.swift', '~> 0.14.0'

@soognarf
Copy link

soognarf commented Jan 16, 2025

i hav the same problem and this was tricky. Expression from swift will have Expression(value:VARX) and SQLite Expression will have Expression(VARX)
i have first my code changed from swift 15 to swift 16 and have added value: to the function.
then i have added for SQLite the prefix SQLIte. so was my code SQLite.Expression(value:VARX).
this gives no error on compile but the SQLite function read only unnamed parameters and so hi has not initalized the name of my column. that gives exact the same output like yours.
the right version is : SQLite.Expression(VARX)

@bradleyboyd
Copy link

I have the same issue. Did you have to revert to Xcode 15 to resolve it?

@soognarf
Copy link

soognarf commented Feb 3, 2025

no, i am on Xcode 16

@bradleyboyd
Copy link

Oh, I get it now. You changed 'Expression(VARX)' to 'SQLite.Expression(VARX)'. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants