/** * Internally called method to assist with SQL Query options/preferences for array loaders. * Any LoadAll or LoadArray method can use this method to setup SQL Query Clauses that deal * with OrderBy, Limit, and Object Expansion. Strings that contain SQL Query Clauses are * passed in by reference. * @param string $strOrderBy reference to the Order By as passed in to the LoadArray method * @param string $strLimit the Limit as passed in to the LoadArray method * @param string $strLimitPrefix reference to the Limit Prefix to be used in the SQL * @param string $strLimitSuffix reference to the Limit Suffix to be used in the SQL * @param string $strExpandSelect reference to the Expand Select to be used in the SQL * @param string $strExpandFrom reference to the Expand From to be used in the SQL * @param array $objExpansionMap map of referenced columns to be immediately expanded via early-binding * @param string $objDatabase reference to the Database object to be queried */ protected static function ArrayQueryHelper(&$strOrderBy, $strLimit, &$strLimitPrefix, &$strLimitSuffix, &$strExpandSelect, &$strExpandFrom, $objExpansionMap, &$objDatabase) { // Get the Database $objDatabase = QApplication::$Database[1]; // Setup OrderBy and Limit Information (if applicable) $strOrderBy = $objDatabase->SqlSortByVariable($strOrderBy); $strLimitPrefix = $objDatabase->SqlLimitVariablePrefix($strLimit); $strLimitSuffix = $objDatabase->SqlLimitVariableSuffix($strLimit); // Setup QueryExpansion (if applicable) if ($objExpansionMap) { $objQueryExpansion = new QQueryExpansion('AssetCustomFieldHelper', 'asset_custom_field_helper', $objExpansionMap); $strExpandSelect = $objQueryExpansion->GetSelectSql(); $strExpandFrom = $objQueryExpansion->GetFromSql(); } else { $strExpandSelect = null; $strExpandFrom = null; } }
/** * Internally called method to assist with SQL Query options/preferences for array loaders. * Any LoadAll or LoadArray method can use this method to setup SQL Query Clauses that deal * with OrderBy, Limit, and Object Expansion. Strings that contain SQL Query Clauses are * passed in by reference. * @param string $strOrderBy reference to the Order By as passed in to the LoadArray method * @param string $strLimit the Limit as passed in to the LoadArray method * @param string $strLimitPrefix reference to the Limit Prefix to be used in the SQL * @param string $strLimitSuffix reference to the Limit Suffix to be used in the SQL * @param string $strExpandSelect reference to the Expand Select to be used in the SQL * @param string $strExpandFrom reference to the Expand From to be used in the SQL * @param array $objExpansionMap map of referenced columns to be immediately expanded via early-binding * @param string $objDatabase reference to the Database object to be queried */ protected static function ArrayQueryHelper(&$strOrderBy, $strLimit, &$strLimitPrefix, &$strLimitSuffix, &$strExpandSelect, &$strExpandFrom, $objExpansionMap, &$objDatabase) { // Get the Database $objDatabase = QApplication::$Database[1]; // Setup OrderBy and Limit Information (if applicable) $strOrderBy = $objDatabase->SqlSortByVariable($strOrderBy); $strLimitPrefix = $objDatabase->SqlLimitVariablePrefix($strLimit); $strLimitSuffix = $objDatabase->SqlLimitVariableSuffix($strLimit); // Setup QueryExpansion (if applicable) if ($objExpansionMap) { $objQueryExpansion = new QQueryExpansion('RoleEntityQtypeBuiltInAuthorization', 'role_entity_qtype_built_in_authorization', $objExpansionMap); $strExpandSelect = $objQueryExpansion->GetSelectSql(); $strExpandFrom = $objQueryExpansion->GetFromSql(); } else { $strExpandSelect = null; $strExpandFrom = null; } }