You could combine autocompletion with a doc panel that automatically updates to show the "quick reference" for the keyword you're currently typing.
You could combine autocompletion with a doc panel that automatically updates to show the "quick reference" for the keyword you're currently typing.
For SQL, it's a big challenge - you may type in 'SELECT', but your IDE still has no idea what relation(s) you're going to access, and so it can't reasonably autocomplete the possible fields you might want to use.
It's an interesting example of a language that was arguably designed for human readability in the small ('give me this from that cross-referenced with this other thing'), but in some sense became a weakness of sorts later on.
I've always thought that SQL's notion of readability was somewhere between superficial and disingenuous - you can read the query and it sounds like it ought to make sense, but there's so many occasions where you won't actually be able to understand why it isn't working unless you know how to translate in your head from the order in which the clauses are written, to the order in which they're carried out.
'from customers, orders select ...'
Would allow showing a whole bunch of columns, and you could quickly determine whether those tables had the information you're after, or not.
It might seem strange/lazy that the developer can explore the environment (schema) this way without 'knowing' what's out there, but in practice that's exactly what we all do with software development, web search, etc - we try things out and see what comes back, rather than knowing in the first place. Data development has a way to go, but I think things will improve..
i.e. - type:
'select city'
prompts with:
'city (table airports)'
'city (table populations)'
'city (table companies)'
And then, upon selection, you have a statement: 'select city from <selected-table>'.
There's a lot more here though. Worth pondering for a while I think.
Not that it really matters to someone who is already familiar with SQL, however.
In LINQ, you do "FROM x SELECT y". So the editor can help you autocomplete the y, since it knows the context.
In SQL, you do "SELECT y FROM x". Thus the editor cannot help you with y.