jjmalina / pyinfluxql

Unmaintained, please go to daq-tools/pyinfluxql
https://github.com/daq-tools/pyinfluxql
MIT License
10 stars 2 forks source link

Bugfix #9

Closed muriloventuroso closed 5 years ago

muriloventuroso commented 7 years ago

Fix error: "error parsing query: found ORDER, expected ;"

jjmalina commented 7 years ago

@muriloventuroso the change looks good to me but there are some failing tests because they expect the ORDER clause to come after LIMIT, can you just fix that up?

also just curious how you ran into this bug and what version of influxdb you ran against. I haven't maintained this library in quite some time. it tests against influxdb 0.9.4 and the latest version is now 1.2.2. so not sure if they changed anything major in the query grammar.

muriloventuroso commented 7 years ago

It is a standard SQL syntax and also adopted by InfluxDB. In the documentation we also have this instruction: SELECT_clause [INTO_clause] FROM_clause [WHERE_clause] [GROUP_BY_clause] [ORDER_BY_clause] LIMIT <N> I will make the adjustments in the tests and send again