本文整理汇总了PHP中SelectQuery::get方法的典型用法代码示例。如果您正苦于以下问题:PHP SelectQuery::get方法的具体用法?PHP SelectQuery::get怎么用?PHP SelectQuery::get使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SelectQuery
的用法示例。
在下文中一共展示了SelectQuery::get方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: get
/**
* (non-PHPdoc)
* @see IQuery::get()
*/
public function get($end = true)
{
$return = "(" . $this->firstQuery->get(false) . ")" . self::UNION . "(" . $this->secondQuery->get(false) . ")";
if ($this->hasOrderBy()) {
$return .= $this->getOrderBy();
}
return $return . $this->getEnd($end);
}
示例2: getToJoin
/**
* @return string
*/
private function getToJoin()
{
if ($this->tojoin instanceof SelectQuery || $this->tojoin instanceof UnionQuery) {
return " (" . $this->tojoin->get(false) . ")";
} else {
return " " . $this->tojoin;
}
}
示例3: fillPropertyField
/**
* Adds the table field to the SELECT list
*
* @param string $field
* @param SelectQuery $selectQuery
* @param EntityQueryBuilder $entityQueryBuilder
*/
protected function fillPropertyField($field, SelectQuery $selectQuery, EntityQueryBuilder $entityQueryBuilder)
{
$entityQueryBuilder->registerIdentifier($field);
$selectQuery->get(new SqlColumn($field, $entityQueryBuilder->getAlias()));
}
示例4: fill
function fill(SelectQuery $selectQuery, EntityQueryBuilder $entityQueryBuilder)
{
$selectQuery->get($this->getSqlFunction($entityQueryBuilder));
}
示例5: joinProperties
private function joinProperties(SelectQuery $query, ProtoDAO $parentDao, $parentTable, $parentRequired, $prefix = null)
{
$proto = call_user_func(array($parentDao->getObjectName(), 'proto'));
foreach ($proto->getPropertyList() as $property) {
if ($property instanceof LightMetaProperty && $property->getRelationId() == MetaRelation::ONE_TO_ONE && !$property->isGenericType() && (!$property->getFetchStrategyId() && $this->getFetchStrategy()->getId() == FetchStrategy::JOIN || $property->getFetchStrategyId() == FetchStrategy::JOIN)) {
if (is_subclass_of($property->getClassName(), 'Enumeration')) {
// field already added by makeSelectHead
continue;
} elseif ($property->isInner()) {
$proto = call_user_func(array($property->getClassName(), 'proto'));
foreach ($proto->getPropertyList() as $innerProperty) {
$query->get(new DBField($innerProperty->getColumnName(), $parentTable));
}
continue;
}
$propertyDao = call_user_func(array($property->getClassName(), 'dao'));
// add's custom dao's injection possibility
if (!$propertyDao instanceof ProtoDAO) {
continue;
}
$tableAlias = $propertyDao->getJoinName($property->getColumnName(), $prefix);
$fields = $propertyDao->getFields();
if (!$query->hasJoinedTable($tableAlias)) {
$logic = Expression::eq(DBField::create($property->getColumnName(), $parentTable), DBField::create($propertyDao->getIdName(), $tableAlias));
if ($property->isRequired() && $parentRequired) {
$query->join($propertyDao->getTable(), $logic, $tableAlias);
} else {
$query->leftJoin($propertyDao->getTable(), $logic, $tableAlias);
}
}
foreach ($fields as $field) {
$query->get(new DBField($field, $tableAlias), $propertyDao->getJoinPrefix($property->getColumnName(), $prefix) . $field);
}
$this->joinProperties($query, $propertyDao, $tableAlias, $property->isRequired() && $parentRequired, $propertyDao->getJoinPrefix($property->getColumnName(), $prefix));
}
}
}
示例6: fill
function fill(SelectQuery $selectQuery, EntityQueryBuilder $entityQueryBuilder)
{
$selectQuery->get($this->getValueExpression($entityQueryBuilder));
}