Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
yii2
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
PSDI Army
yii2
Commits
ca4a12fd
Commit
ca4a12fd
authored
Nov 25, 2013
by
Qiang Xue
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1322 from pmoust/master
swapped docs and Exception to type InvalidParamException
parents
16739ec3
21014b40
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
3 deletions
+4
-3
QueryBuilder.php
extensions/sphinx/QueryBuilder.php
+3
-2
QueryBuilder.php
framework/yii/db/QueryBuilder.php
+1
-1
No files found.
extensions/sphinx/QueryBuilder.php
View file @
ca4a12fd
...
@@ -7,6 +7,7 @@
...
@@ -7,6 +7,7 @@
namespace
yii\sphinx
;
namespace
yii\sphinx
;
use
yii\base\InvalidParamException
;
use
yii\base\Object
;
use
yii\base\Object
;
use
yii\db\Exception
;
use
yii\db\Exception
;
use
yii\db\Expression
;
use
yii\db\Expression
;
...
@@ -760,12 +761,12 @@ class QueryBuilder extends Object
...
@@ -760,12 +761,12 @@ class QueryBuilder extends Object
* operator is `LIKE` or `OR LIKE` and empty if operator is `NOT LIKE` or `OR NOT LIKE`.
* operator is `LIKE` or `OR LIKE` and empty if operator is `NOT LIKE` or `OR NOT LIKE`.
* @param array $params the binding parameters to be populated
* @param array $params the binding parameters to be populated
* @return string the generated SQL expression
* @return string the generated SQL expression
* @throws Exception if wrong number of operands have been given.
* @throws
InvalidParam
Exception if wrong number of operands have been given.
*/
*/
public
function
buildLikeCondition
(
$indexes
,
$operator
,
$operands
,
&
$params
)
public
function
buildLikeCondition
(
$indexes
,
$operator
,
$operands
,
&
$params
)
{
{
if
(
!
isset
(
$operands
[
0
],
$operands
[
1
]))
{
if
(
!
isset
(
$operands
[
0
],
$operands
[
1
]))
{
throw
new
Exception
(
"Operator '
$operator
' requires two operands."
);
throw
new
InvalidParam
Exception
(
"Operator '
$operator
' requires two operands."
);
}
}
list
(
$column
,
$values
)
=
$operands
;
list
(
$column
,
$values
)
=
$operands
;
...
...
framework/yii/db/QueryBuilder.php
View file @
ca4a12fd
...
@@ -999,7 +999,7 @@ class QueryBuilder extends \yii\base\Object
...
@@ -999,7 +999,7 @@ class QueryBuilder extends \yii\base\Object
* operator is `LIKE` or `OR LIKE` and empty if operator is `NOT LIKE` or `OR NOT LIKE`.
* operator is `LIKE` or `OR LIKE` and empty if operator is `NOT LIKE` or `OR NOT LIKE`.
* @param array $params the binding parameters to be populated
* @param array $params the binding parameters to be populated
* @return string the generated SQL expression
* @return string the generated SQL expression
* @throws Exception if wrong number of operands have been given.
* @throws
InvalidParam
Exception if wrong number of operands have been given.
*/
*/
public
function
buildLikeCondition
(
$operator
,
$operands
,
&
$params
)
public
function
buildLikeCondition
(
$operator
,
$operands
,
&
$params
)
{
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment