当前位置: 首页>>代码示例>>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;未经允许,请勿转载。