mirror of
https://github.com/sqlitebrowser/sqlitebrowser.git
synced 2026-05-15 00:09:58 -05:00
Fix #2583: quote identifiers, not expressions
94023a5 switched to storing OrderBy terms by column
name and/or expression instead of by column index, and
includes a test to ensure that identifiers are quoted
and raw expressions are not; unfortunately it seems to
have gotten the logic backwards.
This commit is contained in:
+2
-2
@@ -32,9 +32,9 @@ struct OrderBy
|
||||
std::string toSql() const
|
||||
{
|
||||
if(is_expression)
|
||||
return sqlb::escapeIdentifier(expr) + (direction == Ascending ? " ASC" : " DESC");
|
||||
else
|
||||
return expr + (direction == Ascending ? " ASC" : " DESC");
|
||||
else
|
||||
return sqlb::escapeIdentifier(expr) + (direction == Ascending ? " ASC" : " DESC");
|
||||
}
|
||||
|
||||
std::string expr;
|
||||
|
||||
Reference in New Issue
Block a user