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


PHP AbstractPlatform::getVarcharTypeDeclarationSQL方法代碼示例

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


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

示例1: getSQLDeclaration

 public function getSQLDeclaration(array $fieldDeclaration, AbstractPlatform $platform)
 {
     if ($platform->getName() === 'mysql') {
         return $platform->getVarcharTypeDeclarationSQL($fieldDeclaration) . " " . $platform->getCollationFieldDeclaration('utf8_bin');
     }
     return $platform->getVarcharTypeDeclarationSQL($fieldDeclaration);
 }
開發者ID:luisbrito,項目名稱:Phraseanet,代碼行數:7,代碼來源:BinaryString.php

示例2: getSqlDeclaration

 public function getSqlDeclaration(array $fieldDeclaration, AbstractPlatform $platform)
 {
     $fieldDeclaration['length'] = 255;
     $fieldDeclaration['notnull'] = false;
     $fieldDeclaration['default'] = null;
     return $platform->getVarcharTypeDeclarationSQL($fieldDeclaration);
 }
開發者ID:baszoetekouw,項目名稱:janus,代碼行數:7,代碼來源:JanusUserTypeType.php

示例3: getSQLDeclaration

 public function getSQLDeclaration(array $fieldDeclaration, AbstractPlatform $platform)
 {
     $fieldDeclaration['length'] = 25;
     $fieldDeclaration['fixed'] = true;
     $fieldDeclaration['notnull'] = true;
     return $platform->getVarcharTypeDeclarationSQL($fieldDeclaration);
 }
開發者ID:baszoetekouw,項目名稱:janus,代碼行數:7,代碼來源:JanusDateTimeType.php

示例4: getSQLDeclaration

 public function getSQLDeclaration(array $fieldDeclaration, AbstractPlatform $platform)
 {
     if (!isset($fieldDeclaration['length'])) {
         $fieldDeclaration['length'] = 32;
     }
     return $platform->getVarcharTypeDeclarationSQL($fieldDeclaration);
 }
開發者ID:foowie,項目名稱:ip,代碼行數:7,代碼來源:IP.php

示例5: getSQLDeclaration

 /**
  * {@inheritdoc}
  * @param array $fieldDeclaration
  * @param AbstractPlatform $platform
  * @return 
  */
 public function getSQLDeclaration(array $fieldDeclaration, AbstractPlatform $platform)
 {
     if (empty($fieldDeclaration['length'])) {
         $fieldDeclaration['length'] = Path::MAX_LENGTH;
     }
     $type = $platform->getVarcharTypeDeclarationSQL($fieldDeclaration);
     return $type;
 }
開發者ID:sitesupra,項目名稱:sitesupra,代碼行數:14,代碼來源:PathType.php

示例6: getSQLDeclaration

 /**
  * {@inheritdoc}
  * @param array $fieldDeclaration
  * @param AbstractPlatform $platform
  * @return string
  */
 public function getSQLDeclaration(array $fieldDeclaration, AbstractPlatform $platform)
 {
     $fieldDeclaration['length'] = 20;
     $fieldDeclaration['fixed'] = true;
     $sql = $platform->getVarcharTypeDeclarationSQL($fieldDeclaration);
     //todo: check if this is sane, at least
     $sql .= ' COLLATE ascii_general_ci';
     return $sql;
 }
開發者ID:sitesupra,項目名稱:sitesupra,代碼行數:15,代碼來源:SupraIdType.php

示例7: getSQLDeclaration

 /**
  * {@inheritdoc}
  */
 public function getSQLDeclaration(array $fieldDeclaration, AbstractPlatform $platform)
 {
     return $platform->getVarcharTypeDeclarationSQL($fieldDeclaration);
 }
開發者ID:BusinessCookies,項目名稱:CoffeeMachineProject,代碼行數:7,代碼來源:StringType.php

示例8: getSQLDeclaration

 /**
  * @param array $fieldDeclaration
  * @param AbstractPlatform $platform
  * @return string
  */
 public function getSQLDeclaration(array $fieldDeclaration, AbstractPlatform $platform)
 {
     return $platform->getVarcharTypeDeclarationSQL(array_merge($fieldDeclaration, array('length' => 1, 'fixed' => true)));
 }
開發者ID:bit3,項目名稱:contao-doctrine-dbal,代碼行數:9,代碼來源:ContaoBooleanType.php

示例9: getSqlDeclaration

 /**
  * @deprecated
  */
 public function getSqlDeclaration(array $fieldDeclaration, AbstractPlatform $platform)
 {
     return $platform->getVarcharTypeDeclarationSQL(array('length' => 3, 'fixed' => TRUE));
 }
開發者ID:pilec,項目名稱:Money,代碼行數:7,代碼來源:compatibility.php

示例10: getSQLDeclaration

 /**
  * Gets the SQL declaration snippet for a field of this type.
  *
  * @param array $fieldDeclaration The field declaration.
  * @param AbstractPlatform $platform The currently used database platform.
  *
  * @return string
  */
 public function getSQLDeclaration(array $fieldDeclaration, AbstractPlatform $platform)
 {
     return $this->getValueType() === self::ENUM_INT ? $platform->getIntegerTypeDeclarationSQL($fieldDeclaration) : $platform->getVarcharTypeDeclarationSQL($fieldDeclaration);
 }
開發者ID:wirus15,項目名稱:enum-bundle,代碼行數:12,代碼來源:EnumType.php

示例11: getSqlDeclaration

 public function getSqlDeclaration(array $fieldDeclaration, \Doctrine\DBAL\Platforms\AbstractPlatform $platform)
 {
     return $platform->getVarcharTypeDeclarationSQL($fieldDeclaration);
 }
開發者ID:jacksleight,項目名稱:coast-doctrine,代碼行數:4,代碼來源:UrlType.php

示例12: getSQLDeclaration

 /**
  * {@inheritdoc}
  *
  * @param array                                     $fieldDeclaration
  * @param \Doctrine\DBAL\Platforms\AbstractPlatform $platform
  */
 public function getSQLDeclaration(array $fieldDeclaration, AbstractPlatform $platform)
 {
     $length = isset($fieldDeclaration['length']) ? $fieldDeclaration['length'] : 7;
     $field = ['length' => $length, 'fixed' => true, 'collation' => 'utf8_bin'];
     return $platform->getVarcharTypeDeclarationSQL($field) . ' ' . $platform->getColumnCollationDeclarationSQL('utf8_bin');
 }
開發者ID:pugx,項目名稱:shortid-doctrine,代碼行數:12,代碼來源:ShortidType.php

示例13: getSQLDeclaration

 /**
  * {@inheritdoc}
  */
 public function getSQLDeclaration(array $fieldDeclaration, AbstractPlatform $platform)
 {
     $fieldDeclaration['length'] = static::DATE_INTERVAL_TYPE_FIELD_LENGTH;
     $fieldDeclaration['fixed'] = static::DATE_INTERVAL_TYPE_FIELD_FIXED;
     return $platform->getVarcharTypeDeclarationSQL($fieldDeclaration);
 }
開發者ID:iron-web,項目名稱:doctrine-bundle,代碼行數:9,代碼來源:DateIntervalType.php


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