all repos — litestore @ c98972343757898bb222cc45b44a97c21708b6e0

A minimalist nosql document store.

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

c98972343757898bb222cc45b44a97c21708b6e0

parent

ad5ed06ce89d8ee90a5d70b77ea9db1f740ed7e6

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) =