NewsNewsFeaturesDownloadsDevelopmentSupportForumDocumentsAbout Us

ADORecordSet_db2 類別 參考文件

類別ADORecordSet_db2的繼承圖:

ADORecordSet_odbc ADORecordSet ADODB_BASE_RS 全部成員列表

公開方法(Public Methods)

 ADORecordSet_db2 ($id, $mode=false)
 MetaType ($t, $len=-1, $fieldobj=false)

公開屬性

 $databaseType = "db2"

詳細描述

定義在 adodb-db2.inc.php 檔案之第 297 行.


建構子與解構子說明文件

ADORecordSet_db2::ADORecordSet_db2 id,
mode = false
 

定義在 adodb-db2.inc.php 檔案之第 301 行.

參考 $mode, 及 ADORecordSet_odbc::ADORecordSet_odbc().

00302     {
00303         $this->ADORecordSet_odbc($id,$mode);
00304     }


函式成員說明文件

ADORecordSet_db2::MetaType t,
len = -1,
fieldobj = false
 

Get the metatype of the column. This is used for formatting. This is because many databases use different names for the same type, so we transform the original type to our standardised version which uses 1 character codes:

參數:
t is the type passed in. Normally is ADOFieldObject->type.
len is the maximum length of that field. This is because we treat character fields bigger than a certain size as a 'B' (blob).
fieldobj is the field object returned by the database driver. Can hold additional info (eg. primary_key for mysql).
傳回值:
the general type of the data: C for character < 250 chars X for teXt (>= 250 chars) B for Binary N for numeric or floating point D for date T for timestamp L for logical/Boolean I for integer R for autoincrement counter/integer

依據ADORecordSet重新實作.

定義在 adodb-db2.inc.php 檔案之第 306 行.

參考 $t.

00307     {
00308         if (is_object($t)) {
00309             $fieldobj = $t;
00310             $t = $fieldobj->type;
00311             $len = $fieldobj->max_length;
00312         }
00313         
00314         switch (strtoupper($t)) {
00315         case 'VARCHAR':
00316         case 'CHAR':
00317         case 'CHARACTER':
00318         case 'C':
00319             if ($len <= $this->blobSize) return 'C';
00320         
00321         case 'LONGCHAR':
00322         case 'TEXT':
00323         case 'CLOB':
00324         case 'DBCLOB': // double-byte
00325         case 'X':
00326             return 'X';
00327         
00328         case 'BLOB':
00329         case 'GRAPHIC':
00330         case 'VARGRAPHIC':
00331             return 'B';
00332             
00333         case 'DATE':
00334         case 'D':
00335             return 'D';
00336         
00337         case 'TIME':
00338         case 'TIMESTAMP':
00339         case 'T':
00340             return 'T';
00341         
00342         //case 'BOOLEAN': 
00343         //case 'BIT':
00344         //  return 'L';
00345             
00346         //case 'COUNTER':
00347         //  return 'R';
00348             
00349         case 'INT':
00350         case 'INTEGER':
00351         case 'BIGINT':
00352         case 'SMALLINT':
00353         case 'I':
00354             return 'I';
00355             
00356         default: return 'N';
00357         }
00358     }


資料成員說明文件

ADORecordSet_db2::$databaseType = "db2"
 

依據ADORecordSet_odbc重新實作.

定義在 adodb-db2.inc.php 檔案之第 299 行.


此類別(class) 文件是由下列檔案中產生: