Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Update Predicate.php #5775

Closed
wants to merge 1 commit into from

4 participants

@mannecheema

I have added a notLike predicate in file so you can use is on sql query

@mannecheema mannecheema Update Predicate.php
I have added a notLike predicate in file so you can use is on sql query
d5c50ba
@Ocramius
Collaborator

please add tests and fix the coding style (must follow psr-2)

@samsonasik samsonasik commented on the diff
library/Zend/Db/Sql/Predicate/Predicate.php
@@ -216,7 +216,20 @@ public function like($identifier, $like)
return $this;
}
-
+ /**
+ * Create "notLike" predicate
+ *
+ * Utilizes In predicate
+ *
+ * @param string $identifier
+ * @param string $notLike
+ * @return Predicate

@return self

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@ralphschindler ralphschindler added the Db label
@ralphschindler ralphschindler added this to the 2.2.6 milestone
@ralphschindler ralphschindler self-assigned this
@ralphschindler ralphschindler closed this pull request from a commit
@ralphschindler ralphschindler Closes #5775
Merge branch 'hotfix/5775'

* hotfix/5775:
  Added unit tests for Zend\Db\Sql's Predicate factory for notLike() CS Fixes
  Update Predicate.php
53c4d2f
@ralphschindler ralphschindler referenced this pull request from a commit
@ralphschindler ralphschindler Forward #5775
Merge branch 'hotfix/5775' into develop

* hotfix/5775:
  Added unit tests for Zend\Db\Sql's Predicate factory for notLike() CS Fixes
  Update Predicate.php
4b33869
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Feb 2, 2014
  1. @mannecheema

    Update Predicate.php

    mannecheema authored
    I have added a notLike predicate in file so you can use is on sql query
This page is out of date. Refresh to see the latest.
Showing with 14 additions and 1 deletion.
  1. +14 −1 library/Zend/Db/Sql/Predicate/Predicate.php
View
15 library/Zend/Db/Sql/Predicate/Predicate.php
@@ -216,7 +216,20 @@ public function like($identifier, $like)
return $this;
}
-
+ /**
+ * Create "notLike" predicate
+ *
+ * Utilizes In predicate
+ *
+ * @param string $identifier
+ * @param string $notLike
+ * @return Predicate

@return self

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
+ */
+ public function notLike( $identifier, $notLike ) {
+ $this->addPredicate( new NotLike( $identifier, $notLike ), ($this->nextPredicateCombineOperator) ? : $this->defaultCombination );
+ $this->nextPredicateCombineOperator = null;
+ return $this;
+ }
/**
* Create an expression, with parameter placeholders
*
Something went wrong with that request. Please try again.