Add description for quickly running/testing custom SQL statements#244
Add description for quickly running/testing custom SQL statements#244
Conversation
Add a description for quickly running/testing custom SQL statements
|
I am not sure where to place this documentation:
1 makes sense, because compilation is also required and the code is referenced |
|
I was not even aware of the example binary. Can we find a better name? Repl? Console?
What documentation do you mean exactly? |
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 |
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.
The proposed change of the README. My question is how to integrate the change in the existing README. Maybe, It is better to separate the build and test process 1.-4. and then have the option to
or 2. try it out running |
Separate build and usage documentation
|
I separated the build and usage documentation. Please let me if you have further recommendations. |
Bouncner
left a comment
There was a problem hiding this comment.
Just a few questions and suggestions. I think the proposed structure makes sense and is much better to read.
|
|
||
| 1. Download the [latest release here](https://github.com/hyrise/sql-parser/releases) | ||
| 2. Compile the library `make` to create `libsqlparser.so` | ||
| 3. *(Optional, Recommended)* Run `make install` to copy the library to `/usr/local/lib/` |
There was a problem hiding this comment.
Not yours, but I wouldn't consider it "recommended" to install the library. I would be rather surprised if somebody installs it system-wide.
|
|
||
| ### Build and Test | ||
|
|
||
| 1. Download the [latest release here](https://github.com/hyrise/sql-parser/releases) |
| ### Build and Test | ||
|
|
||
| 1. Download the [latest release here](https://github.com/hyrise/sql-parser/releases) | ||
| 2. Compile the library `make` to create `libsqlparser.so` |
There was a problem hiding this comment.
the library USING make ?
There was a problem hiding this comment.
.so is linux-only. Just say "to create the library?
| { | ||
| // Basic Usage Example | ||
|
|
||
| const std::string query = "..."; |
There was a problem hiding this comment.
To annoy people, I would use auto-to-stick here. 🫣
|
|
||
| 5. The build `example` executable can be used to test/parse specific custom SQL statements: | ||
|
|
||
| Running, for example, `./example/example "SELECT * FROM test;"` produces: |
There was a problem hiding this comment.
parse_simple_statement as the binary name? Any ideas?
| } | ||
| } | ||
| ``` | ||
|
|
There was a problem hiding this comment.
Last line in README: HYRISE > Hyrise
|
Ping @klauck . :) |

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.