Skip to content
This repository has been archived by the owner on Jul 15, 2021. It is now read-only.

Get full text of expression #40

Open
aplarsen opened this issue Nov 15, 2016 · 2 comments
Open

Get full text of expression #40

aplarsen opened this issue Nov 15, 2016 · 2 comments

Comments

@aplarsen
Copy link

aplarsen commented Nov 15, 2016

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"
				}
			]
		}
	]
}
@karlb
Copy link

karlb commented Jan 29, 2018

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.

@aplarsen
Copy link
Author

Ooh, definitely. I like that.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants