-
Notifications
You must be signed in to change notification settings - Fork 246
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Add description for quickly running/testing custom SQL statements #244
base: main
Are you sure you want to change the base?
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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a few questions and suggestions. I think the proposed structure makes sense and is much better to read.
@@ -13,37 +13,58 @@ In March 2015 we've also written a short paper outlining discussing some develop | |||
|
|||
**Note:** You can also find a detailed usage description [here](docs/basic-usage.md). | |||
|
|||
To use the SQL parser in your own projects you simply have to follow these few steps. | |||
|
|||
### 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` | |||
3. *(Optional, Recommended)* Run `make install` to copy the library to `/usr/local/lib/` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not yours, but I wouldn't consider it "recommended" to install the library. I would be rather surprised if somebody installs it system-wide.
@@ -13,37 +13,58 @@ In March 2015 we've also written a short paper outlining discussing some develop | |||
|
|||
**Note:** You can also find a detailed usage description [here](docs/basic-usage.md). | |||
|
|||
To use the SQL parser in your own projects you simply have to follow these few steps. | |||
|
|||
### Build and Test | |||
|
|||
1. Download the [latest release here](https://github.com/hyrise/sql-parser/releases) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -13,37 +13,58 @@ In March 2015 we've also written a short paper outlining discussing some develop | |||
|
|||
**Note:** You can also find a detailed usage description [here](docs/basic-usage.md). | |||
|
|||
To use the SQL parser in your own projects you simply have to follow these few steps. | |||
|
|||
### 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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the library USING make
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
.so
is linux-only. Just say "to create the library?
{ | ||
// Basic Usage Example | ||
|
||
const std::string query = "..."; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
parse_simple_statement
as the binary name? Any ideas?
} | ||
} | ||
``` | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Last line in README: HYRISE
> Hyrise
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.