Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -114,12 +114,12 @@ public function orX(...$x): ICompositeExpression {
* @param mixed|null $type one of the IQueryBuilder::PARAM_* constants
* required when comparing text fields for oci compatibility
*
* @return IQueryFunction
* @return string
*/
public function comparison($x, string $operator, $y, $type = null): IQueryFunction {
public function comparison($x, string $operator, $y, $type = null): string {
$x = $this->helper->quoteColumnName($x);
$y = $this->helper->quoteColumnName($y);
return new QueryFunction($this->expressionBuilder->comparison($x, $operator, $y));
return $this->expressionBuilder->comparison($x, $operator, $y);
}

/**
Expand All @@ -137,12 +137,12 @@ public function comparison($x, string $operator, $y, $type = null): IQueryFuncti
* @param mixed|null $type one of the IQueryBuilder::PARAM_* constants
* required when comparing text fields for oci compatibility
*
* @return IQueryFunction
* @return string
*/
public function eq($x, $y, $type = null): IQueryFunction {
public function eq($x, $y, $type = null): string {
$x = $this->helper->quoteColumnName($x);
$y = $this->helper->quoteColumnName($y);
return new QueryFunction($this->expressionBuilder->eq($x, $y));
return $this->expressionBuilder->eq($x, $y);
}

/**
Expand All @@ -159,12 +159,12 @@ public function eq($x, $y, $type = null): IQueryFunction {
* @param mixed|null $type one of the IQueryBuilder::PARAM_* constants
* required when comparing text fields for oci compatibility
*
* @return IQueryFunction
* @return string
*/
public function neq($x, $y, $type = null): IQueryFunction {
public function neq($x, $y, $type = null): string {
$x = $this->helper->quoteColumnName($x);
$y = $this->helper->quoteColumnName($y);
return new QueryFunction($this->expressionBuilder->neq($x, $y));
return $this->expressionBuilder->neq($x, $y);
}

/**
Expand All @@ -181,12 +181,12 @@ public function neq($x, $y, $type = null): IQueryFunction {
* @param mixed|null $type one of the IQueryBuilder::PARAM_* constants
* required when comparing text fields for oci compatibility
*
* @return IQueryFunction
* @return string
*/
public function lt($x, $y, $type = null): IQueryFunction {
public function lt($x, $y, $type = null): string {
$x = $this->helper->quoteColumnName($x);
$y = $this->helper->quoteColumnName($y);
return new QueryFunction($this->expressionBuilder->lt($x, $y));
return $this->expressionBuilder->lt($x, $y);
}

/**
Expand All @@ -203,12 +203,12 @@ public function lt($x, $y, $type = null): IQueryFunction {
* @param mixed|null $type one of the IQueryBuilder::PARAM_* constants
* required when comparing text fields for oci compatibility
*
* @return IQueryFunction
* @return string
*/
public function lte($x, $y, $type = null): IQueryFunction {
public function lte($x, $y, $type = null): string {
$x = $this->helper->quoteColumnName($x);
$y = $this->helper->quoteColumnName($y);
return new QueryFunction($this->expressionBuilder->lte($x, $y));
return $this->expressionBuilder->lte($x, $y);
}

/**
Expand All @@ -225,12 +225,12 @@ public function lte($x, $y, $type = null): IQueryFunction {
* @param mixed|null $type one of the IQueryBuilder::PARAM_* constants
* required when comparing text fields for oci compatibility
*
* @return IQueryFunction
* @return string
*/
public function gt($x, $y, $type = null): IQueryFunction {
public function gt($x, $y, $type = null): string {
$x = $this->helper->quoteColumnName($x);
$y = $this->helper->quoteColumnName($y);
return new QueryFunction($this->expressionBuilder->gt($x, $y));
return $this->expressionBuilder->gt($x, $y);
}

/**
Expand All @@ -247,36 +247,36 @@ public function gt($x, $y, $type = null): IQueryFunction {
* @param mixed|null $type one of the IQueryBuilder::PARAM_* constants
* required when comparing text fields for oci compatibility
*
* @return IQueryFunction
* @return string
*/
public function gte($x, $y, $type = null): IQueryFunction {
public function gte($x, $y, $type = null): string {
$x = $this->helper->quoteColumnName($x);
$y = $this->helper->quoteColumnName($y);
return new QueryFunction($this->expressionBuilder->gte($x, $y));
return $this->expressionBuilder->gte($x, $y);
}

/**
* Creates an IS NULL expression with the given arguments.
*
* @param string|ILiteral|IParameter|IQueryFunction $x The field in string format to be restricted by IS NULL.
*
* @return IQueryFunction
* @return string
*/
public function isNull($x): IQueryFunction {
public function isNull($x): string {
$x = $this->helper->quoteColumnName($x);
return new QueryFunction($this->expressionBuilder->isNull($x));
return $this->expressionBuilder->isNull($x);
}

/**
* Creates an IS NOT NULL expression with the given arguments.
*
* @param string|ILiteral|IParameter|IQueryFunction $x The field in string format to be restricted by IS NOT NULL.
*
* @return IQueryFunction
* @return string
*/
public function isNotNull($x): IQueryFunction {
public function isNotNull($x): string {
$x = $this->helper->quoteColumnName($x);
return new QueryFunction($this->expressionBuilder->isNotNull($x));
return $this->expressionBuilder->isNotNull($x);
}

/**
Expand All @@ -287,12 +287,12 @@ public function isNotNull($x): IQueryFunction {
* @param mixed|null $type one of the IQueryBuilder::PARAM_* constants
* required when comparing text fields for oci compatibility
*
* @return IQueryFunction
* @return string
*/
public function like($x, $y, $type = null): IQueryFunction {
public function like($x, $y, $type = null): string {
$x = $this->helper->quoteColumnName($x);
$y = $this->helper->quoteColumnName($y);
return new QueryFunction($this->expressionBuilder->like($x, $y));
return $this->expressionBuilder->like($x, $y);
}

/**
Expand All @@ -303,11 +303,11 @@ public function like($x, $y, $type = null): IQueryFunction {
* @param mixed|null $type one of the IQueryBuilder::PARAM_* constants
* required when comparing text fields for oci compatibility
*
* @return IQueryFunction
* @return string
* @since 9.0.0
*/
public function iLike($x, $y, $type = null): IQueryFunction {
return new QueryFunction($this->expressionBuilder->like($this->functionBuilder->lower($x), $this->functionBuilder->lower($y)));
public function iLike($x, $y, $type = null): string {
return $this->expressionBuilder->like($this->functionBuilder->lower($x), $this->functionBuilder->lower($y));
}

/**
Expand All @@ -318,12 +318,12 @@ public function iLike($x, $y, $type = null): IQueryFunction {
* @param mixed|null $type one of the IQueryBuilder::PARAM_* constants
* required when comparing text fields for oci compatibility
*
* @return IQueryFunction
* @return string
*/
public function notLike($x, $y, $type = null): IQueryFunction {
public function notLike($x, $y, $type = null): string {
$x = $this->helper->quoteColumnName($x);
$y = $this->helper->quoteColumnName($y);
return new QueryFunction($this->expressionBuilder->notLike($x, $y));
return $this->expressionBuilder->notLike($x, $y);
}

/**
Expand All @@ -334,12 +334,12 @@ public function notLike($x, $y, $type = null): IQueryFunction {
* @param mixed|null $type one of the IQueryBuilder::PARAM_* constants
* required when comparing text fields for oci compatibility
*
* @return IQueryFunction
* @return string
*/
public function in($x, $y, $type = null): IQueryFunction {
public function in($x, $y, $type = null): string {
$x = $this->helper->quoteColumnName($x);
$y = $this->helper->quoteColumnNames($y);
return new QueryFunction($this->expressionBuilder->in($x, $y));
return $this->expressionBuilder->in($x, $y);
}

/**
Expand All @@ -350,34 +350,34 @@ public function in($x, $y, $type = null): IQueryFunction {
* @param mixed|null $type one of the IQueryBuilder::PARAM_* constants
* required when comparing text fields for oci compatibility
*
* @return IQueryFunction
* @return string
*/
public function notIn($x, $y, $type = null): IQueryFunction {
public function notIn($x, $y, $type = null): string {
$x = $this->helper->quoteColumnName($x);
$y = $this->helper->quoteColumnNames($y);
return new QueryFunction($this->expressionBuilder->notIn($x, $y));
return $this->expressionBuilder->notIn($x, $y);
}

/**
* Creates a $x = '' statement, because Oracle needs a different check
*
* @param string|ILiteral|IParameter|IQueryFunction $x The field in string format to be inspected by the comparison.
* @return IQueryFunction
* @return string
* @since 13.0.0
*/
public function emptyString($x): IQueryFunction {
return new QueryFunction($this->eq($x, $this->literal('', IQueryBuilder::PARAM_STR)));
public function emptyString($x): string {
return $this->eq($x, $this->literal('', IQueryBuilder::PARAM_STR));
}

/**
* Creates a `$x <> ''` statement, because Oracle needs a different check
*
* @param string|ILiteral|IParameter|IQueryFunction $x The field in string format to be inspected by the comparison.
* @return IQueryFunction
* @return string
* @since 13.0.0
*/
public function nonEmptyString($x): IQueryFunction {
return new QueryFunction($this->neq($x, $this->literal('', IQueryBuilder::PARAM_STR)));
public function nonEmptyString($x): string {
return $this->neq($x, $this->literal('', IQueryBuilder::PARAM_STR));
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,10 @@ public function __construct(ConnectionAdapter $connection, IQueryBuilder $queryB
/**
* @inheritdoc
*/
public function iLike($x, $y, $type = null): IQueryFunction {
public function iLike($x, $y, $type = null): string {
$x = $this->helper->quoteColumnName($x);
$y = $this->helper->quoteColumnName($y);
return new QueryFunction($this->expressionBuilder->comparison($x, ' COLLATE ' . $this->collation . ' LIKE', $y));
return $this->expressionBuilder->comparison($x, ' COLLATE ' . $this->collation . ' LIKE', $y);
}

/**
Expand Down
Loading