neumino / reqlite

Reqlite - RethinkDB in JavaScript
MIT License
338 stars 25 forks source link

Wrong error message when r.desc used incorrectly #75

Open simonratner opened 8 years ago

simonratner commented 8 years ago

Query:

r.db(...).table(...).between(1, 10, {index: r.desc('foo')})

Expected error: DESC may only be used as an argument to ORDER_BY Actual error: Cannot order by indexfooafter calling BETWEEN on indexid``

Note that index id isn't even specified, looks like it is not recognising r.desc and just using default index.