tastott / jsoql

A SQL-like language for querying JSON data
http://tastott.github.io/jsoql
3 stars 1 forks source link

Auto-complete property names! #51

Closed tastott closed 9 years ago

tastott commented 9 years ago

This is kind of a big deal. To auto-complete property names we'll need to:

  1. Parse the current query using a slightly different grammar that will:
    1. Tolerate things like missing commas
    2. Check that the FROM clause is fully formed
    3. Identify which scope the cursor is in
  2. If the FROM clause is fully-formed, go off and pre-read X items
  3. Build a list of all the unique property names (including nesting) that those items have
  4. Match the currently-typed word (if any) to these names and suggest completions, taking into account the current scope (e.g. is it a GROUPed query)