當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Criteria::addSelectColumn方法代碼示例

本文整理匯總了PHP中Propel\Runtime\ActiveQuery\Criteria::addSelectColumn方法的典型用法代碼示例。如果您正苦於以下問題:PHP Criteria::addSelectColumn方法的具體用法?PHP Criteria::addSelectColumn怎麽用?PHP Criteria::addSelectColumn使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Propel\Runtime\ActiveQuery\Criteria的用法示例。


在下文中一共展示了Criteria::addSelectColumn方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: testCreateSelectSqlPart

 public function testCreateSelectSqlPart()
 {
     Propel::getServiceContainer()->setAdapter('oracle', new OracleAdapter());
     $db = Propel::getServiceContainer()->getAdapter();
     $c = new Criteria();
     $c->addSelectColumn(BookTableMap::COL_ID);
     $c->addAsColumn('book_ID', BookTableMap::COL_ID);
     $fromClause = [];
     $selectSql = $db->createSelectSqlPart($c, $fromClause);
     $this->assertEquals('SELECT book.id, book.id AS book_ID', $selectSql, 'createSelectSqlPart() returns a SQL SELECT clause with both select and as columns');
     $this->assertEquals(['book'], $fromClause, 'createSelectSqlPart() adds the tables from the select columns to the from clause');
 }
開發者ID:disider,項目名稱:Propel2,代碼行數:12,代碼來源:OracleAdapterTest.php

示例2: addSelectColumns

 /**
  * Add all the columns needed to create a new object.
  *
  * Note: any columns that were marked with lazyLoad="true" in the
  * XML schema will not be added to the select list and only loaded
  * on demand.
  *
  * @param Criteria $criteria object containing the columns to add.
  * @param string   $alias    optional table alias
  * @throws PropelException Any exceptions caught during processing will be
  *         rethrown wrapped into a PropelException.
  */
 public static function addSelectColumns(Criteria $criteria, $alias = null)
 {
     if (null === $alias) {
         $criteria->addSelectColumn(ContentI18nTableMap::ID);
         $criteria->addSelectColumn(ContentI18nTableMap::LOCALE);
         $criteria->addSelectColumn(ContentI18nTableMap::TITLE);
         $criteria->addSelectColumn(ContentI18nTableMap::DESCRIPTION);
         $criteria->addSelectColumn(ContentI18nTableMap::CHAPO);
         $criteria->addSelectColumn(ContentI18nTableMap::POSTSCRIPTUM);
         $criteria->addSelectColumn(ContentI18nTableMap::META_TITLE);
         $criteria->addSelectColumn(ContentI18nTableMap::META_DESCRIPTION);
         $criteria->addSelectColumn(ContentI18nTableMap::META_KEYWORDS);
     } else {
         $criteria->addSelectColumn($alias . '.ID');
         $criteria->addSelectColumn($alias . '.LOCALE');
         $criteria->addSelectColumn($alias . '.TITLE');
         $criteria->addSelectColumn($alias . '.DESCRIPTION');
         $criteria->addSelectColumn($alias . '.CHAPO');
         $criteria->addSelectColumn($alias . '.POSTSCRIPTUM');
         $criteria->addSelectColumn($alias . '.META_TITLE');
         $criteria->addSelectColumn($alias . '.META_DESCRIPTION');
         $criteria->addSelectColumn($alias . '.META_KEYWORDS');
     }
 }
開發者ID:margery,項目名稱:thelia,代碼行數:36,代碼來源:ContentI18nTableMap.php

示例3: addSelectColumns

 /**
  * Add all the columns needed to create a new object.
  *
  * Note: any columns that were marked with lazyLoad="true" in the
  * XML schema will not be added to the select list and only loaded
  * on demand.
  *
  * @param Criteria $criteria object containing the columns to add.
  * @param string   $alias    optional table alias
  * @throws PropelException Any exceptions caught during processing will be
  *         rethrown wrapped into a PropelException.
  */
 public static function addSelectColumns(Criteria $criteria, $alias = null)
 {
     if (null === $alias) {
         $criteria->addSelectColumn(DiaporamaVersionTableMap::ID);
         $criteria->addSelectColumn(DiaporamaVersionTableMap::SHORTCODE);
         $criteria->addSelectColumn(DiaporamaVersionTableMap::CREATED_AT);
         $criteria->addSelectColumn(DiaporamaVersionTableMap::UPDATED_AT);
         $criteria->addSelectColumn(DiaporamaVersionTableMap::VERSION);
         $criteria->addSelectColumn(DiaporamaVersionTableMap::VERSION_CREATED_AT);
         $criteria->addSelectColumn(DiaporamaVersionTableMap::VERSION_CREATED_BY);
     } else {
         $criteria->addSelectColumn($alias . '.ID');
         $criteria->addSelectColumn($alias . '.SHORTCODE');
         $criteria->addSelectColumn($alias . '.CREATED_AT');
         $criteria->addSelectColumn($alias . '.UPDATED_AT');
         $criteria->addSelectColumn($alias . '.VERSION');
         $criteria->addSelectColumn($alias . '.VERSION_CREATED_AT');
         $criteria->addSelectColumn($alias . '.VERSION_CREATED_BY');
     }
 }
開發者ID:InformatiqueProg,項目名稱:Diaporamas,代碼行數:32,代碼來源:DiaporamaVersionTableMap.php

示例4: addSelectColumns

 /**
  * Add all the columns needed to create a new object.
  *
  * Note: any columns that were marked with lazyLoad="true" in the
  * XML schema will not be added to the select list and only loaded
  * on demand.
  *
  * @param Criteria $criteria object containing the columns to add.
  * @param string   $alias    optional table alias
  * @throws PropelException Any exceptions caught during processing will be
  *                         rethrown wrapped into a PropelException.
  */
 public static function addSelectColumns(Criteria $criteria, $alias = null)
 {
     if (null === $alias) {
         $criteria->addSelectColumn(JudgeTableMap::COL_ID);
         $criteria->addSelectColumn(JudgeTableMap::COL_POSITION);
         $criteria->addSelectColumn(JudgeTableMap::COL_STARTGROUP_ID);
         $criteria->addSelectColumn(JudgeTableMap::COL_USER_ID);
     } else {
         $criteria->addSelectColumn($alias . '.id');
         $criteria->addSelectColumn($alias . '.position');
         $criteria->addSelectColumn($alias . '.startgroup_id');
         $criteria->addSelectColumn($alias . '.user_id');
     }
 }
開發者ID:iuf,項目名稱:junia,代碼行數:26,代碼來源:JudgeTableMap.php

示例5: testCreateSelectSqlPartAliasAll

 public function testCreateSelectSqlPartAliasAll()
 {
     $db = Propel::getServiceContainer()->getAdapter(BookTableMap::DATABASE_NAME);
     $c = new Criteria();
     $c->addSelectColumn(BookTableMap::COL_ID);
     $c->addAsColumn('book_id', BookTableMap::COL_ID);
     $fromClause = [];
     $selectSql = $db->createSelectSqlPart($c, $fromClause, true);
     $this->assertEquals('SELECT book.id AS book_id_1, book.id AS book_id', $selectSql, 'createSelectSqlPart() aliases all columns if passed true as last parameter');
     $this->assertEquals([], $fromClause, 'createSelectSqlPart() does not add the tables from an all-aliased list of select columns');
 }
開發者ID:disider,項目名稱:Propel2,代碼行數:11,代碼來源:AbstractAdapterTest.php

示例6: addSelectColumns

 /**
  * Add all the columns needed to create a new object.
  *
  * Note: any columns that were marked with lazyLoad="true" in the
  * XML schema will not be added to the select list and only loaded
  * on demand.
  *
  * @param Criteria $criteria object containing the columns to add.
  * @param string   $alias    optional table alias
  * @throws PropelException Any exceptions caught during processing will be
  *                         rethrown wrapped into a PropelException.
  */
 public static function addSelectColumns(Criteria $criteria, $alias = null)
 {
     if (null === $alias) {
         $criteria->addSelectColumn(LockTableMap::COL_ID);
         $criteria->addSelectColumn(LockTableMap::COL_CREATINGDATETIME);
     } else {
         $criteria->addSelectColumn($alias . '.ID');
         $criteria->addSelectColumn($alias . '.CREATINGDATETIME');
     }
 }
開發者ID:arkanmgerges,項目名稱:tasker,代碼行數:22,代碼來源:LockTableMap.php

示例7: addSelectColumns

 /**
  * Add all the columns needed to create a new object.
  *
  * Note: any columns that were marked with lazyLoad="true" in the
  * XML schema will not be added to the select list and only loaded
  * on demand.
  *
  * @param Criteria $criteria object containing the columns to add.
  * @param string   $alias    optional table alias
  * @throws PropelException Any exceptions caught during processing will be
  *                         rethrown wrapped into a PropelException.
  */
 public static function addSelectColumns(Criteria $criteria, $alias = null)
 {
     if (null === $alias) {
         $criteria->addSelectColumn(EveApiTableMap::COL_ID);
         $criteria->addSelectColumn(EveApiTableMap::COL_USERID);
         $criteria->addSelectColumn(EveApiTableMap::COL_KEYID);
         $criteria->addSelectColumn(EveApiTableMap::COL_VCODE);
         $criteria->addSelectColumn(EveApiTableMap::COL_STATUS);
         $criteria->addSelectColumn(EveApiTableMap::COL_LASTCOMPUTED);
     } else {
         $criteria->addSelectColumn($alias . '.id');
         $criteria->addSelectColumn($alias . '.userId');
         $criteria->addSelectColumn($alias . '.keyId');
         $criteria->addSelectColumn($alias . '.vCode');
         $criteria->addSelectColumn($alias . '.status');
         $criteria->addSelectColumn($alias . '.lastComputed');
     }
 }
開發者ID:Covert-Inferno,項目名稱:EVE-Composition-Planer,代碼行數:30,代碼來源:EveApiTableMap.php

示例8: addSelectColumns

 /**
  * Add all the columns needed to create a new object.
  *
  * Note: any columns that were marked with lazyLoad="true" in the
  * XML schema will not be added to the select list and only loaded
  * on demand.
  *
  * @param Criteria $criteria object containing the columns to add.
  * @param string   $alias    optional table alias
  * @throws PropelException Any exceptions caught during processing will be
  *                         rethrown wrapped into a PropelException.
  */
 public static function addSelectColumns(Criteria $criteria, $alias = null)
 {
     if (null === $alias) {
         $criteria->addSelectColumn(BookTableMap::COL_ID);
         $criteria->addSelectColumn(BookTableMap::COL_TITLE);
         $criteria->addSelectColumn(BookTableMap::COL_ISBN);
         $criteria->addSelectColumn(BookTableMap::COL_PUBLISHER_ID);
         $criteria->addSelectColumn(BookTableMap::COL_AUTHOR_ID);
     } else {
         $criteria->addSelectColumn($alias . '.id');
         $criteria->addSelectColumn($alias . '.title');
         $criteria->addSelectColumn($alias . '.isbn');
         $criteria->addSelectColumn($alias . '.publisher_id');
         $criteria->addSelectColumn($alias . '.author_id');
     }
 }
開發者ID:jeffblack360,項目名稱:testpropel,代碼行數:28,代碼來源:BookTableMap.php

示例9: addSelectColumns

 /**
  * Add all the columns needed to create a new object.
  *
  * Note: any columns that were marked with lazyLoad="true" in the
  * XML schema will not be added to the select list and only loaded
  * on demand.
  *
  * @param Criteria $criteria object containing the columns to add.
  * @param string   $alias    optional table alias
  * @throws PropelException Any exceptions caught during processing will be
  *                         rethrown wrapped into a PropelException.
  */
 public static function addSelectColumns(Criteria $criteria, $alias = null)
 {
     if (null === $alias) {
         $criteria->addSelectColumn(StructureNodeTableMap::COL_ID);
         $criteria->addSelectColumn(StructureNodeTableMap::COL_TYPE);
         $criteria->addSelectColumn(StructureNodeTableMap::COL_SKILL_ID);
         $criteria->addSelectColumn(StructureNodeTableMap::COL_TITLE);
         $criteria->addSelectColumn(StructureNodeTableMap::COL_DESCENDANT_CLASS);
     } else {
         $criteria->addSelectColumn($alias . '.id');
         $criteria->addSelectColumn($alias . '.type');
         $criteria->addSelectColumn($alias . '.skill_id');
         $criteria->addSelectColumn($alias . '.title');
         $criteria->addSelectColumn($alias . '.descendant_class');
     }
 }
開發者ID:gossi,項目名稱:trixionary,代碼行數:28,代碼來源:StructureNodeTableMap.php

示例10: addSelectColumns

 /**
  * Add all the columns needed to create a new object.
  *
  * Note: any columns that were marked with lazyLoad="true" in the
  * XML schema will not be added to the select list and only loaded
  * on demand.
  *
  * @param Criteria $criteria object containing the columns to add.
  * @param string   $alias    optional table alias
  * @throws PropelException Any exceptions caught during processing will be
  *         rethrown wrapped into a PropelException.
  */
 public static function addSelectColumns(Criteria $criteria, $alias = null)
 {
     if (null === $alias) {
         $criteria->addSelectColumn(AttributeAvTableMap::ID);
         $criteria->addSelectColumn(AttributeAvTableMap::ATTRIBUTE_ID);
         $criteria->addSelectColumn(AttributeAvTableMap::POSITION);
         $criteria->addSelectColumn(AttributeAvTableMap::CREATED_AT);
         $criteria->addSelectColumn(AttributeAvTableMap::UPDATED_AT);
     } else {
         $criteria->addSelectColumn($alias . '.ID');
         $criteria->addSelectColumn($alias . '.ATTRIBUTE_ID');
         $criteria->addSelectColumn($alias . '.POSITION');
         $criteria->addSelectColumn($alias . '.CREATED_AT');
         $criteria->addSelectColumn($alias . '.UPDATED_AT');
     }
 }
開發者ID:margery,項目名稱:thelia,代碼行數:28,代碼來源:AttributeAvTableMap.php

示例11: addSelectColumns

 /**
  * Add all the columns needed to create a new object.
  *
  * Note: any columns that were marked with lazyLoad="true" in the
  * XML schema will not be added to the select list and only loaded
  * on demand.
  *
  * @param Criteria $criteria object containing the columns to add.
  * @param string   $alias    optional table alias
  * @throws PropelException Any exceptions caught during processing will be
  *                         rethrown wrapped into a PropelException.
  */
 public static function addSelectColumns(Criteria $criteria, $alias = null)
 {
     if (null === $alias) {
         $criteria->addSelectColumn(PerformanceStatisticTableMap::COL_ID);
         $criteria->addSelectColumn(PerformanceStatisticTableMap::COL_MIN);
         $criteria->addSelectColumn(PerformanceStatisticTableMap::COL_MAX);
         $criteria->addSelectColumn(PerformanceStatisticTableMap::COL_RANGE);
         $criteria->addSelectColumn(PerformanceStatisticTableMap::COL_MEDIAN);
         $criteria->addSelectColumn(PerformanceStatisticTableMap::COL_AVERAGE);
         $criteria->addSelectColumn(PerformanceStatisticTableMap::COL_VARIANCE);
         $criteria->addSelectColumn(PerformanceStatisticTableMap::COL_STANDARD_DEVIATION);
         $criteria->addSelectColumn(PerformanceStatisticTableMap::COL_VARIABILITY_COEFFICIENT);
     } else {
         $criteria->addSelectColumn($alias . '.id');
         $criteria->addSelectColumn($alias . '.min');
         $criteria->addSelectColumn($alias . '.max');
         $criteria->addSelectColumn($alias . '.range');
         $criteria->addSelectColumn($alias . '.median');
         $criteria->addSelectColumn($alias . '.average');
         $criteria->addSelectColumn($alias . '.variance');
         $criteria->addSelectColumn($alias . '.standard_deviation');
         $criteria->addSelectColumn($alias . '.variability_coefficient');
     }
 }
開發者ID:iuf,項目名稱:junia,代碼行數:36,代碼來源:PerformanceStatisticTableMap.php

示例12: addSelectColumns

 /**
  * Add all the columns needed to create a new object.
  *
  * Note: any columns that were marked with lazyLoad="true" in the
  * XML schema will not be added to the select list and only loaded
  * on demand.
  *
  * @param Criteria $criteria object containing the columns to add.
  * @param string   $alias    optional table alias
  * @throws PropelException Any exceptions caught during processing will be
  *                         rethrown wrapped into a PropelException.
  */
 public static function addSelectColumns(Criteria $criteria, $alias = null)
 {
     if (null === $alias) {
         $criteria->addSelectColumn(MediafileTableMap::COL_IDMEDIAFILE);
         $criteria->addSelectColumn(MediafileTableMap::COL_FILE_LOCATION);
         $criteria->addSelectColumn(MediafileTableMap::COL_SIZE);
         $criteria->addSelectColumn(MediafileTableMap::COL_TIMESTAMP);
         $criteria->addSelectColumn(MediafileTableMap::COL_MIMETYPE);
     } else {
         $criteria->addSelectColumn($alias . '.idMediaFile');
         $criteria->addSelectColumn($alias . '.file_location');
         $criteria->addSelectColumn($alias . '.size');
         $criteria->addSelectColumn($alias . '.timestamp');
         $criteria->addSelectColumn($alias . '.mimetype');
     }
 }
開發者ID:nohepe,項目名稱:Bakalarka,代碼行數:28,代碼來源:MediafileTableMap.php

示例13: addSelectColumns

 /**
  * Add all the columns needed to create a new object.
  *
  * Note: any columns that were marked with lazyLoad="true" in the
  * XML schema will not be added to the select list and only loaded
  * on demand.
  *
  * @param Criteria $criteria object containing the columns to add.
  * @param string   $alias    optional table alias
  * @throws PropelException Any exceptions caught during processing will be
  *                         rethrown wrapped into a PropelException.
  */
 public static function addSelectColumns(Criteria $criteria, $alias = null)
 {
     if (null === $alias) {
         $criteria->addSelectColumn(GameTableMap::COL_ID);
         $criteria->addSelectColumn(GameTableMap::COL_MODALITY);
         $criteria->addSelectColumn(GameTableMap::COL_RESULT);
         $criteria->addSelectColumn(GameTableMap::COL_BET_COST);
         $criteria->addSelectColumn(GameTableMap::COL_START);
         $criteria->addSelectColumn(GameTableMap::COL_FINISH);
     } else {
         $criteria->addSelectColumn($alias . '.id');
         $criteria->addSelectColumn($alias . '.modality');
         $criteria->addSelectColumn($alias . '.result');
         $criteria->addSelectColumn($alias . '.bet_cost');
         $criteria->addSelectColumn($alias . '.start');
         $criteria->addSelectColumn($alias . '.finish');
     }
 }
開發者ID:amandaaurita,項目名稱:hackapuc2015,代碼行數:30,代碼來源:GameTableMap.php

示例14: addSelectColumns

 /**
  * Add all the columns needed to create a new object.
  *
  * Note: any columns that were marked with lazyLoad="true" in the
  * XML schema will not be added to the select list and only loaded
  * on demand.
  *
  * @param Criteria $criteria object containing the columns to add.
  * @param string   $alias    optional table alias
  * @throws PropelException Any exceptions caught during processing will be
  *         rethrown wrapped into a PropelException.
  */
 public static function addSelectColumns(Criteria $criteria, $alias = null)
 {
     if (null === $alias) {
         $criteria->addSelectColumn(TemplateTableMap::ID);
         $criteria->addSelectColumn(TemplateTableMap::CREATED_AT);
         $criteria->addSelectColumn(TemplateTableMap::UPDATED_AT);
     } else {
         $criteria->addSelectColumn($alias . '.ID');
         $criteria->addSelectColumn($alias . '.CREATED_AT');
         $criteria->addSelectColumn($alias . '.UPDATED_AT');
     }
 }
開發者ID:margery,項目名稱:thelia,代碼行數:24,代碼來源:TemplateTableMap.php

示例15: addSelectColumns

 /**
  * Add all the columns needed to create a new object.
  *
  * Note: any columns that were marked with lazyLoad="true" in the
  * XML schema will not be added to the select list and only loaded
  * on demand.
  *
  * @param Criteria $criteria object containing the columns to add.
  * @param string   $alias    optional table alias
  * @throws PropelException Any exceptions caught during processing will be
  *                         rethrown wrapped into a PropelException.
  */
 public static function addSelectColumns(Criteria $criteria, $alias = null)
 {
     if (null === $alias) {
         $criteria->addSelectColumn(ResourceTypeTableMap::COL_RESOURCE_TYPE_ID);
         $criteria->addSelectColumn(ResourceTypeTableMap::COL_RESOURCE_TYPE_CODE);
     } else {
         $criteria->addSelectColumn($alias . '.resource_type_id');
         $criteria->addSelectColumn($alias . '.resource_type_code');
     }
 }
開發者ID:mtornero,項目名稱:slowshop,代碼行數:22,代碼來源:ResourceTypeTableMap.php


注:本文中的Propel\Runtime\ActiveQuery\Criteria::addSelectColumn方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。