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

add missing public methods to SelectInterface and related. #112

Merged
merged 4 commits into from
Feb 19, 2017
Merged

add missing public methods to SelectInterface and related. #112

merged 4 commits into from
Feb 19, 2017

Conversation

pavarnos
Copy link
Contributor

make reset() public and add isDistinct() to round out the interface.

* @return bool
*
*/
public function hasCols();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have a problem with this hasCols , it sounds like to check if there is a column value exists. But this looks like a check if the columns is empty or not.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes. i can see why it was added (so you can check if that part of the query is valid). What about adding hasCol($name_or_alias)?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am ok with that :) .

@harikt
Copy link
Member

harikt commented Jan 1, 2017

I will leave this to @pmjones for further review.

@pavarnos
Copy link
Contributor Author

pavarnos commented Jan 1, 2017

should we do UpdateInterface and InsertInterface here? The changes are mostly pretty simple (copying the declaration from the real class to the interface declaration). So they should be easy to review as one PR. What do you think?

@harikt
Copy link
Member

harikt commented Jan 1, 2017

I feel separate may help. The benefit is if something is likely not going to merge can be rejected other PR can get merged.

*/
public function hasCol($alias)
{
return isset($this->cols[$alias]) || array_search($alias, $this->cols) !== false;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we need to do a search? Doesn't the isset itself help us ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@pavarnos
Copy link
Contributor Author

pavarnos commented Jan 2, 2017

this is (hopefully) the last of the changes needed to fill out the *Interface classes.
I'd originally planned to do this as 2 separate PRs, but found that the changes for the second PR were so small it wasn't worth it So they are all together here.

@pmjones pmjones merged commit 716c2d9 into auraphp:3.x Feb 19, 2017
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.

3 participants