-
Notifications
You must be signed in to change notification settings - Fork 479
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
SQLite incorrect DDL handling #1085
Comments
Proposal for fixing the DDL creation of SQLite : Sildra@087f382 The following commit has a perfect matching between DDL creation and SQLite. |
I admit I don't understand what does the linked commit change: according to SQLite docs all these types map to |
Because SOCI is performing affinity check based on the description of the column and for SQLite it is based on the name of the type. In every test, columns are not created using the DDL soci/src/backends/sqlite3/statement.cpp Lines 412 to 465 in 2e4b44b
Then when you get the data with the get, as a developer, I am expected to do The current correct way to retrieve the data is With the change, it is possible to do |
Resolved by #1120 |
Mapping all of the types to integer will result in type narrowing while retrieving all of the data. Two solutions here: either integer is mapped to int64 or we distinguish types in the create_column.
In the second case, integer primary key also needs to be handled separately.
Originally posted by @Sildra in #954 (comment)
This issue also contradicts the documentation :
https://github.com/SOCI/soci/blob/master/docs/backends/sqlite3.md#dynamic-binding
The text was updated successfully, but these errors were encountered: