Closed styczynski closed 2 years ago
Overall I'm speechless, this is great! (though I still encourage you to speak with us (making an issue/request for comments before making PR's 😛)
Anyways, I've glanced through the code, put some cosmetic comments. I'll read it more thoroughly soon, but this is probably ready to merge.
This PR adds the following features:
octosql/
code and utilities to make Octosql more third-party friendlyImportant notes:
Detailed description
In my opinion, which may be biased, it's much quicker to copy just one (saved elsewhere) string containing SQL query than copying the configuration file and that string together. This PR introduces custom
CREATE
statements:Where
[name]
is valid SQL identifier,[type]
is an SQL literal string containing type name of the data source and[options_specs]
is either empty or is of the form:Example usage:
Configuration keys can be nested if needed:
Please note: Nested values are supported, but arrays are not. The keys values are yet limited to SQL strings.
This is clean and expressive. The options notation was taken from SQLServer OPTION CLAUSE and entire syntax was based on CREATE SERVER
As the byproduct of that feature Octosql can now execute multiple queries in a single console command:
The other minor change was rewriting
app/app.go
into many files inoctosql/
which exports very simple API. This way the code is much cleaner and let's third party tools (like native bindings) use awesome Octosql features much easier.