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


PHP DatabaseCompatibilityUtil::resolveUnsignedByHintType方法代码示例

本文整理汇总了PHP中DatabaseCompatibilityUtil::resolveUnsignedByHintType方法的典型用法代码示例。如果您正苦于以下问题:PHP DatabaseCompatibilityUtil::resolveUnsignedByHintType方法的具体用法?PHP DatabaseCompatibilityUtil::resolveUnsignedByHintType怎么用?PHP DatabaseCompatibilityUtil::resolveUnsignedByHintType使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在DatabaseCompatibilityUtil的用法示例。


在下文中一共展示了DatabaseCompatibilityUtil::resolveUnsignedByHintType方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: resolveForeignKeyColumnMetadata

 public static function resolveForeignKeyColumnMetadata($name, $relatedModelClass = null)
 {
     if (!isset($name)) {
         if (isset($relatedModelClass)) {
             $name = static::resolveForeignKeyNameByModelName($relatedModelClass);
         } else {
             throw new NotSupportedException();
         }
     }
     // this is foreign key, we force it to be assumed unsigned.
     $unsigned = DatabaseCompatibilityUtil::resolveUnsignedByHintType('integer', false, $name);
     return static::resolveColumnMetadataByHintType($name, 'integer', null, $unsigned);
 }
开发者ID:RamaKavanan,项目名称:InitialVersion,代码行数:13,代码来源:RedBeanModelMemberToColumnUtil.php

示例2: getReservedColumnMetadata

 protected static function getReservedColumnMetadata()
 {
     $columns = array();
     $reservedColumnsTypes = array('status' => 'integer', 'serializedMessages' => 'string', 'analysisStatus' => 'integer', 'serializedAnalysisMessages' => 'string');
     foreach ($reservedColumnsTypes as $columnName => $type) {
         $length = null;
         $unsigned = null;
         if ($type === 'string') {
             // populate the proper type given it would be 1024 char string depending on db type.
             RedBeanModelMemberRulesToColumnAdapter::resolveStringTypeAndLengthByMaxLength($type, $length, 1024);
         } else {
             // forcing integers to be unsigned
             $unsigned = DatabaseCompatibilityUtil::resolveUnsignedByHintType($type, false);
         }
         // last argument is false because we do not want these column names to be resolved to lower characters
         $columns[] = RedBeanModelMemberToColumnUtil::resolveColumnMetadataByHintType($columnName, $type, $length, $unsigned, null, null, null, false);
     }
     return $columns;
 }
开发者ID:maruthisivaprasad,项目名称:zurmo,代码行数:19,代码来源:ImportDatabaseUtil.php


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