Skip to content
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

feat: apply ModelTableExpr for SELECT query #975

Open
wants to merge 9 commits into
base: master
Choose a base branch
from

Conversation

JunNishimura
Copy link
Contributor

Overview

This PR fixes #968.

The ModelTableExpr method in the existing implementation simply overwrites the table name in the FROM clause, but not the table name used as the column name prefix in the SELECT clause (such as SELECT users.name). Therefore, the Insert, Update, and Delete processes were fine, but the Select process was not working as expected.

What's changed

1. add Table Parser

Extract table names and aliases from queries passed as arguments to ModelTableExpr method.

2. Update columns builder of select query

Consider the table name specified in ModelTableExpr when constructing columns in the SELECT clause.

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.

inconsistent behavior for ModelTableExpr (select <--> create/insert/update/delete)
1 participant