當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。