Elgg  Version 3.0
Public Member Functions | Public Attributes | List of all members
Elgg\Database\Clauses\ComparisonClause Class Reference

Utility class for building composite comparison expression. More...

Inheritance diagram for Elgg\Database\Clauses\ComparisonClause:
Elgg\Database\Clauses\Clause

Public Member Functions

 __construct ($x, $comparison, $y=null, $type=null, $case_sensitive=null)
 Constructor. More...
 
 prepare (QueryBuilder $qb, $table_alias=null)
 {Build an expression and/or apply it to an instance of query builder.
Parameters
QueryBuilder$qbQuery builder
string$table_aliasTable alias
Returns
CompositeExpression|null|string
} More...
 

Public Attributes

 $x
 
 $comparison
 
 $y
 
 $type
 
 $case_sensitive
 

Detailed Description

Utility class for building composite comparison expression.

Definition at line 11 of file ComparisonClause.php.

Constructor & Destructor Documentation

Elgg\Database\Clauses\ComparisonClause::__construct (   $x,
  $comparison,
  $y = null,
  $type = null,
  $case_sensitive = null 
)

Constructor.

Parameters
string$xComparison value (e.g. prefixed column name)
string$comparisonComparison operator
mixed$yValue to compare against
string$typeValue type for sanitization/casting
bool$case_sensitiveUse case sensitive comparison for strings

Definition at line 47 of file ComparisonClause.php.

Member Function Documentation

Elgg\Database\Clauses\ComparisonClause::prepare ( QueryBuilder  $qb,
  $table_alias = null 
)

{Build an expression and/or apply it to an instance of query builder.

Parameters
QueryBuilder$qbQuery builder
string$table_aliasTable alias
Returns
CompositeExpression|null|string
}

Exceptions

Implements Elgg\Database\Clauses\Clause.

Definition at line 60 of file ComparisonClause.php.

Member Data Documentation

Elgg\Database\Clauses\ComparisonClause::$case_sensitive

Definition at line 36 of file ComparisonClause.php.

Elgg\Database\Clauses\ComparisonClause::$comparison

Definition at line 21 of file ComparisonClause.php.

Elgg\Database\Clauses\ComparisonClause::$type

Definition at line 31 of file ComparisonClause.php.

Elgg\Database\Clauses\ComparisonClause::$x

Definition at line 16 of file ComparisonClause.php.

Elgg\Database\Clauses\ComparisonClause::$y

Definition at line 26 of file ComparisonClause.php.


The documentation for this class was generated from the following file: