all repos — litestore @ 15d78a7f9b4d5f077683814da05554c61feecbea

A minimalist nosql document store.

Fixed problem with sorting.
h3rald h3rald@h3rald.com
Sun, 04 Mar 2018 21:42:52 +0000
commit

15d78a7f9b4d5f077683814da05554c61feecbea

parent

993e0731828efe3a2a4f04d6a2d05641fcad2263

1 files changed, 3 insertions(+), 1 deletions(-)

jump to
M lib/api_v3.nimlib/api_v3.nim

@@ -42,7 +42,9 @@ """

for f in fragments: var matches = @["", ""] if f.find(clause, matches) != -1: - let field = "json_extract(documents.data, '$1')" % matches[1] + var field = matches[1] + if field[0] == '$': + field = "json_extract(documents.data, '$1')" % matches[1] if matches[0] == "-": clauses.add("$1 DESC" % field) else: