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


PHP Builder::getGrammar方法代碼示例

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


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

示例1: __construct

 /**
  * Create a new join clause instance.
  *
  * @param  \Illuminate\Database\Query\Builder $parentQuery
  * @param  string  $type
  * @param  string  $table
  * @return void
  */
 public function __construct(Builder $parentQuery, $type, $table)
 {
     $this->type = $type;
     $this->table = $table;
     $this->parentQuery = $parentQuery;
     parent::__construct($parentQuery->getConnection(), $parentQuery->getGrammar(), $parentQuery->getProcessor());
 }
開發者ID:delatbabel,項目名稱:framework,代碼行數:15,代碼來源:JoinClause.php

示例2: __construct

 public function __construct(Builder $builder, Request $request)
 {
     $this->query = $builder;
     $this->request = $request;
     $this->columns = $this->query->columns;
     $this->prefix = $this->query->getGrammar()->getTablePrefix();
 }
開發者ID:mikelmi,項目名稱:mks-smart-table,代碼行數:7,代碼來源:QueryBuilderEngine.php

示例3: getValue

 /**
  * Evaluate query as string.
  *
  * @return string
  */
 public function getValue()
 {
     $sql = '(' . $this->query->toSql() . ')';
     if ($this->alias) {
         $alias = $this->query->getGrammar()->wrapTable($this->alias);
         $sql .= ' as ' . $alias;
     }
     return $sql;
 }
開發者ID:rafwlaz,項目名稱:eloquence,代碼行數:14,代碼來源:Subquery.php

示例4: getLikeOperator

 /**
  * Get driver-specific case insensitive like operator.
  *
  * @return string
  */
 protected function getLikeOperator()
 {
     $grammar = $this->query->getGrammar();
     if ($grammar instanceof PostgresGrammar) {
         return 'ilike';
     }
     return 'like';
 }
開發者ID:jarektkaczyk,項目名稱:laravel-searchable,代碼行數:13,代碼來源:Searchable.php

示例5: getGrammar

 /**
  * Get the query grammar instance.
  *
  * @return \Illuminate\Database\Query\Grammars\Grammar 
  * @static 
  */
 public static function getGrammar()
 {
     return \Illuminate\Database\Query\Builder::getGrammar();
 }
開發者ID:satriashp,項目名稱:tour,代碼行數:10,代碼來源:_ide_helper.php

示例6: getILike

 /**
  * @param Builder|QueryBuilder $queryBuilder
  * @return string
  */
 protected function getILike($queryBuilder)
 {
     $grammar = $queryBuilder->getGrammar();
     if ($grammar instanceof MySqlGrammar) {
         return "COLLATE UTF8_GENERAL_CI LIKE";
     }
     if ($grammar instanceof PostgresGrammar) {
         return "ilike";
     }
     return 'like';
 }
開發者ID:williamoliveira,項目名稱:eloquent-array-query-builder,代碼行數:15,代碼來源:ArrayBuilder.php


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