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

Предопределенные константы

Перечисленные ниже константы определены данным расширением и могут быть доступны только в том случае, если PHP был собран с поддержкой этого расширения или же в том случае, если данное расширение было подгружено во время выполнения.

The following constants can be used when executing SQL statement. They can be passed to cubrid_prepare() and cubrid_execute().

CUBRID SQL execution flags
Constant Description
CUBRID_INCLUDE_OIDDetermine whether to get OID during query execution.
CUBRID_ASYNCExecute the query in asynchronous mode.
CUBRID_EXEC_QUERY_ALLExecute the query in synchronous mode. This flag must be set when executing multiple SQL statements.

The following constants can be used when fetching the results to specify fetch behaviour. They can be passed to cubrid_fetch() and cubrid_fetch_array().

CUBRID fetch flags
Constant Description
CUBRID_NUMGet query result as a numeric array (0-default).
CUBRID_ASSOCGet query result as an associative array.
CUBRID_BOTHGet query result as both numeric and associative arrays (default value).
CUBRID_OBJECTGet query result an object.

The following constants can be used when positioning the cursor in query results. They can be passed to or returned by cubrid_move_cursor().

CUBRID cursor position flags
Constant Description
CUBRID_CURSOR_FIRSTMove current cursor to the first position in the result.
CUBRID_CURSOR_CURRENTMove current cursor as a default value if the origin is not specified.
CUBRID_CURSOR_LASTMove current cursor to the last position in the result.
CUBRID_CURSOR_SUCCESSReturned value of cubrid_move_cursor() function in case of success.
CUBRID_NO_MORE_DATAReturned value of cubrid_move_cursor() function in case of failure.
CUBRID_CURSOR_ERRORReturned value of cubrid_move_cursor() function in case of failure.

The following constants can be used when setting the auto-commit mode for the database connection. They can be passed to cubrid_set_autocommit() or returned by cubrid_get_autocommit().

CUBRID auto-commit mode flags
Constant Description
CUBRID_AUTOCOMMIT_TRUEEnable the auto-commit mode.
CUBRID_AUTOCOMMIT_FALSEDisable the auto-commit mode.

The following constants can be used when setting the database parameter. They can be passed to cubrid_set_db_parameter().

CUBRID parameter flags
Constant Description
CUBRID_PARAM_ISOLATION_LEVELTransaction isolation level for the database connection.
CUBRID_PARAM_LOCK_TIMEOUTTransaction timeout in seconds.

The following constants can be used when setting the transaction isolation level. They can be passed to cubrid_set_db_parameter() or returned by cubrid_get_db_parameter().

CUBRID isolation level flags
Constant Description
TRAN_COMMIT_CLASS_UNCOMMIT_INSTANCEThe lowest isolation level (1). A dirty, non-repeatable or phantom read may occur for the tuple and a non-repeatable read may occur for the table as well.
TRAN_COMMIT_CLASS_COMMIT_INSTANCEA relatively low isolation level (2). A dirty read does not occur, but non-repeatable or phantom read may occur.
TRAN_REP_CLASS_UNCOMMIT_INSTANCEThe default isolation of CUBRID (3). A dirty, non-repeatable or phantom read may occur for the tuple, but repeatable read is ensured for the table.
TRAN_REP_CLASS_COMMIT_INSTANCEA relatively low isolation level (4). A dirty read does not occur, but non-repeatable or phantom read may.
TRAN_REP_CLASS_REP_INSTANCEA relatively high isolation level (5). A dirty or non-repeatable read does not occur, but a phantom read may.
TRAN_SERIALIZABLEThe highest isolation level (6). Problems concerning concurrency (e.g. dirty read, non-repeatable read, phantom read, etc.) do not occur.

The following constants can be used when getting schema information. They can be passed to cubrid_schema().

CUBRID schema flags
Constant Description
CUBRID_SCH_CLASSGet name and type of table in CUBRID.
CUBRID_SCH_VCLASSGet name and type of view in CUBRID.
CUBRID_SCH_QUERY_SPECGet the query definition of view.
CUBRID_SCH_ATTRIBUTEGet the attributes of table column.
CUBRID_SCH_CLASS_ATTRIBUTEGet the attributes of table.
CUBRID_SCH_METHODGet the instance method. The instance method is a method called by a class instance. It is used more often than the class method because most operations are executed in the instance.
CUBRID_SCH_CLASS_METHODGet the class method. The class method is a method called by a class object. It is usually used to create a new class instance or to initialize it. It is also used to access or update class attributes.
CUBRID_SCH_METHOD_FILEGet the information of the file where the method of the table is defined.
CUBRID_SCH_SUPERCLASSGet the name and type of table which table inherites attributes from.
CUBRID_SCH_SUBCLASSGet the name and type of table which inherites attributes from this table.
CUBRID_SCH_CONSTRAINTGet the table constraints.
CUBRID_SCH_TRIGGERGet the table triggers.
CUBRID_SCH_CLASS_PRIVILEGEGet the privilege information of table.
CUBRID_SCH_ATTR_PRIVILEGEGet the privilege information of column.
CUBRID_SCH_DIRECT_SUPER_CLASSGet the direct super table of table.
CUBRID_SCH_PRIMARY_KEYGet the table primary key.
CUBRID_SCH_IMPORTED_KEYSGet imported keys of table.
CUBRID_SCH_EXPORTED_KEYSGet exported keys of table.
CUBRID_SCH_CROSS_REFERENCEGet reference relationship of tow tables.

The following constants can be used when reporting errors. They can be returned from cubrid_error_code_facility().

CUBRID error facility code
Constant Description
CUBRID_FACILITY_DBMSThe error occured in CUBRID dbms.
CUBRID_FACILITY_CASThe error occured in CUBRID broker cas.
CUBRID_FACILITY_CCIThe error occured in CUBRID cci.
CUBRID_FACILITY_CLIENTThe error occured in CUBRID PHP client.




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