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

move copy/pasted where() / orWhere() to WhereTrait #116

Merged
merged 1 commit into from
Jan 2, 2017
Merged

move copy/pasted where() / orWhere() to WhereTrait #116

merged 1 commit into from
Jan 2, 2017

Conversation

pavarnos
Copy link
Contributor

@pavarnos pavarnos commented Jan 1, 2017

could do similar for LimitInterface, LimitOffsetInterface and ValuesInterface.

@harikt
Copy link
Member

harikt commented Jan 2, 2017

@pavarnos I have a question here.

Do we really need trait or can we just add these methods to AbstractQuery class ?

@pavarnos
Copy link
Contributor Author

pavarnos commented Jan 2, 2017

Could do. But where() / orWhere() is not used by Insert so the methods do not make any sense on that class. So then we'd need to have some way to hide them from the public interface of the Insert class?
Similarly with limit/offset.
ValuesInterface is used by Insert and Update (and potentially by Select) but not by Delete. So there is no obvious hierarchy.

Its just an idea. Delete the PR if you think it is going in the wrong direction.

@harikt
Copy link
Member

harikt commented Jan 2, 2017

Sorry I didn't thought more about that :) .

@harikt harikt merged commit 8b4f6e2 into auraphp:3.x Jan 2, 2017
@pavarnos pavarnos deleted the wheretrait branch January 2, 2017 19:50
@pavarnos
Copy link
Contributor Author

pavarnos commented Jan 2, 2017

could also do similar for ReturningInterface, which is only used by pgsql... but yeah, how far should we go?

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