mozilla / jx-sqlite

JSON query expressions using SQLite
Mozilla Public License 2.0
35 stars 19 forks source link

optimize _accumulate_nested by consuming SQL resultset in order #50

Open klahnakoski opened 7 years ago

klahnakoski commented 7 years ago

Here is a piece of frightening code I wrote:

rows = list(reversed(unwrap(result.data)))

Please change the logic in _accumulate_nested() to use these records in order, or have the database deliver them in reverse order.