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

Ways to create Join #6

Closed
augustoccesar opened this issue May 4, 2017 · 2 comments
Closed

Ways to create Join #6

augustoccesar opened this issue May 4, 2017 · 2 comments
Assignees
Milestone

Comments

@augustoccesar
Copy link
Owner

A Join should be created in one of the many ways:

new Join(Join.LEFT).table("user_profile{up}").on("{u}id", "{up}user_id");

new Join(Join.LEFT).table("user_profile{up}").on("{u}id = {up}user_id");

new Join(Join.INNER, "user_profile{up}", "{u}id", "{up}user_id" )

new Join(Join.INNER, "user_profile{up}", "{u}id = {up}user_id" )
@augustoccesar augustoccesar added this to the 2.0.0 milestone May 4, 2017
@augustoccesar augustoccesar self-assigned this May 4, 2017
@augustoccesar
Copy link
Owner Author

And SelectBuilder should contain methods to easy the way of creating joins like:

new SelectBuilder().innerJoin("user_profile{up}", "{u}id", "{up}user_id")
new SelectBuilder().leftJoin("user_profile{up}", "{u}id", "{up}user_id")
new SelectBuilder().rightJoin("user_profile{up}", "{u}id", "{up}user_id")
(...)

@augustoccesar
Copy link
Owner Author

Maybe Join should have a method for easy build like in SelectBuilder, like:

Join.innerJoin("user_profile{up}", "{u}id", "{up}user_id")

instead of having to instantiate a new Join object using new

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

No branches or pull requests

1 participant