PHP Class Nextras\Orm\Mapper\Dbal\QueryBuilderHelper

Inheritance: extends Nette\Object
Mostra file Open project: nextras/orm Class Usage Examples

Public Methods

Method Description
__construct ( Nextras\Orm\Model\IModel $model, DbalMapper $mapper )
getAlias ( $name )
processOrderByExpression ( string $expression, string $direction, Nextras\Dbal\QueryBuilder\QueryBuilder $builder ) Transforms orm order by expression and adds it to QueryBuilder.
processWhereExpression ( string $expression, mixed $value, Nextras\Dbal\QueryBuilder\QueryBuilder $builder, boolean &$distinctNeeded ) Transforms orm condition and adds it to QueryBuilder.

Protected Methods

Method Description
getSqlOperator ( mixed $value, string $operator ) : string

Private Methods

Method Description
normalizeAndAddJoins ( array $levels, $sourceEntity, Nextras\Dbal\QueryBuilder\QueryBuilder $builder, &$distinctNeeded = false, &$value = null, &$modifier = '%any' )
processColumn ( Nextras\Orm\Mapper\Dbal\StorageReflection\IStorageReflection $sourceReflection, $column, $value, $sourceAlias )
processMultiColumn ( Nextras\Orm\Mapper\Dbal\StorageReflection\IStorageReflection $sourceReflection, array $primaryKey, $value, $sourceAlias )

Method Details

__construct() public method

public __construct ( Nextras\Orm\Model\IModel $model, DbalMapper $mapper )
$model Nextras\Orm\Model\IModel
$mapper DbalMapper

getAlias() public static method

public static getAlias ( $name )

getSqlOperator() protected method

protected getSqlOperator ( mixed $value, string $operator ) : string
$value mixed
$operator string
return string

processOrderByExpression() public method

Transforms orm order by expression and adds it to QueryBuilder.
public processOrderByExpression ( string $expression, string $direction, Nextras\Dbal\QueryBuilder\QueryBuilder $builder )
$expression string
$direction string
$builder Nextras\Dbal\QueryBuilder\QueryBuilder

processWhereExpression() public method

Transforms orm condition and adds it to QueryBuilder.
public processWhereExpression ( string $expression, mixed $value, Nextras\Dbal\QueryBuilder\QueryBuilder $builder, boolean &$distinctNeeded )
$expression string
$value mixed
$builder Nextras\Dbal\QueryBuilder\QueryBuilder
$distinctNeeded boolean