Skip to content

Enhance TableSourceCollector to include query and referenced columns #63

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

mk3008
Copy link
Owner

@mk3008 mk3008 commented Apr 26, 2025

Add query and referenced columns to TableSourceCollector.

  • src/transformers/TableSourceCollector.ts

    • Import SelectableColumnCollector.
    • Collect referenced columns using SelectableColumnCollector.
    • Add the query and referenced columns to the table source in visitTableSource method.
  • tests/transformers/TableSourceCollector.test.ts

    • Add test case to verify that the TableSourceCollector includes the query the table belongs to in the return value.
    • Add test case to verify that the TableSourceCollector includes the list of column names referenced from the table in the return value.
    • Add test case to handle wildcard columns correctly.

For more details, open the Copilot Workspace session.

Add query and referenced columns to TableSourceCollector.

* **src/transformers/TableSourceCollector.ts**
  - Import `SelectableColumnCollector`.
  - Collect referenced columns using `SelectableColumnCollector`.
  - Add the query and referenced columns to the table source in `visitTableSource` method.

* **tests/transformers/TableSourceCollector.test.ts**
  - Add test case to verify that the `TableSourceCollector` includes the query the table belongs to in the return value.
  - Add test case to verify that the `TableSourceCollector` includes the list of column names referenced from the table in the return value.
  - Add test case to handle wildcard columns correctly.

---

For more details, open the [Copilot Workspace session](https://copilot-workspace.githubnext.com/mk3008/rawsql-ts?shareId=XXXX-XXXX-XXXX-XXXX).
Base automatically changed from add-column-aliases to main April 27, 2025 22:47
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.

1 participant