datacamp / sqlwhat

https://sqlwhat.readthedocs.io
GNU Affero General Public License v3.0
3 stars 8 forks source link

Implement basic messaging system #34

Closed machow closed 7 years ago

machow commented 7 years ago
machow commented 7 years ago

Note, there is a working implementation on

https://github.com/datacamp/sqlwhat/tree/feature-speaker

machow commented 7 years ago

The current messaging works by reporting a name for whatever node you're looking at. E.g.

"Check your SELECT statement"

This means that when you get the WHERE field of a SELECT statement, it will report whatever node is in that field. For example in

SELECT id FROM b WHERE id < 10, it will say something like...

"Check the binary expression <".

Let me know if this isn't ideal, since an alternative is that it would say the field you are checking, rather than the node it contains.

"Check the WHERE clause of your SELECT statement."

filipsch commented 7 years ago

cc @colinricardo cc @ncarchedi

colinricardo commented 7 years ago

@machow I think saying the field rather than the node is a bit easier for students. Can they be combined? e.g. "Check the binary expression < in the WHERE clause of your SELECT statement?"

machow commented 7 years ago

Can they be combined?

Yes! That's a great suggestion--I was trying to keep it as simple as possible, but that seems like the most useful default.