src-d / engine-deprecated

[DISCONTINUED] Go to https://github.com/src-d/sourced-ce/
https://docs.sourced.tech/engine
Apache License 2.0
217 stars 26 forks source link

Include link to SQL Querying Examples & Syntax Reference #157

Open ricardobaeta opened 5 years ago

ricardobaeta commented 5 years ago

I would be pretty happy if a SQL Query Examples URL could be included on the cli output when running srcd sql --help. It would look something like:

Run a SQL query over the analyzed repositories.

Examples:
  https://docs.sourced.tech/gitbase/using-gitbase/examples

Usage:
  srcd sql [flags]

Flags:
  -h, --help   help for sql

Global Flags:
      --config string   config file (default is $HOME/.srcd.yaml)
  -v, --verbose         if true, log all of the things

We have this reference pretty visible on the web sql and I believe that being on the cli shouldn't degrade this specific usability detail

Moreover, I think it would be great to have some feedforward on SQL Syntax errors, like:

rpc error: code = Unknown desc = SQL query failed: Error 1105: unknown error: syntax error at position 10
SQL Syntax Reference https://sql.syntax.reference/
ajnavarro commented 5 years ago

@smola shall we move this issue to engine?

smola commented 5 years ago

@ajnavarro Transferred.

cc @campoy