-
Notifications
You must be signed in to change notification settings - Fork 156
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
get_sql() returns empty string #91
Comments
Is the exception thrown when you create or when you use the statement? Is the statement UTF-16 encoded? |
Maybe you can create a gist which shows the failing code? |
It occurs when I use the statement and it's utf-16 |
does this help |
SQLite converts UTF-16 statements anyway, so this should lead to less code duplication and access to the converted string in case an exception is thrown. Fixes SqliteModernCpp#91
Tip: Please share the "Share" URL and not the embed script of your gists in the future. This makes it easier to open it. Additionally you got the syntax for links backwards. |
@mtissington I updated your comment, but the link still doesn't work :-( |
@aminroosta Yes, the problem is, that when prepare fails (this happens in this case, because a query plan can't be produced for an invalid column) the query is only appended in the UTF-8 case(the source) |
@mtissington I updated your comment too, now your link works. |
Thanks - A little new to posting gists. |
SQLite converts UTF-16 statements anyway, so this should lead to less code duplication and access to the converted string in case an exception is thrown. Fixes #91
I'm creating and using a prepared statement auto ps = db << 'select field from mytable'; etc,
For testing I changed the field name to an incorrect value. An exception was correctly thrown. However get_sql() returned an empty string.
Am I missing something?
The text was updated successfully, but these errors were encountered: