Наш чат в Telegram для обмена идеями, проектами, мыслями, людьми в сфере ИТ г.Ростова-на-Дону: @it_rostov

cubrid_schema

(PECL CUBRID >= 8.3.0)

cubrid_schema — Get the requested schema information


Описание

array cubrid_schema ( resource $conn_identifier , int $schema_type [, string $class_name [, string $attr_name ]] )

The cubrid_schema() function is used to get the requested schema information from database. You have to designate class_name, if you want to get information on certain class, attr_name, if you want to get information on certain attribute (can be used only with CUBRID_ SCH_ATTR_PRIVILEGE).

The result of the cubrid_schema function is returned as a two-dimensional array (column (associative array) * row (numeric array)). The following tables shows types of schema and the column structure of the result array to be returned based on the schema type.

Result Composition of Each Type
Schema Column Number Column Name Value
CUBRID_SCH_CLASS1NAME 
 2TYPE0:system class 1:vclass 2:class
CUBRID_SCH_VCLASS1NAME 
 2TYPE1:vclass
CUBRID_SCH_QUERY_SPEC1QUERY_SPEC 
CUBRID_SCH_ATTRIBUTE / CUBRID_SCH_CLASS_ATTRIBUTE1ATTR_NAME 
 2DOMAIN 
 3SCALE 
 4PRECISION 
 5INDEXED1:indexed
 6NOT NULL1:not null
 7SHARED1:shared
 8UNIQUE1:unique
 9DEFAULT 
 10ATTR_ORDERbase:1
 11CLASS_NAME 
 12SOURCE_CLASS 
 13IS_KEY1:key
CUBRID_SCH_METHOD / CUBRID_SCH_CLASS_METHOD1NAME 
 2RET_DOMAIN 
 3ARG_DOMAIN 
CUBRID_SCH_METHOD_FILE1METHOD_FILE 
CUBRID_SCH_SUPERCLASS / CUBRID_SCH_DIRECT_SUPER_CLASS / CUBRID_SCH_SUBCLASS1CLASS_NAME 
 2TYPE0:system class 1:vclass 2:class
CUBRID_SCH_CONSTRAINT1TYPE0:unique 1:index 2:reverse unique 3:reverse index
 2NAME 
 3ATTR_NAME 
 4NUM_PAGES 
 5NUM_KEYS 
 6PRIMARY_KEY1:primary key
 7KEY_ORDERbase:1
CUBRID_SCH_TRIGGER1NAME 
 2STATUS 
 3EVENT 
 4TARGET_CLASS 
 5TARGET_ATTR 
 6ACTION_TIME 
 7ACTION 
 8PRIORITY 
 9CONDITION_TIME 
 10CONDITION 
CUBRID_SCH_CLASS_PRIVILEGE / CUBRID_SCH_ATTR_PRIVILEGE1CLASS_NAME / ATTR_NAME 
 2PRIVILEGE 
 3GRANTABLE 
CUBRID_SCH_PRIMARY_KEY1CLASS_NAME 
 2ATTR_NAME 
 3KEY_SEQbase:1
 4KEY_NAME 
CUBRID_SCH_IMPORTED_KEYS / CUBRID_SCH_EXPORTED_KEYS / CUBRID_SCH_CROSS_REFERENCE1PKTABLE_NAME 
 2PKCOLUMN_NAME 
 3FKTABLE_NAMEbase:1
 4FKCOLUMN_NAME 
 5KEY_SEQbase:1
 6UPDATE_ACTION0:cascade 1:restrict 2:no action 3:set null
 7DELETE_ACTION0:cascade 1:restrict 2:no action 3:set null
 8FK_NAME 
 9PK_NAME 


Список параметров

conn_identifier -

Connection identifier.

schema_type -

Schema data that you want to know.

class_name -

Class you want to know the schema of.

attr_name -

Attribute you want to know the schema of.


Возвращаемые значения

Array containing the schema information, when process is successful;

FALSE, when process is unsuccessful




Смотрите также:
Описание на ru2.php.net
Описание на php.ru