You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Have made some programming around select.
It's a little bit complicated and column names is missing I think.
In order to make glusql competitive to JS, sqlite, PHP and more
I think something like the following is required
Some kind of Displayselected instead od Selected
The outermost SELECT could get this result.
But of course not for an INSERT .. SELECT ...
Column names
Simplified enums on cell values
A: Usage is: iter over colnames in order to display them in order
B: Usage on whole row is: 'simple' item for all column values
C: Usage on columns in a row
let cell = arow[colname.iter().position(|&x| x == "THECOLNAME")
Below is some pseudo Rust for data definitions
All is immutable
enum DisplayCell
{
Str {value:&str},
Int {value:i64},
Float {value:f64},
Empty, // null
Bool {value:&str} // 'true', 'false' or 1,0 for language independancy
}
struct DisplayRow
{
arow:Vec
}
Column names
This is right thing GlueSQL should have.
But at the same time, it is not related feature with execution layer.
Fetching column names can be simply done by handling parsed sql AST.
It would be good to add a new module in src/ to handle this kind of work.
Simplified enums on cell values
I'm not sure whether this simplified enums are required in this repo or not.
I think this issue is related to gluesql-js.
It has similar function convert.rs.
So, I think it's good to add "1. Column names" as a new issue, but not sure "2. Simplified enums on cell values" is the feature this gluesql core repository needs to have.
How do you think?
Have made some programming around select.
It's a little bit complicated and column names is missing I think.
In order to make glusql competitive to JS, sqlite, PHP and more
I think something like the following is required
Some kind of Displayselected instead od Selected
The outermost SELECT could get this result.
But of course not for an INSERT .. SELECT ...
A: Usage is: iter over colnames in order to display them in order
B: Usage on whole row is: 'simple' item for all column values
C: Usage on columns in a row
let cell = arow[colname.iter().position(|&x| x == "THECOLNAME")
Below is some pseudo Rust for data definitions
All is immutable
enum DisplayCell
{
Str {value:&str},
Int {value:i64},
Float {value:f64},
Empty, // null
Bool {value:&str} // 'true', 'false' or 1,0 for language independancy
}
struct DisplayRow
{
arow:Vec
}
struct Displayselected
{
headers:Vec<&str>,
rows:Vec
}
The text was updated successfully, but these errors were encountered: