当前位置: 首页>>代码示例>>PHP>>正文


PHP SelectQuery::get方法代码示例

本文整理汇总了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);
 }
开发者ID:Warsaalk,项目名称:Plinth,代码行数:12,代码来源:UnionQuery.php

示例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;
     }
 }
开发者ID:Warsaalk,项目名称:Plinth,代码行数:11,代码来源:JoinQuery.php

示例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()));
 }
开发者ID:phoebius,项目名称:ajax-example,代码行数:12,代码来源:PropertyProjection.class.php

示例4: fill

 function fill(SelectQuery $selectQuery, EntityQueryBuilder $entityQueryBuilder)
 {
     $selectQuery->get($this->getSqlFunction($entityQueryBuilder));
 }
开发者ID:phoebius,项目名称:ajax-example,代码行数:4,代码来源:AggrProjection.class.php

示例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));
         }
     }
 }
开发者ID:rero26,项目名称:onphp-framework,代码行数:37,代码来源:Criteria.class.php

示例6: fill

 function fill(SelectQuery $selectQuery, EntityQueryBuilder $entityQueryBuilder)
 {
     $selectQuery->get($this->getValueExpression($entityQueryBuilder));
 }
开发者ID:phoebius,项目名称:ajax-example,代码行数:4,代码来源:RawProjection.class.php


注:本文中的SelectQuery::get方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。