sqlite-parser
sqlite-parser copied to clipboard
Get full text of expression
In a select statement, reconstituting any expression that isn't aliased must take some recursion to drill down and glue it back together. Up at the statement[i].result[i] level, would it be too much to ask to see the full expression here?
For example, in this query:
select
first_name || ' ' || last_name,
grade_level
from
students
I'd love to see this as the return:
{
"statement": [
{
"result": [
{
"type": "expression",
**"fullText": "first_name || ' ' || last_name",**
"left": "etc"
"right": "etc"
},
{
"type": "column",
"name": "grade_level"
}
]
}
]
}
If #23 gets done, you might be able pass the expression to the query generator in order to get the whole expression as a string.
Ooh, definitely. I like that.