You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Using select distinct with a return struct generates a statement that includes parenthesis around the columns, resulting in an error. Without distinct, there are no extra parenthesis generated.
Example:
struct User
{
uint32_t id;
std::string name;
};
constexpr auto userStruct = sqlite_orm::struct_<User>(&User::id, &User::name);
auto const selectDistinct = sqlite_orm::distinct(userStruct);
auto statement = sqlite_orm::select(selectDistinct);
auto str = storage->dump(statement);
Resulting SQLite statement: SELECT DISTINCT(("Users"."id", "Users"."name")) FROM "Users"
Error: row value misused: SQL logic error
Without distinct: SELECT "User"."id", "User"."name" FROM "Users"
The text was updated successfully, but these errors were encountered:
Using select
distinct
with a return struct generates a statement that includes parenthesis around the columns, resulting in an error. Withoutdistinct
, there are no extra parenthesis generated.Example:
Resulting SQLite statement:
SELECT DISTINCT(("Users"."id", "Users"."name")) FROM "Users"
Error:
row value misused: SQL logic error
Without
distinct
:SELECT "User"."id", "User"."name" FROM "Users"
The text was updated successfully, but these errors were encountered: