Add case-insensitive ordering
This commit is contained in:
@@ -613,6 +613,18 @@ public static class CommonCSharpTests
|
||||
{
|
||||
Expect.equal(Query.OrderBy([Field.Named("n:Test")], Dialect.SQLite), " ORDER BY data->>'Test'",
|
||||
"Order By not constructed correctly for numeric field");
|
||||
}),
|
||||
TestCase("succeeds for PostgreSQL case-insensitive ordering", () =>
|
||||
{
|
||||
Expect.equal(Query.OrderBy([Field.Named("i:Test.Field DESC")], Dialect.PostgreSQL),
|
||||
" ORDER BY LOWER(data#>>'{Test,Field}') DESC",
|
||||
"Order By not constructed correctly for case-insensitive field");
|
||||
}),
|
||||
TestCase("succeeds for SQLite case-insensitive ordering", () =>
|
||||
{
|
||||
Expect.equal(Query.OrderBy([Field.Named("i:Test.Field ASC")], Dialect.SQLite),
|
||||
" ORDER BY data->>'Test'->>'Field' COLLATE NOCASE ASC",
|
||||
"Order By not constructed correctly for case-insensitive field");
|
||||
})
|
||||
])
|
||||
]);
|
||||
|
||||
Reference in New Issue
Block a user