Account Suspended
Account Suspended
This Account has been suspended.
Contact your hosting provider for more information.
 All Data Structures Functions Variables Pages
Public Member Functions | Protected Member Functions | Protected Attributes
ModelWhereAndJoinBuilder Class Reference
Inheritance diagram for ModelWhereAndJoinBuilder:
ModelJoinBuilder ReadOptimizationModelWhereAndJoinBuilder

Public Member Functions

 __construct (RedBeanModelAttributeToDataProviderAdapter $modelAttributeToDataProviderAdapter, RedBeanModelJoinTablesQueryAdapter $joinTablesAdapter, $setDistinct=false, $wherePartColumnModifierType=null)
 
 resolveJoinsAndBuildWhere ($operatorType, $value, &$clausePosition, &$where, $onTableAliasName=null, $resolveAsSubquery=false)
 
- Public Member Functions inherited from ModelJoinBuilder
 __construct (RedBeanModelAttributeToDataProviderAdapter $modelAttributeToDataProviderAdapter, RedBeanModelJoinTablesQueryAdapter $joinTablesAdapter, $setDistinct=false)
 
 getTableAliasNameForBaseModel ()
 
 getTableAliasNameForRelatedModel ()
 
 resolveJoins ($onTableAliasName=null, $canUseFromJoins=true)
 
 resolveOnlyAttributeJoins ($onTableAliasName=null, $canUseFromJoins=true)
 
 resolveOnTableAliasName ($onTableAliasName=null)
 

Protected Member Functions

 buildJoinAndWhereForRelatedAttribute ($operatorType, $value, $whereKey, &$where, $onTableAliasName=null, $resolveAsSubquery=false)
 
 resolveRelationAttributeTableAliasNameForResolveSubquery ($onTableAliasName, $resolveAsSubquery=false)
 
 resolveRelationAttributeTableAliasNameForResolveSubqueryAsTrue ($onTableAliasName)
 
 buildWhereForRelatedAttributeThatIsItselfAHasManyRelation ($onTableAliasName, $operatorType, $value, &$where, $whereKey)
 
 resolveJoinsForRelatedId ($onTableAliasName=null)
 
 addWherePartByClauseInformation ($operatorType, $value, &$where, $whereKey, $tableAliasName, $columnName)
 
 resolveWhereColumnContentForModifier ($tableAliasName, $columnName)
 
 resolveLeftJoinsForARelationAttribute ($onTableAliasName)
 
 resolveTimeZoneAdjustmentForACalculatedDateTimeModifier ()
 
- Protected Member Functions inherited from ModelJoinBuilder
 resolveJoinsForAttribute ($onTableAliasName, $canUseFromJoins=true)
 
 resolveJoinsForDerivedRelationViaCastedUpModel ($onTableAliasName, $canUseFromJoins=true)
 
 resolveJoinsForDerivedRelationViaCastedUpModelThatIsCastedUp ($onTableAliasName, $canUseFromJoins=true)
 
 resolveJoinsForDerivedRelationViaCastedUpModelThatIsManyToMany ($onTableAliasName)
 
 resolveJoinsForInferredRelation ($onTableAliasName, $canUseFromJoins=true)
 
 resolveJoinsForInferredRelationThatIsCastedUp ($onTableAliasName, $canUseFromJoins=true)
 
 resolveAttributeModelClassNameWithCastingHintForCastingDown ($attributeModelClassName)
 
 resolveJoinsForAttributeOnDifferentModel ($onTableAliasName, $canUseFromJoins=true)
 
 resolveJoinsForAttributeOnSameModelThatIsARelation ($onTableAliasName)
 
 resolveJoinsForAttributeOnSameModelThatIsNotARelation ($onTableAliasName)
 
 resolveJoinsForAttributeOnDifferentModelThatIsARelation ($onTableAliasName, $canUseFromJoins=true)
 
 resolveLeftJoinsForARelationAttribute ($onTableAliasName)
 
 resolveJoinsForAttributeOnDifferentModelThatIsNotARelation ($onTableAliasName, $canUseFromJoins=true)
 
 addMixedInOrCastedUpFromJoinsForAttribute ($onTableAliasName)
 
 addMixedInOrCastedUpLeftJoinsForAttribute ($onTableAliasName)
 
 addFromJoinsForAttributeThatIsMixedIn ($onTableAliasName)
 
 addFromJoinsForAttributeThatIsCastedUp ()
 
 addLeftJoinsForAttributeThatIsMixedIn ($onTableAliasName)
 
 addLeftJoinForMixedInAttribute ($onTableAliasName, $attributeTableName)
 
 addLeftJoinsForAttributeThatIsCastedUp ($onTableAliasName)
 
 addLeftJoinsForARelationAttribute ($onTableAliasName)
 
 resolveSettingDistinctForARelationAttributeThatIsHasMany ()
 
 resolveSetToDistinct ()
 
 resolveJoinsForForARelationAttributeThatIsManyToMany ($onTableAliasName)
 
 resolveJoinsForForARelationAttributeThatIsAHasManyVariant ($onTableAliasName)
 
 resolveJoinsForForARelationAttributeThatIsAHasOne ($onTableAliasName)
 
 resolveAndProcessLeftJoinsForAttributeThatIsCastedDownOrUp ($modelClassName, $castedDownModelClassName, $onTableAliasName)
 
 processLeftJoinsForAttributeThatIsCastedDown ($modelClassName, $castedDownModelClassName, $onTableAliasName)
 
 resolveModelDerivationPathToItemForCastingDown ($modelClassName, $castedDownModelClassName)
 

