📄 oci_defs.h
字号:
#define OCI_ATTR_TYPECODE 216 /* object or collection */
#define OCI_ATTR_COLLECTION_TYPECODE 217 /* varray or nested table */
#define OCI_ATTR_COLLECTION_ELEMENT 227 /* has a collection attribute */
#define OCI_ATTR_NUM_TYPE_ATTRS 228 /* number of attribute types */
#define OCI_ATTR_LIST_TYPE_ATTRS 229 /* list of type attributes */
#define OCI_ATTR_CLIENT_IDENTIFIER 278 /* value of client id to set*/
#define OCI_ATTR_CHAR_USED 285 /* char length semantics */
#define OCI_ATTR_CHAR_SIZE 286 /* char length */
#define OCI_ATTR_MODULE 366 /* module for tracing */
#define OCI_ATTR_ACTION 367 /* action for tracing */
#define OCI_ATTR_CLIENT_INFO 368 /* client info */
#define OCI_ATTR_DRIVER_NAME 424 /* Driver Name */
/*------- Temporary attribute value for UCS2/UTF16 character set ID -------- */
#define OCI_UCS2ID 1000 /* UCS2 charset ID */
#define OCI_UTF16ID 1000 /* UTF16 charset ID */
/*-------------------------Credential Types----------------------------------*/
#define OCI_CRED_RDBMS 1 /* database username/password */
#define OCI_CRED_EXT 2 /* externally provided credentials */
#define OCI_CRED_PROXY 3 /* proxy authentication */
/*------------------------Error Return Values--------------------------------*/
#define OCI_SUCCESS 0 /* maps to SQL_SUCCESS of SAG CLI */
#define OCI_SUCCESS_WITH_INFO 1 /* maps to SQL_SUCCESS_WITH_INFO */
#define OCI_NO_DATA 100 /* maps to SQL_NO_DATA */
#define OCI_ERROR -1 /* maps to SQL_ERROR */
#define OCI_INVALID_HANDLE -2 /* maps to SQL_INVALID_HANDLE */
#define OCI_NEED_DATA 99 /* maps to SQL_NEED_DATA */
#define OCI_STILL_EXECUTING -3123 /* OCI would block error */
/*---------------- Server Handle Attribute Values ---------------------------*/
#define OCI_SERVER_NOT_CONNECTED 0x0
#define OCI_SERVER_NORMAL 0x1
/*--------------------- User Callback Return Values -------------------------*/
#define OCI_CONTINUE -24200 /* Continue with the body of the OCI function */
/*------------------------Attach Modes---------------------------------------*/
#define OCI_CPOOL 0x0200 /* Attach using server handle from pool */
/*------------------DateTime and Interval check Error codes------------------*/
#define OCI_DT_INVALID_DAY 0x1 /* Bad day */
#define OCI_DT_DAY_BELOW_VALID 0x2 /* Bad DAy Low/high bit (1=low)*/
#define OCI_DT_INVALID_MONTH 0x4 /* Bad MOnth */
#define OCI_DT_MONTH_BELOW_VALID 0x8 /* Bad MOnth Low/high bit (1=low) */
#define OCI_DT_INVALID_YEAR 0x10 /* Bad YeaR */
#define OCI_DT_YEAR_BELOW_VALID 0x20 /* Bad YeaR Low/high bit (1=low) */
#define OCI_DT_INVALID_HOUR 0x40 /* Bad HouR */
#define OCI_DT_HOUR_BELOW_VALID 0x80 /* Bad HouR Low/high bit (1=low) */
#define OCI_DT_INVALID_MINUTE 0x100 /* Bad MiNute */
#define OCI_DT_MINUTE_BELOW_VALID 0x200 /*Bad MiNute Low/high bit (1=low) */
#define OCI_DT_INVALID_SECOND 0x400 /* Bad SeCond */
#define OCI_DT_SECOND_BELOW_VALID 0x800 /*bad second Low/high bit (1=low)*/
#define OCI_DT_DAY_MISSING_FROM_1582 0x1000
/* Day is one of those "missing" from 1582 */
#define OCI_DT_YEAR_ZERO 0x2000 /* Year may not equal zero */
#define OCI_DT_INVALID_TIMEZONE 0x4000 /* Bad Timezone */
#define OCI_DT_INVALID_FORMAT 0x8000 /* Bad date format input */
/*------------------------Scrollable Cursor Fetch Options-------------------
* For non-scrollable cursor, the only valid (and default) orientation is
* OCI_FETCH_NEXT
*/
#define OCI_FETCH_CURRENT 0x01 /* refetching current position */
#define OCI_FETCH_NEXT 0x02 /* next row */
#define OCI_FETCH_FIRST 0x04 /* first row of the result set */
#define OCI_FETCH_LAST 0x08 /* the last row of the result set */
#define OCI_FETCH_PRIOR 0x10 /* the previous row relative to current */
#define OCI_FETCH_ABSOLUTE 0x20 /* absolute offset from first */
#define OCI_FETCH_RELATIVE 0x40 /* offset relative to current */
#define OCI_FETCH_RESERVED_1 0x80 /* reserved */
/*------------------------Parse mode ----------------------------------------*/
#define OCI_NTV_SYNTAX 1 /* Use what so ever is the native lang of server */
/*------------------------Bind and Define Options----------------------------*/
#define OCI_DATA_AT_EXEC 0x00000002 /* data at execute time */
#define OCI_DYNAMIC_FETCH 0x00000002 /* fetch dynamically */
#define OCI_PIECEWISE 0x00000004 /* piecewise DMLs or fetch */
#define OCI_STMT_SCROLLABLE_READONLY 0x08 /* if result set is scrollable */
/*----------------------------- Various Modes ------------------------------*/
#define OCI_DEFAULT 0x00000000
#define OCI_THREADED 0x00000001 /* appl. in threaded environment */
#define OCI_OBJECT 0x00000002 /* application in object environment */
#define OCI_UTF16 0x00004000 /* mode for all UTF16 metadata */
/*------------------------Authentication Modes-------------------------------*/
#define OCI_SYSDBA 0x00000002 /* for SYSDBA authorization */
#define OCI_SYSOPER 0x00000004 /* for SYSOPER authorization */
/*------------------------ Transaction Start Flags --------------------------*/
#define OCI_TRANS_NEW 0x00000001 /* starts a new transaction branch */
#define OCI_TRANS_JOIN 0x00000002 /* join an existing transaction */
#define OCI_TRANS_RESUME 0x00000004 /* resume this transaction */
#define OCI_TRANS_STARTMASK 0x000000ff
#define OCI_TRANS_READONLY 0x00000100 /* starts a readonly transaction */
#define OCI_TRANS_READWRITE 0x00000200 /* starts a read-write transaction */
#define OCI_TRANS_SERIALIZABLE 0x00000400
/* starts a serializable transaction */
#define OCI_TRANS_ISOLMASK 0x0000ff00
#define OCI_TRANS_LOOSE 0x00010000 /* a loosely coupled branch */
#define OCI_TRANS_TIGHT 0x00020000 /* a tightly coupled branch */
#define OCI_TRANS_TYPEMASK 0x000f0000
#define OCI_TRANS_NOMIGRATE 0x00100000 /* non migratable transaction */
#define OCI_TRANS_SEPARABLE 0x00200000 /* separable transaction (8.1.6+) */
#define OCI_TRANS_OTSRESUME 0x00400000 /* OTS resuming a transaction */
/*------------------------ Transaction End Flags ----------------------------*/
#define OCI_TRANS_TWOPHASE 0x01000000 /* use two phase commit */
#define OCI_TRANS_WRITEBATCH 0x00000001 /* force cmt-redo for local txns */
#define OCI_TRANS_WRITEIMMED 0x00000002 /* no force cmt-redo */
#define OCI_TRANS_WRITEWAIT 0x00000004 /* no sync cmt-redo */
#define OCI_TRANS_WRITENOWAIT 0x00000008 /* sync cmt-redo for local txns */
/*------------------------Describe Handle Parameter Attributes --------------*/
#define OCI_ATTR_DATA_SIZE 1 /* maximum size of the data */
#define OCI_ATTR_DATA_TYPE 2 /* the SQL type of the column/argument */
#define OCI_ATTR_DISP_SIZE 3 /* the display size */
#define OCI_ATTR_NAME 4 /* the name of the column/argument */
#define OCI_ATTR_PRECISION 5 /* precision if number type */
#define OCI_ATTR_SCALE 6 /* scale if number type */
#define OCI_ATTR_IS_NULL 7 /* is it null ? */
#define OCI_ATTR_TYPE_NAME 8 /* name of the named data type */
#define OCI_ATTR_SCHEMA_NAME 9 /* the schema name */
#define OCI_ATTR_SUB_NAME 10 /* type name if package private type */
/*------------------------Other Constants------------------------------------*/
#define OCI_ERROR_MAXMSG_SIZE 1024 /* max size of an error message */
#define OCI_LOBMAXSIZE MINUB4MAXVAL /* maximum lob data size */
#define OCI_ROWID_LEN 23
/*-----------------------Handle Definitions----------------------------------*/
typedef struct OCIEnv OCIEnv; /* OCI environment handle */
typedef struct OCIError OCIError; /* OCI error handle */
typedef struct OCISvcCtx OCISvcCtx; /* OCI service handle */
typedef struct OCIStmt OCIStmt; /* OCI statement handle */
typedef struct OCIBind OCIBind; /* OCI bind handle */
typedef struct OCIDefine OCIDefine; /* OCI Define handle */
typedef struct OCIDescribe OCIDescribe; /* OCI Describe handle */
typedef struct OCIServer OCIServer; /* OCI Server handle */
typedef struct OCISession OCISession; /* OCI Authentication handle */
typedef struct OCIComplexObject OCIComplexObject; /* OCI COR handle */
typedef struct OCITrans OCITrans; /* OCI Transaction handle */
typedef struct OCISecurity OCISecurity; /* OCI Security handle */
typedef struct OCISubscription OCISubscription; /* subscription handle */
typedef struct OCICPool OCICPool; /* connection pool handle */
typedef struct OCISPool OCISPool; /* session pool handle */
typedef struct OCIAuthInfo OCIAuthInfo; /* auth handle */
typedef struct OCIAdmin OCIAdmin; /* admin handle */
typedef struct OCIEvent OCIEvent; /* HA event handle */
typedef struct OCIDirPathCtx OCIDirPathCtx; /* DP context */
typedef struct OCIDirPathColArray OCIDirPathColArray; /* DP column array */
typedef struct OCIDirPathStream OCIDirPathStream; /* DP stream */
/*--------------------- OCI Thread Object Definitions------------------------*/
/* OCIThread Context */
typedef struct OCIThreadContext OCIThreadContext;
/* OCIThread Mutual Exclusion Lock */
typedef struct OCIThreadMutex OCIThreadMutex;
/* OCIThread Key for Thread-Specific Data */
typedef struct OCIThreadKey OCIThreadKey;
/* OCIThread Thread ID */
typedef struct OCIThreadId OCIThreadId;
/* OCIThread Thread Handle */
typedef struct OCIThreadHandle OCIThreadHandle;
/*--------------------- OCI Collection Object Definitions--------------------*/
/* OCIColl - generic collection type */
typedef struct OCIColl OCIColl;
/* OCIArray - varray collection type */
typedef OCIColl OCIArray;
/* OCITable - nested table collection type */
typedef OCIColl OCITable;
/* OCIIter - collection iterator */
typedef struct OCIIter OCIIter;
/*-----------------------Descriptor Definitions------------------------------*/
typedef struct OCISnapshot OCISnapshot; /* OCI snapshot descriptor */
typedef struct OCIResult OCIResult; /* OCI Result Set Descriptor */
typedef struct OCILobLocator OCILobLocator; /* OCI Lob Locator descriptor */
typedef struct OCIParam OCIParam; /* OCI PARameter descriptor */
typedef struct OCIDateTime OCIDateTime; /* OCI DateTime descriptor */
typedef struct OCIInterval OCIInterval; /* OCI Interval descriptor */
typedef struct OCIRowid OCIRowid; /* OCI ROWID descriptor */
/*----------------------------- OBJECT FREE OPTION --------------------------*/
#define OCI_OBJECTFREE_FORCE (ub2)0x0001
#define OCI_OBJECTFREE_NONULL (ub2)0x0002
/*-------------------------- OCINumber --------------------------------------*/
#define OCI_NUMBER_UNSIGNED 0 /* Unsigned type -- ubX */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -