Skip to content

Column parsing and updated table parsing#89

Open
not-night-but wants to merge 11 commits intocoresql:mainfrom
not-night-but:feat/listing-outputs
Open

Column parsing and updated table parsing#89
not-night-but wants to merge 11 commits intocoresql:mainfrom
not-night-but:feat/listing-outputs

Conversation

@not-night-but
Copy link
Contributor

@not-night-but not-night-but commented Mar 5, 2026

This was implemented specifically for the ability to edit results in Beekeeper. It adds the ability to identify the selected columns in a select statement. It doesn't try to map or figure out what table the column actually comes from, we do that in Beekeeper (and I don't think that should be this library's responsibility). It simply lists out the top level comma separated columns defined in the select, their tables, schemas, and aliases (if any of those exist), and whether or not it is considered a wildcard (* or table.*).

Along with that, table parsing previously just added the first token after a FROM or JOIN keyword to the array as a string. This was an issue as, if a table was qualified by a schema, the schema would be the table in the array. Now we do a bit more parsing to possibly qualify those tables, as well as collect alias information. So now we output an object that includes the table name, schema, database, and alias if they are present.

On Beekeeper's end, this allows us to do some mapping between a query result and the data that is returned from identifier to allow for constructing update statements to edit based on results.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants