Warning: mysql_connect(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. in /home/zurmoorg/public_html/z-header.php on line 8

Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in /home/zurmoorg/public_html/z-header.php on line 8

ModelDataProviderUtil Class Reference

Static Public Member Functions

static resolveSortAttributeColumnName (RedBeanModelAttributeToDataProviderAdapter $modelAttributeToDataProviderAdapter, RedBeanModelJoinTablesQueryAdapter $joinTablesAdapter, $onTableAliasName=null)
static resolveCanUseFromJoins ($onTableAliasName)
static resolveSortColumnNameString ($tableAliasName, $resolvedSortColumnName)
static resolveGroupByAttributeColumnName (RedBeanModelAttributeToDataProviderAdapter $modelAttributeToDataProviderAdapter, RedBeanModelJoinTablesQueryAdapter $joinTablesAdapter, $onTableAliasName=null)
static makeWhere ($modelClassName, array $metadata, $joinTablesAdapter, $onTableAliasName=null)

Static Protected Member Functions

static resolveConcatenation ($string)
static resolveGroupByColumnNameString ($tableAliasName, $resolvedSortColumnName)
static processMetadataClause ($modelClassName, $clausePosition, $clauseInformation, &$where, &$joinTablesAdapter, $onTableAliasName=null)
static resolveResolveSubqueryValue (Array $clauseInformation)
static processMetadataContainingRelatedModelDataClause ($modelClassName, $clausePosition, $clauseInformation, &$where, $joinTablesAdapter, $onTableAliasName=null)
static makeTableAliasAndColumnNamesForNonRelatedConcatedAttributes ($modelClassName, $concatedAttributeNames, $joinTablesAdapter, $onTableAliasName=null)
static addWherePartByClauseInformationForConcatedAttributes ($operatorType, $value, &$where, $whereKey, $tableAliasAndColumnNames)

Detailed Description

A helper class for assisting the data providers in building query parts for fetching data.

Definition at line 41 of file ModelDataProviderUtil.php.


Member Function Documentation

static resolveSortAttributeColumnName ( RedBeanModelAttributeToDataProviderAdapter modelAttributeToDataProviderAdapter,
RedBeanModelJoinTablesQueryAdapter joinTablesAdapter,
onTableAliasName = null 
) [static]

If the $onTableAliasName is used (not null): Special use of sort attribute resolution. If you are resolving a sort attribute against a relation then the joins must utilize a left join in the case of casting up. Does not support when the attribute is a relation itself as this expects any relation processing to be done before this is called.

Parameters:
RedBeanModelAttributeToDataProviderAdapter $modelAttributeToDataProviderAdapter
RedBeanModelJoinTablesQueryAdapter $joinTablesAdapter
null | string $onTableAliasName
Returns:
string
Exceptions:
NotSupportedException 

Definition at line 55 of file ModelDataProviderUtil.php.

static resolveConcatenation ( string  )  [static, protected]

Wraps a string by concat to be used in queries

Parameters:
string $string
Returns:
string

Definition at line 113 of file ModelDataProviderUtil.php.

static resolveCanUseFromJoins ( onTableAliasName  )  [static]
Parameters:
$onTableAliasName 
Returns:
bool

Definition at line 122 of file ModelDataProviderUtil.php.

static resolveSortColumnNameString ( tableAliasName,
resolvedSortColumnName 
) [static]
Parameters:
$tableAliasName 
$resolvedSortColumnName 
Returns:
string

Definition at line 137 of file ModelDataProviderUtil.php.

static resolveGroupByAttributeColumnName ( RedBeanModelAttributeToDataProviderAdapter modelAttributeToDataProviderAdapter,
RedBeanModelJoinTablesQueryAdapter joinTablesAdapter,
onTableAliasName = null 
) [static]

If the $onTableAliasName is used (not null): Special use of group by attribute resolution. If you are resolving a group by attribute against a relation then the joins must utilize a left join in the case of casting up. Does not support when the attribute is a relation itself as this expects any relation processing to be done before this is called.

Parameters:
RedBeanModelAttributeToDataProviderAdapter $modelAttributeToDataProviderAdapter
RedBeanModelJoinTablesQueryAdapter $joinTablesAdapter
null | string $onTableAliasName
Returns:
string
Exceptions:
NotSupportedException 

Definition at line 159 of file ModelDataProviderUtil.php.

static makeWhere ( modelClassName,
array $  metadata,
joinTablesAdapter,
onTableAliasName = null 
) [static]

Override from RedBeanModelDataProvider to support multiple where clauses for the same attribute and operatorTypes

Parameters:
$modelClassName 
array $metadata - array expected to have clauses and structure elements
$joinTablesAdapter 
null | string $onTableAliasName
Returns:
string

Definition at line 188 of file ModelDataProviderUtil.php.

static resolveGroupByColumnNameString ( tableAliasName,
resolvedSortColumnName 
) [static, protected]
Parameters:
$tableAliasName 
$resolvedSortColumnName 
Returns:
string

Definition at line 214 of file ModelDataProviderUtil.php.

static processMetadataClause ( modelClassName,
clausePosition,
clauseInformation,
&$  where,
&$  joinTablesAdapter,
onTableAliasName = null 
) [static, protected]
Parameters:
string $modelClassName
integer $clausePosition
array $clauseInformation
array $where
RedBeanModelJoinTablesQueryAdapter $joinTablesAdapter
null | string $onTableAliasName
Exceptions:
NotSupportedException 

Definition at line 233 of file ModelDataProviderUtil.php.

static processMetadataContainingRelatedModelDataClause ( modelClassName,
clausePosition,
clauseInformation,
&$  where,
joinTablesAdapter,
onTableAliasName = null 
) [static, protected]
Parameters:
string $modelClassName
integer $clausePosition
array $clauseInformation
array $where
RedBeanModelJoinTablesQueryAdapter $joinTablesAdapter
null | string $onTableAliasName

Definition at line 295 of file ModelDataProviderUtil.php.

static makeTableAliasAndColumnNamesForNonRelatedConcatedAttributes ( modelClassName,
concatedAttributeNames,
joinTablesAdapter,
onTableAliasName = null 
) [static, protected]
Parameters:
string $modelClassName
array $concatedAttributeNames
RedBeanModelJoinTablesQueryAdapter $joinTablesAdapter
null | string $onTableAliasName
Returns:
array

Definition at line 350 of file ModelDataProviderUtil.php.

static addWherePartByClauseInformationForConcatedAttributes ( operatorType,
value,
&$  where,
whereKey,
tableAliasAndColumnNames 
) [static, protected]

Add a sql string to the where array base on the $operatorType, $value and $tableAliasAndColumnNames concated together. How the sql string is built depends on if the value is a string or not.

Parameters:
string $operatorType
mixed $value
array $where
integer $whereKey
array $tableAliasAndColumnNames

Definition at line 383 of file ModelDataProviderUtil.php.


The documentation for this class was generated from the following file:
 All Data Structures Functions Variables
Generated on Fri Mar 22 07:11:00 2019

Warning: mysql_connect(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. in /home/zurmoorg/public_html/z-footer.php on line 8

Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in /home/zurmoorg/public_html/z-footer.php on line 8