Fixed order by (case insensitive).
h3rald h3rald@h3rald.com
Tue, 21 Jan 2020 10:56:35 +0100
2 files changed,
4 insertions(+),
4 deletions(-)
M
src/litestorepkg/lib/api_v5.nim
→
src/litestorepkg/lib/api_v5.nim
@@ -46,9 +46,9 @@ var field = matches[1]
if field[0] == '$': field = "json_extract(documents.data, '$1')" % matches[1] if matches[0] == "-": - clauses.add("$1 DESC" % field) + clauses.add("$1 COLLATE NOCASE DESC" % field) else: - clauses.add("$1 ASC" % field) + clauses.add("$1 COLLATE NOCASE ASC" % field) return clauses.join(", ") proc selectClause*(str: string, options: var QueryOptions) =
M
src/litestorepkg/lib/api_v6.nim
→
src/litestorepkg/lib/api_v6.nim
@@ -47,9 +47,9 @@ var field = matches[1]
if field[0] == '$': field = "json_extract(documents.data, '$1')" % matches[1] if matches[0] == "-": - clauses.add("$1 DESC" % field) + clauses.add("$1 COLLATE NOCASE DESC" % field) else: - clauses.add("$1 ASC" % field) + clauses.add("$1 COLLATE NOCASE ASC" % field) return clauses.join(", ") proc selectClause*(str: string, options: var QueryOptions) =