all repos — litestore @ c82bbb3d57f2fff05fdf8f10db798aa622a0c86c

A minimalist nosql document store.

Fixed order by (case insensitive).
h3rald h3rald@h3rald.com
Tue, 21 Jan 2020 10:56:35 +0100
commit

c82bbb3d57f2fff05fdf8f10db798aa622a0c86c

parent

4c5ac09be46163ac6b07d37fb133a652137db7b9

2 files changed, 4 insertions(+), 4 deletions(-)

jump to
M src/litestorepkg/lib/api_v5.nimsrc/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.nimsrc/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) =