Protected Attributes

 $wherePartColumnModifierType
 
- Protected Attributes inherited from ModelJoinBuilder
 $modelAttributeToDataProviderAdapter
 
 $joinTablesAdapter
 
 $setDistinct
 
 $resolvedOnTableAliasName
 
 $tableAliasNameForBaseModel
 
 $tableAliasNameForRelatedModel
 

Additional Inherited Members

- Static Public Member Functions inherited from ModelJoinBuilder
static makeColumnNameWithTableAlias ($tableAliasName, $columnName)
 
- Static Protected Member Functions inherited from ModelJoinBuilder
static resolveForeignKey ($idName)
 
static resolveModelClassNameThatCanHaveTable ($modelClassName, $castedDownModelClassName)
 

Detailed Description

Builder for creating where clauses and making sure the appropriate joins are added to facilitate these clauses.

Definition at line 40 of file ModelWhereAndJoinBuilder.php.

Member Function Documentation

resolveJoinsAndBuildWhere (   $operatorType,
  $value,
$clausePosition,
$where,
  $onTableAliasName = null,
  $resolveAsSubquery = false 
)
Parameters
$operatorType
$value
$clausePosition
$where
null  |  string$onTableAliasName
boolean| $resolveAsSubquery

Definition at line 64 of file ModelWhereAndJoinBuilder.php.

buildJoinAndWhereForRelatedAttribute (   $operatorType,
  $value,
  $whereKey,
$where,
  $onTableAliasName = null,
  $resolveAsSubquery = false 
)
protected

Given a related attribute on a model, build the join and where sql string information.

Parameters
$operatorType
$value
$whereKey
$where
null  |  string$onTableAliasName

Definition at line 100 of file ModelWhereAndJoinBuilder.php.

buildWhereForRelatedAttributeThatIsItselfAHasManyRelation (   $onTableAliasName,
  $operatorType,
  $value,
$where,
  $whereKey 
)
protected

Given a related attribute on a model and the related attribute is a has_many relation, build the join and where sql string information.

Parameters
$onTableAliasName
$operatorType
$value
$where
$whereKey
Exceptions
NotSupportedException

Definition at line 182 of file ModelWhereAndJoinBuilder.php.

resolveJoinsForRelatedId (   $onTableAliasName = null)
protected
Parameters
null  |  string$onTableAliasName
Returns
null|string

Definition at line 228 of file ModelWhereAndJoinBuilder.php.

addWherePartByClauseInformation (   $operatorType,
  $value,
$where,
  $whereKey,
  $tableAliasName,
  $columnName 
)
protected

Add a sql string to the where array. How the sql string is built depends on if the value is a string or not.

Parameters
$operatorType
$value
$where
$whereKey
$tableAliasName
$columnName

Definition at line 256 of file ModelWhereAndJoinBuilder.php.

resolveWhereColumnContentForModifier (   $tableAliasName,
  $columnName 
)
protected
Parameters
$tableAliasName
$columnName
Returns
string

Definition at line 278 of file ModelWhereAndJoinBuilder.php.

resolveLeftJoinsForARelationAttribute (   $onTableAliasName)
protected

//todo: this override method was needed because otherwise the conversation listview would blow up. The elseif was added to properly support owned relations since those should always run the addLeftJoin. I am not sure what else is affected by this method, but reporting can't really use this override since even if the attribute is not related, it doesn't mean we shouldn't do the left join. Further work needs to be done with this method to test things out. The starting point would be to test the conversation listview issue which is around the use of owner and then work out from there.

ZurmoModelDataProviderUtilTest breaks if we don't have the elseif, but ModulesSearchWithDataProviderTest breaks if we do and it breaks really bad.

Parameters
$onTableAliasName
Returns
null|string

Definition at line 305 of file ModelWhereAndJoinBuilder.php.

resolveTimeZoneAdjustmentForACalculatedDateTimeModifier ( )
protected
Returns
string

Definition at line 322 of file ModelWhereAndJoinBuilder.php.


The documentation for this class was generated from the following file:
Generated on Mon Jul 13 2020 07:10:55
Account Suspended
Account Suspended
This Account has been suspended.
Contact your hosting provider for more information.