hyrise / sql-parser

SQL Parser for C++. Building C++ object structure from SQL statements.
MIT License
733 stars 243 forks source link

Add description for quickly running/testing custom SQL statements #244

Open klauck opened 2 months ago

klauck commented 2 months ago

The possibility for quickly running/testing SQL statements with the parser is not documented in the README.

Some issues, such as #243, could, for example, described and tested with the command line executable ./example/example.

This pull request documents this feature.

klauck commented 2 months ago

I am not sure where to place this documentation:

  1. Under the example project (as is)
  2. As a separate feature

1 makes sense, because compilation is also required and the code is referenced 2 makes sense, because the executable can be used to test statements without having an own project

Bouncner commented 2 months ago

I was not even aware of the example binary. Can we find a better name? Repl? Console?

I am not sure where to place this documentation:

What documentation do you mean exactly?

dey4ss commented 2 months ago

Can we find a better name? Repl? Console?

It's not interactive, you just provide the query as CLI argument and it prints it. I guess the name comes from the fact that it's basically a code snippet that shows how to use the parser in an application – with the side effect of printing the statement. But I don't have a better idea for a name

klauck commented 2 months ago

I was not even aware of the example binary

Yeah, and it is a great possibility to try out the parser. This is why I would like to add a documentation of this feature in the README.

What documentation do you mean exactly?

The proposed change of the README. My question is how to integrate the change in the existing README. The current proposal is to put it as point 7. under "To use the SQL parser in your own projects you simply have to follow these few steps." I think this place is not a perfect fit.

Maybe, It is better to separate the build and test process 1.-4. and then have the option to

  1. Use it as a library

or 2. try it out running ./example/example

klauck commented 2 months ago

I separated the build and usage documentation. Please let me if you have further recommendations.