Skip to content
This repository has been archived by the owner on Jan 8, 2020. It is now read-only.

Select::where should accept PredicateInterface #2919

Closed
wants to merge 1 commit into from
Closed

Select::where should accept PredicateInterface #2919

wants to merge 1 commit into from

Conversation

YonmaN
Copy link

@YonmaN YonmaN commented Nov 8, 2012

PredicateInterface can just be accepted "as-is" instead of requiring a single-key array...

PredicateInterface can just be accepted "as-is" instead of requiring a single-key array...
@tca3
Copy link
Contributor

tca3 commented Nov 8, 2012

Definitely a good idea.

@coolmic
Copy link
Contributor

coolmic commented Nov 8, 2012

You should change Sql\Update and Sql\Where too.

And the having() method .

@Slamdunk
Copy link
Contributor

Slamdunk commented Nov 9, 2012

Please provide tests for the feature

@ghost ghost assigned ralphschindler Nov 16, 2012
@ralphschindler
Copy link
Member

I suspect this also needs to be applied to having() as well

@ralphschindler
Copy link
Member

Your patch does not work, $pvalue is not defined.

@@ -239,6 +239,10 @@ public function where($predicate, $combination = Predicate\PredicateSet::OP_AND)
{
if ($predicate instanceof Where) {
$this->where = $predicate;
} elseif ($pvalue instanceof Predicate\PredicateInterface) {
Copy link
Contributor

Choose a reason for hiding this comment

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

I think $pvalue should be $predicate

@YonmaN YonmaN closed this Dec 23, 2012
@YonmaN
Copy link
Author

YonmaN commented Dec 23, 2012

I'll redo this and open up a new one

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

Successfully merging this pull request may close these issues.

6 participants