OCILIB (C Driver for Oracle) 3.12.1
|
00001 /* 00002 +-----------------------------------------------------------------------------------------+ 00003 | | 00004 | OCILIB - C Driver for Oracle | 00005 | | 00006 | (C Wrapper for Oracle OCI) | 00007 | | 00008 | Website : http://www.ocilib.net | 00009 | | 00010 | Copyright (c) 2007-2013 Vincent ROGIER <vince.rogier@ocilib.net> | 00011 | | 00012 +-----------------------------------------------------------------------------------------+ 00013 | | 00014 | This library is free software; you can redistribute it and/or | 00015 | modify it under the terms of the GNU Lesser General Public | 00016 | License as published by the Free Software Foundation; either | 00017 | version 2 of the License, or (at your option) any later version. | 00018 | | 00019 | This library is distributed in the hope that it will be useful, | 00020 | but WITHOUT ANY WARRANTY; without even the implied warranty of | 00021 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | 00022 | Lesser General Public License for more details. | 00023 | | 00024 | You should have received a copy of the GNU Lesser General Public | 00025 | License along with this library; if not, write to the Free | 00026 | Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | 00027 | | 00028 +-----------------------------------------------------------------------------------------+ 00029 */ 00030 00031 /* --------------------------------------------------------------------------------------------- * 00032 * $Id: ocilib_internal.h, Vincent Rogier $ 00033 * --------------------------------------------------------------------------------------------- */ 00034 00035 #ifndef OCILIB_OCILIB_INTERNAL_H_INCLUDED 00036 #define OCILIB_OCILIB_INTERNAL_H_INCLUDED 00037 00038 #include "ocilib_types.h" 00039 #include "ocilib_checks.h" 00040 00041 #ifdef __cplusplus 00042 extern "C" 00043 { 00044 #endif 00045 00046 /* ********************************************************************************************* * 00047 PRIVATE FUNCTIONS PROTOTYPES 00048 * ********************************************************************************************* */ 00049 00050 /* --------------------------------------------------------------------------------------------- * 00051 * agent.c 00052 * --------------------------------------------------------------------------------------------- */ 00053 00054 OCI_Agent * OCI_AgentInit 00055 ( 00056 OCI_Connection *con, 00057 OCI_Agent **pagent, 00058 OCIAQAgent *handle, 00059 const mtext *name, 00060 const mtext *address 00061 ); 00062 00063 /* --------------------------------------------------------------------------------------------- * 00064 * array.c 00065 * --------------------------------------------------------------------------------------------- */ 00066 00067 boolean OCI_ArrayInit 00068 ( 00069 OCI_Array *arr, 00070 OCI_TypeInfo *typinf 00071 ); 00072 00073 boolean OCI_ArrayCleanup 00074 ( 00075 OCI_Array *arr 00076 ); 00077 00078 OCI_Array * OCI_ArrayCreate 00079 ( 00080 OCI_Connection *con, 00081 unsigned int nb_elem, 00082 unsigned int elem_type, 00083 unsigned int elem_subtype, 00084 unsigned int elem_size, 00085 unsigned int struct_size, 00086 unsigned int handle_type, 00087 OCI_TypeInfo *typinf 00088 ); 00089 00090 boolean OCI_ArrayClose 00091 ( 00092 OCI_Array *arr 00093 ); 00094 00095 boolean OCI_ArrayFreeFromHandles 00096 ( 00097 void ** handles 00098 ); 00099 00100 void * OCI_ArrayGetOCIHandlesFromHandles 00101 ( 00102 void ** handles 00103 ); 00104 00105 /* --------------------------------------------------------------------------------------------- * 00106 * bind.c 00107 * --------------------------------------------------------------------------------------------- */ 00108 00109 boolean OCI_BindFree 00110 ( 00111 OCI_Bind *bnd 00112 ); 00113 00114 boolean OCI_BindAllocData 00115 ( 00116 OCI_Bind *bnd 00117 ); 00118 00119 /* --------------------------------------------------------------------------------------------- * 00120 * callback.c 00121 * --------------------------------------------------------------------------------------------- */ 00122 00123 sb4 OCI_ProcInBind 00124 ( 00125 dvoid *ictxp, 00126 OCIBind *bindp, 00127 ub4 iter, 00128 ub4 index, 00129 dvoid **bufpp, 00130 ub4 *alenp, 00131 ub1 *piecep, 00132 dvoid **indp 00133 ); 00134 00135 sb4 OCI_ProcOutBind 00136 ( 00137 dvoid *octxp, 00138 OCIBind *bindp, 00139 ub4 iter, 00140 ub4 index, 00141 dvoid **bufpp, 00142 ub4 **alenp, 00143 ub1 *piecep, 00144 void **indp, 00145 ub2 **rcodep 00146 ); 00147 00148 ub4 OCI_ProcNotifyChanges 00149 ( 00150 void *ctx, 00151 OCISubscription *subscrhp, 00152 void *payload, 00153 ub4 paylen, 00154 void *desc, 00155 ub4 mode 00156 ); 00157 00158 ub4 OCI_ProcNotifyMessages 00159 ( 00160 void *ctx, 00161 OCISubscription *subscrhp, 00162 void *payload, 00163 ub4 paylen, 00164 void *desc, 00165 ub4 mode 00166 ); 00167 00168 sb4 OCI_ProcFailOver 00169 ( 00170 dvoid *svchp, 00171 dvoid *envhp, 00172 dvoid *fo_ctx, 00173 ub4 fo_type, 00174 ub4 fo_event 00175 ); 00176 00177 00178 void OCI_ProcHAEvent 00179 ( 00180 dvoid *evtctx, 00181 dvoid *eventptr 00182 ); 00183 00184 /* --------------------------------------------------------------------------------------------- * 00185 * collection.c 00186 * --------------------------------------------------------------------------------------------- */ 00187 00188 OCI_Coll * OCI_CollInit 00189 ( 00190 OCI_Connection *con, 00191 OCI_Coll **pcoll, 00192 void *handle, 00193 OCI_TypeInfo *typeinf 00194 ); 00195 00196 /* --------------------------------------------------------------------------------------------- * 00197 * column.c 00198 * --------------------------------------------------------------------------------------------- */ 00199 00200 boolean OCI_ColumnMap 00201 ( 00202 OCI_Column *col, 00203 OCI_Statement *stmt 00204 ); 00205 00206 boolean OCI_ColumnDescribe 00207 ( 00208 OCI_Column *col, 00209 OCI_Connection *con, 00210 OCI_Statement *stmt, 00211 void *handle, 00212 int index, 00213 int ptype 00214 ); 00215 00216 boolean OCI_ColumnGetAttrInfo 00217 ( 00218 OCI_Column *col, 00219 unsigned int count, 00220 unsigned int index, 00221 size_t *p_size, 00222 int *p_type 00223 ); 00224 00225 /* --------------------------------------------------------------------------------------------- * 00226 * connection.c 00227 * --------------------------------------------------------------------------------------------- */ 00228 00229 OCI_Connection * OCI_ConnectionAllocate 00230 ( 00231 OCI_Pool *pool, 00232 const mtext *db, 00233 const mtext *user, 00234 const mtext *pwd, 00235 unsigned int mode 00236 ); 00237 00238 boolean OCI_ConnectionDeallocate 00239 ( 00240 OCI_Connection *con 00241 ); 00242 00243 boolean OCI_ConnectionAttach 00244 ( 00245 OCI_Connection *con 00246 ); 00247 00248 boolean OCI_ConnectionLogon 00249 ( 00250 OCI_Connection *con, 00251 const mtext *password, 00252 const mtext *tag 00253 ); 00254 00255 boolean OCI_ConnectionDetach 00256 ( 00257 OCI_Connection *con 00258 ); 00259 00260 boolean OCI_ConnectionLogOff 00261 ( 00262 OCI_Connection *con 00263 ); 00264 00265 boolean OCI_ConnectionClose 00266 ( 00267 OCI_Connection *con 00268 ); 00269 00270 /* --------------------------------------------------------------------------------------------- * 00271 * date.c 00272 * --------------------------------------------------------------------------------------------- */ 00273 00274 OCI_Date * OCI_DateInit 00275 ( 00276 OCI_Connection *con, 00277 OCI_Date **pdate, 00278 OCIDate *buffer, 00279 boolean allocate, 00280 boolean ansi 00281 ); 00282 00283 /* --------------------------------------------------------------------------------------------- * 00284 * define.c 00285 * --------------------------------------------------------------------------------------------- */ 00286 00287 OCI_Define * OCI_GetDefine 00288 ( 00289 OCI_Resultset *rs, 00290 unsigned int index 00291 ); 00292 00293 int OCI_GetDefineIndex 00294 ( 00295 OCI_Resultset *rs, 00296 const mtext *name 00297 ); 00298 00299 boolean OCI_DefineGetNumber 00300 ( 00301 OCI_Resultset *rs, 00302 unsigned int index, 00303 void *value, 00304 uword type, 00305 uword size 00306 ); 00307 00308 boolean OCI_DefineAlloc 00309 ( 00310 OCI_Define *def 00311 ); 00312 00313 boolean OCI_DefineDef 00314 ( 00315 OCI_Define *def, 00316 ub4 position 00317 ); 00318 00319 void * OCI_DefineGetData 00320 ( 00321 OCI_Define *def 00322 ); 00323 00324 boolean OCI_DefineIsDataNotNull 00325 ( 00326 OCI_Define *def 00327 ); 00328 00329 boolean OCI_DefineRequestBuffer 00330 ( 00331 OCI_Define *def, 00332 unsigned int size 00333 ); 00334 00335 /* --------------------------------------------------------------------------------------------- * 00336 * dirpath.c 00337 * --------------------------------------------------------------------------------------------- */ 00338 00339 int OCI_API OCI_DirPathSetArray 00340 ( 00341 OCI_DirPath *dp, 00342 ub4 row_from 00343 ); 00344 00345 unsigned int OCI_API OCI_DirPathArrayToStream 00346 ( 00347 OCI_DirPath *dp, 00348 ub4 row_from 00349 ); 00350 00351 unsigned int OCI_API OCI_DirPathLoadStream 00352 ( 00353 OCI_DirPath *dp 00354 ); 00355 00356 00357 /* --------------------------------------------------------------------------------------------- * 00358 * element.c 00359 * --------------------------------------------------------------------------------------------- */ 00360 00361 boolean OCI_ElemGetNumber 00362 ( 00363 OCI_Elem *elem, 00364 void *value, 00365 uword size, 00366 uword flag 00367 ); 00368 00369 boolean OCI_ElemSetNumber 00370 ( 00371 OCI_Elem *elem, 00372 void *value, 00373 uword size, 00374 uword flag 00375 ); 00376 00377 OCI_Elem * OCI_ElemInit 00378 ( 00379 OCI_Connection *con, 00380 OCI_Elem **pelem, 00381 void *handle, 00382 OCIInd *pind, 00383 OCI_TypeInfo *typeinf 00384 ); 00385 00386 boolean OCI_ElemSetNullIndicator 00387 ( 00388 OCI_Elem *elem, 00389 OCIInd value 00390 ); 00391 00392 /* --------------------------------------------------------------------------------------------- * 00393 * error.c 00394 * --------------------------------------------------------------------------------------------- */ 00395 00396 void OCI_ErrorFree 00397 ( 00398 OCI_Error *err 00399 ); 00400 00401 void OCI_ErrorReset 00402 ( 00403 OCI_Error *err 00404 ); 00405 00406 OCI_Error * OCI_ErrorGet 00407 ( 00408 boolean check, 00409 boolean warning 00410 ); 00411 00412 OCI_Error * OCI_ErrorCreate 00413 ( 00414 void 00415 ); 00416 00417 /* --------------------------------------------------------------------------------------------- * 00418 * event.c 00419 * --------------------------------------------------------------------------------------------- */ 00420 00421 boolean OCI_EventReset 00422 ( 00423 OCI_Event *event 00424 ); 00425 00426 /* --------------------------------------------------------------------------------------------- * 00427 * exception.c 00428 * --------------------------------------------------------------------------------------------- */ 00429 00430 OCI_Error * OCI_ExceptionGetError 00431 ( 00432 boolean warning 00433 ); 00434 00435 void OCI_ExceptionRaise 00436 ( 00437 OCI_Error *err 00438 ); 00439 00440 void OCI_ExceptionOCI 00441 ( 00442 OCIError *p_err, 00443 OCI_Connection *con, 00444 OCI_Statement *stmt, 00445 boolean warning 00446 ); 00447 00448 void OCI_ExceptionMemory 00449 ( 00450 int type, 00451 size_t nb_bytes, 00452 OCI_Connection *con, 00453 OCI_Statement *stmt 00454 ); 00455 00456 void OCI_ExceptionNotAvailable 00457 ( 00458 OCI_Connection *con, 00459 int feature 00460 ); 00461 00462 void OCI_ExceptionNullPointer 00463 ( 00464 int type 00465 ); 00466 00467 void OCI_ExceptionDatatypeNotSupported 00468 ( 00469 OCI_Connection *con, 00470 OCI_Statement *stmt, 00471 int code 00472 ); 00473 00474 void OCI_ExceptionParsingToken 00475 ( 00476 OCI_Connection *con, 00477 OCI_Statement *stmt, 00478 mtext token 00479 ); 00480 00481 void OCI_ExceptionMappingArgument 00482 ( 00483 OCI_Connection *con, 00484 OCI_Statement *stmt, 00485 int arg 00486 ); 00487 00488 void OCI_ExceptionNotInitialized 00489 ( 00490 void 00491 ); 00492 00493 void OCI_ExceptionLoadingSharedLib 00494 ( 00495 void 00496 ); 00497 00498 void OCI_ExceptionLoadingSymbols 00499 ( 00500 void 00501 ); 00502 00503 void OCI_ExceptionNotMultithreaded 00504 ( 00505 void 00506 ); 00507 00508 void OCI_ExceptionOutOfBounds 00509 ( 00510 OCI_Connection *con, 00511 int value 00512 ); 00513 00514 void OCI_ExceptionUnfreedData 00515 ( 00516 int type_elem, 00517 int nb_elem 00518 ); 00519 00520 void OCI_ExceptionMaxBind 00521 ( 00522 OCI_Statement *stmt 00523 ); 00524 00525 void OCI_ExceptionAttributeNotFound 00526 ( 00527 OCI_Connection *con, 00528 const mtext *attr 00529 ); 00530 00531 void OCI_ExceptionMinimumValue 00532 ( 00533 OCI_Connection *con, 00534 OCI_Statement *stmt, 00535 int min 00536 ); 00537 00538 void OCI_ExceptionTypeNotCompatible 00539 ( 00540 OCI_Connection *con 00541 ); 00542 00543 void OCI_ExceptionStatementState 00544 ( 00545 OCI_Statement *stmt, 00546 int state 00547 ); 00548 00549 void OCI_ExceptionStatementNotScrollable 00550 ( 00551 OCI_Statement *stmt 00552 ); 00553 00554 void OCI_ExceptionBindAlreadyUsed 00555 ( 00556 OCI_Statement *stmt, 00557 const mtext *bind 00558 ); 00559 00560 void OCI_ExceptionBindArraySize 00561 ( 00562 OCI_Statement *stmt, 00563 unsigned int maxsize, 00564 unsigned int cursize, 00565 unsigned int newsize 00566 ); 00567 00568 void OCI_ExceptionDirPathColNotFound 00569 ( 00570 OCI_DirPath *dp, 00571 const mtext *column, 00572 const mtext *table 00573 ); 00574 00575 void OCI_ExceptionDirPathState 00576 ( 00577 OCI_DirPath *dp, 00578 int state 00579 ); 00580 00581 void OCI_ExceptionOCIEnvironment 00582 ( 00583 void 00584 ); 00585 00586 void OCI_ExceptionRebindBadDatatype 00587 ( 00588 OCI_Statement *stmt, 00589 const mtext *bind 00590 ); 00591 00592 void OCI_ExceptionTypeInfoWrongType 00593 ( 00594 OCI_Connection *con, 00595 const mtext *name 00596 ); 00597 00598 /* --------------------------------------------------------------------------------------------- * 00599 * file.c 00600 * --------------------------------------------------------------------------------------------- */ 00601 00602 OCI_File * OCI_FileInit 00603 ( 00604 OCI_Connection *con, 00605 OCI_File **pfile, 00606 OCILobLocator *handle, 00607 ub4 type 00608 ); 00609 00610 boolean OCI_FileGetInfo 00611 ( 00612 OCI_File *file 00613 ); 00614 00615 /* --------------------------------------------------------------------------------------------- * 00616 * format.c 00617 * --------------------------------------------------------------------------------------------- */ 00618 00619 int OCI_ParseSqlFmt 00620 ( 00621 OCI_Statement *stmt, 00622 mtext *buffer, 00623 const mtext *format, 00624 va_list *pargs 00625 ); 00626 00627 /* --------------------------------------------------------------------------------------------- * 00628 * hash.c 00629 * --------------------------------------------------------------------------------------------- */ 00630 00631 unsigned int OCI_HashCompute 00632 ( 00633 OCI_HashTable *table, 00634 const mtext *str 00635 ); 00636 00637 boolean OCI_HashAdd 00638 ( 00639 OCI_HashTable *table, 00640 const mtext *key, 00641 OCI_Variant value, 00642 unsigned int type 00643 ); 00644 00645 /* --------------------------------------------------------------------------------------------- * 00646 * interval.c 00647 * --------------------------------------------------------------------------------------------- */ 00648 00649 OCI_Interval * OCI_IntervalInit 00650 ( 00651 OCI_Connection *con, 00652 OCI_Interval **pitv, 00653 OCIInterval *buffer, 00654 ub4 type 00655 ); 00656 00657 /* --------------------------------------------------------------------------------------------- * 00658 * library.c 00659 * --------------------------------------------------------------------------------------------- */ 00660 00661 void OCI_SetLastError 00662 ( 00663 OCI_Error err 00664 ); 00665 00666 void OCI_SetStatus 00667 ( 00668 boolean res 00669 ); 00670 00671 boolean OCI_KeyMapFree 00672 ( 00673 void 00674 ); 00675 00676 /* --------------------------------------------------------------------------------------------- * 00677 * list.c 00678 * --------------------------------------------------------------------------------------------- */ 00679 00680 OCI_List * OCI_ListCreate 00681 ( 00682 int type 00683 ); 00684 00685 boolean OCI_ListFree 00686 ( 00687 OCI_List *list 00688 ); 00689 00690 OCI_Item * OCI_ListCreateItem 00691 ( 00692 int type, 00693 int size 00694 ); 00695 00696 OCI_Item * OCI_ListAppend 00697 ( 00698 OCI_List *list, 00699 int size 00700 ); 00701 00702 boolean OCI_ListClear 00703 ( 00704 OCI_List *list 00705 ); 00706 00707 typedef boolean (*POCI_LIST_FOR_EACH)(void *ptr); 00708 00709 boolean OCI_ListForEach 00710 ( 00711 OCI_List *list, 00712 POCI_LIST_FOR_EACH proc 00713 ); 00714 00715 boolean OCI_ListRemove 00716 ( 00717 OCI_List *list, 00718 void *data 00719 ); 00720 00721 /* --------------------------------------------------------------------------------------------- * 00722 * lob.c 00723 * --------------------------------------------------------------------------------------------- */ 00724 00725 OCI_Lob * OCI_LobInit 00726 ( 00727 OCI_Connection *con, 00728 OCI_Lob **plob, 00729 OCILobLocator *handle, 00730 ub4 type 00731 ); 00732 00733 /* --------------------------------------------------------------------------------------------- * 00734 * long.c 00735 * --------------------------------------------------------------------------------------------- */ 00736 00737 OCI_Long * OCI_LongInit 00738 ( 00739 OCI_Statement *stmt, 00740 OCI_Long **plg, 00741 OCI_Define *def, 00742 unsigned int type 00743 ); 00744 00745 /* --------------------------------------------------------------------------------------------- * 00746 * memory.c 00747 * --------------------------------------------------------------------------------------------- */ 00748 00749 void * OCI_MemAlloc 00750 ( 00751 int ptr_type, 00752 size_t block_size, 00753 size_t block_count, 00754 boolean zero_fill 00755 ); 00756 00757 void * OCI_MemRealloc 00758 ( 00759 void * ptr_mem, 00760 int ptr_type, 00761 size_t block_size, 00762 size_t block_count 00763 ); 00764 00765 void OCI_MemFree 00766 ( 00767 void * ptr_mem 00768 ); 00769 00770 sword OCI_HandleAlloc 00771 ( 00772 CONST dvoid *parenth, 00773 dvoid **hndlpp, 00774 CONST ub4 type, 00775 CONST size_t xtramem_sz, 00776 dvoid **usrmempp 00777 ); 00778 00779 sword OCI_HandleFree 00780 ( 00781 dvoid *hndlp, 00782 CONST ub4 type 00783 ); 00784 00785 sword OCI_DescriptorAlloc 00786 ( 00787 CONST dvoid *parenth, 00788 dvoid **descpp, 00789 CONST ub4 type, 00790 CONST size_t xtramem_sz, 00791 dvoid **usrmempp 00792 ); 00793 00794 sword OCI_DescriptorArrayAlloc 00795 ( 00796 CONST dvoid *parenth, 00797 dvoid **descpp, 00798 CONST ub4 type, 00799 ub4 nb_elem, 00800 CONST size_t xtramem_sz, 00801 dvoid **usrmempp 00802 ); 00803 00804 sword OCI_DescriptorFree 00805 ( 00806 void *descp, 00807 CONST ub4 type 00808 ); 00809 00810 sword OCI_DescriptorArrayFree 00811 ( 00812 void **descp, 00813 CONST ub4 type, 00814 ub4 nb_elem 00815 ); 00816 00817 sword OCI_ObjectNew 00818 ( 00819 OCIEnv *env, 00820 OCIError *err, 00821 CONST OCISvcCtx *svc, 00822 OCITypeCode typecode, 00823 OCIType *tdo, 00824 dvoid *table, 00825 OCIDuration duration, 00826 boolean value, 00827 dvoid **instance 00828 ); 00829 00830 sword OCI_OCIObjectFree 00831 ( 00832 OCIEnv *env, 00833 OCIError *err, 00834 dvoid *instance, 00835 ub2 flags 00836 ); 00837 00838 /* --------------------------------------------------------------------------------------------- * 00839 * mutex.c 00840 * --------------------------------------------------------------------------------------------- */ 00841 00842 OCI_Mutex * OCI_MutexCreateInternal 00843 ( 00844 void 00845 ); 00846 00847 /* --------------------------------------------------------------------------------------------- * 00848 * number.c 00849 * --------------------------------------------------------------------------------------------- */ 00850 00851 boolean OCI_NumberGet 00852 ( 00853 OCI_Connection *con, 00854 void *number, 00855 uword size, 00856 uword type, 00857 int sqlcode, 00858 void *out_value 00859 ) 00860 ; 00861 00862 boolean OCI_NumberSet 00863 ( 00864 OCI_Connection *con, 00865 void *number, 00866 uword size, 00867 uword type, 00868 int sqlcode, 00869 void *in_value 00870 ); 00871 00872 boolean OCI_NumberFromString 00873 ( 00874 OCI_Connection *con, 00875 void *out_value, 00876 uword size, 00877 uword type, 00878 int sqlcode, 00879 const dtext *in_value, 00880 const mtext * fmt 00881 ); 00882 00883 boolean OCI_NumberToString 00884 ( 00885 OCI_Connection *con, 00886 void *number, 00887 uword type, 00888 int sqlcode, 00889 dtext *out_value, 00890 int out_value_size, 00891 const mtext * fmt 00892 ); 00893 00894 /* --------------------------------------------------------------------------------------------- * 00895 * object.c 00896 * --------------------------------------------------------------------------------------------- */ 00897 00898 boolean OCI_ObjectGetAttrInfo 00899 ( 00900 OCI_TypeInfo *typinf, 00901 int index, 00902 size_t *p_size, 00903 int *p_type 00904 ); 00905 00906 size_t OCI_ObjectGetStructSize 00907 ( 00908 OCI_TypeInfo *typinf 00909 ); 00910 00911 size_t OCI_ObjectGetUserStructSize 00912 ( 00913 OCI_TypeInfo *typinf 00914 ); 00915 00916 ub2 OCI_ObjectGetIndOffset 00917 ( 00918 OCI_TypeInfo *typinf, 00919 int index 00920 ); 00921 00922 OCI_Object * OCI_ObjectInit 00923 ( 00924 OCI_Connection *con, 00925 OCI_Object **pobj, 00926 void *handle, 00927 OCI_TypeInfo *typinf, 00928 OCI_Object *parent, 00929 int index, 00930 boolean reset 00931 ); 00932 00933 void OCI_ObjectReset 00934 ( 00935 OCI_Object *obj 00936 ); 00937 00938 int OCI_ObjectGetAttrIndex 00939 ( 00940 OCI_Object *obj, 00941 const mtext *attr, 00942 int type 00943 ); 00944 00945 void * OCI_ObjectGetAttr 00946 ( 00947 OCI_Object *obj, 00948 unsigned int index, 00949 OCIInd **pind 00950 ); 00951 00952 boolean OCI_ObjectSetNumber 00953 ( 00954 OCI_Object *obj, 00955 const mtext *attr, 00956 void *value, 00957 uword size, 00958 uword flag 00959 ); 00960 00961 boolean OCI_ObjectGetNumber 00962 ( 00963 OCI_Object *obj, 00964 const mtext *attr, 00965 void *value, 00966 uword size, 00967 uword flag 00968 ); 00969 00970 /* --------------------------------------------------------------------------------------------- * 00971 * pool.c 00972 * --------------------------------------------------------------------------------------------- */ 00973 00974 boolean OCI_PoolClose 00975 ( 00976 OCI_Pool *pool 00977 ); 00978 00979 /* --------------------------------------------------------------------------------------------- * 00980 * ref.c 00981 * --------------------------------------------------------------------------------------------- */ 00982 00983 OCI_Ref * OCI_RefInit 00984 ( 00985 OCI_Connection *con, 00986 OCI_TypeInfo *typeinf, 00987 OCI_Ref **pref, 00988 void *handle 00989 ); 00990 00991 boolean OCI_RefPin 00992 ( 00993 OCI_Ref *ref 00994 ); 00995 00996 boolean OCI_RefUnpin 00997 ( 00998 OCI_Ref *ref 00999 ); 01000 01001 /* --------------------------------------------------------------------------------------------- * 01002 * resultset.c 01003 * --------------------------------------------------------------------------------------------- */ 01004 01005 OCI_Resultset * OCI_ResultsetCreate 01006 ( 01007 OCI_Statement *stmt, 01008 int size 01009 ); 01010 01011 boolean OCI_ResultsetInit 01012 ( 01013 OCI_Resultset *rs 01014 ); 01015 01016 boolean OCI_ResultsetFree 01017 ( 01018 OCI_Resultset *rs 01019 ); 01020 01021 boolean OCI_FetchPieces 01022 ( 01023 OCI_Resultset *rs 01024 ); 01025 01026 boolean OCI_FetchData 01027 ( 01028 OCI_Resultset *rs, 01029 int mode, 01030 int offset, 01031 boolean *err 01032 ); 01033 01034 boolean OCI_FetchCustom 01035 ( 01036 OCI_Resultset *rs, 01037 int mode, 01038 int offset, 01039 boolean *err 01040 ); 01041 01042 #ifdef OCI_CHECK_DATASTRINGS 01043 01044 boolean OCI_ResultsetExpandStrings 01045 ( 01046 OCI_Resultset *rs 01047 ); 01048 01049 #endif 01050 01051 /* --------------------------------------------------------------------------------------------- * 01052 * statement.c 01053 * --------------------------------------------------------------------------------------------- */ 01054 01055 boolean OCI_BindFreeAll 01056 ( 01057 OCI_Statement *stmt 01058 ); 01059 01060 boolean OCI_BindCheck 01061 ( 01062 OCI_Statement *stmt 01063 ); 01064 01065 boolean OCI_BindReset 01066 ( 01067 OCI_Statement *stmt 01068 ); 01069 01070 boolean OCI_BindData 01071 ( 01072 OCI_Statement *stmt, 01073 void *data, 01074 ub4 size, 01075 const mtext *name, 01076 ub1 type, 01077 unsigned int code, 01078 unsigned int mode, 01079 unsigned int subtype, 01080 OCI_TypeInfo *typinf, 01081 unsigned int nbelem 01082 ); 01083 01084 int OCI_BindGetIndex 01085 ( 01086 OCI_Statement *stmt, 01087 const mtext *name 01088 ); 01089 01090 boolean OCI_FetchIntoUserVariables 01091 ( 01092 OCI_Statement *stmt, 01093 va_list args 01094 ); 01095 01096 boolean OCI_StatementReset 01097 ( 01098 OCI_Statement *stmt 01099 ); 01100 01101 boolean OCI_StatementClose 01102 ( 01103 OCI_Statement *stmt 01104 ); 01105 01106 OCI_Statement * OCI_StatementInit 01107 ( 01108 OCI_Connection *con, 01109 OCI_Statement **pstmt, 01110 OCIStmt *handle, 01111 OCI_Define *def 01112 ); 01113 01114 boolean OCI_BatchErrorClear 01115 ( 01116 OCI_Statement *stmt 01117 ); 01118 01119 boolean OCI_BatchErrorInit 01120 ( 01121 OCI_Statement *stmt 01122 ); 01123 01124 boolean OCI_API OCI_ExecuteInternal 01125 ( 01126 OCI_Statement *stmt, 01127 ub4 mode 01128 ); 01129 01130 /* --------------------------------------------------------------------------------------------- * 01131 * string.c 01132 * --------------------------------------------------------------------------------------------- */ 01133 01134 int OCI_StringCopy4to2bytes 01135 ( 01136 const unsigned int* src, 01137 size_t src_size, 01138 unsigned short * dst, 01139 size_t dst_size 01140 ); 01141 01142 int OCI_StringCopy2to4bytes 01143 ( 01144 const unsigned short* src, 01145 size_t src_size, 01146 unsigned int * dst, 01147 size_t dst_size 01148 ); 01149 01150 void * OCI_GetInputString 01151 ( 01152 void *src, 01153 int *size, 01154 size_t size_char_in, 01155 size_t size_char_out 01156 ); 01157 01158 void OCI_GetOutputString 01159 ( 01160 void *src, 01161 void *dest, 01162 int *size, 01163 size_t size_char_in, 01164 size_t size_char_out 01165 ); 01166 01167 void OCI_MoveString 01168 ( 01169 void *src, 01170 void *dst, 01171 int char_count, 01172 size_t size_char_in, 01173 size_t size_char_out 01174 ); 01175 01176 void OCI_ConvertString 01177 ( 01178 void *str, 01179 int char_count, 01180 size_t size_char_in, 01181 size_t size_char_out 01182 ); 01183 01184 void OCI_CopyString 01185 ( 01186 void *src, 01187 void *dest, 01188 int *size, 01189 size_t size_char_in, 01190 size_t size_char_out 01191 ); 01192 01193 void OCI_ReleaseMetaString 01194 ( 01195 void *ptr 01196 ); 01197 01198 void OCI_ReleaseDataString 01199 ( 01200 void *ptr 01201 ); 01202 01203 size_t OCI_StringLength 01204 ( 01205 void *ptr, 01206 size_t size_elem 01207 ); 01208 01209 int OCI_StringUTF8Length 01210 ( 01211 const char *str 01212 ); 01213 01214 #define OCI_GetInputMetaString(s, n) OCI_GetInputString((void *) s, n, \ 01215 sizeof(mtext), \ 01216 sizeof(omtext)) 01217 01218 #define OCI_GetOutputMetaString(s, d, n) OCI_GetOutputString((void *) s, d, n, \ 01219 sizeof(omtext), \ 01220 sizeof(mtext)) 01221 01222 #define OCI_GetInputDataString(s, n) OCI_GetInputString((void *) s, n, \ 01223 sizeof(dtext), \ 01224 sizeof(odtext)) 01225 01226 #define OCI_GetOutputDataString(s, d, n) OCI_GetOutputString((void *) s, d, n, \ 01227 sizeof(odtext), \ 01228 sizeof(dtext)) 01229 01230 #define OCI_GetDataFromMetaString(s, n) OCI_GetInputString((void *) s, n, \ 01231 sizeof(mtext), \ 01232 sizeof(dtext)) 01233 01234 #define OCI_GetMetaFromDataString(s, n) OCI_GetInputString((void *) s, n, \ 01235 sizeof(dtext), \ 01236 sizeof(mtext)) 01237 01238 void * OCI_StringFromStringPtr 01239 ( 01240 OCIEnv *env, 01241 OCIString *str, 01242 void **buf, 01243 int *buflen 01244 ); 01245 01246 boolean OCI_StringToStringPtr 01247 ( 01248 OCIEnv *env, 01249 OCIString **str, 01250 OCIError *err, 01251 void *value, 01252 void **buf, 01253 int *buflen 01254 ); 01255 01256 boolean OCI_StringGetFromAttrHandle 01257 ( 01258 OCI_Connection *con, 01259 void *handle, 01260 unsigned int type, 01261 unsigned int attr, 01262 mtext **str 01263 ); 01264 01265 boolean OCI_StringSetToAttrHandle 01266 ( 01267 OCI_Connection *con, 01268 void *handle, 01269 unsigned int type, 01270 unsigned int attr, 01271 mtext **str, 01272 const mtext *value 01273 ); 01274 01275 /* --------------------------------------------------------------------------------------------- * 01276 * subscription.c 01277 * --------------------------------------------------------------------------------------------- */ 01278 01279 boolean OCI_SubscriptionClose 01280 ( 01281 OCI_Subscription *sub 01282 ); 01283 01284 boolean OCI_SubscriptionDetachConnection 01285 ( 01286 OCI_Connection *con 01287 ); 01288 01289 /* --------------------------------------------------------------------------------------------- * 01290 * thread.c 01291 * --------------------------------------------------------------------------------------------- */ 01292 01293 void OCI_ThreadProc 01294 ( 01295 dvoid *arg 01296 ); 01297 01298 /* --------------------------------------------------------------------------------------------- * 01299 * threadkey.c 01300 * --------------------------------------------------------------------------------------------- */ 01301 01302 OCI_ThreadKey * OCI_ThreadKeyCreateInternal 01303 ( 01304 POCI_THREADKEYDEST destfunc 01305 ); 01306 01307 boolean OCI_ThreadKeyFree 01308 ( 01309 OCI_ThreadKey *key 01310 ); 01311 01312 boolean OCI_ThreadKeySet 01313 ( 01314 OCI_ThreadKey *key, 01315 void *value 01316 ); 01317 01318 boolean OCI_ThreadKeyGet 01319 ( 01320 OCI_ThreadKey* key, 01321 void **value 01322 ); 01323 01324 /* --------------------------------------------------------------------------------------------- * 01325 * timestamp.c 01326 * --------------------------------------------------------------------------------------------- */ 01327 01328 OCI_Timestamp * OCI_TimestampInit 01329 ( 01330 OCI_Connection *con, 01331 OCI_Timestamp **ptmsp, 01332 OCIDateTime *buffer, 01333 ub4 type 01334 ); 01335 01336 /* --------------------------------------------------------------------------------------------- * 01337 * transaction.c 01338 * --------------------------------------------------------------------------------------------- */ 01339 01340 boolean OCI_TransactionClose 01341 ( 01342 OCI_Transaction * trans 01343 ); 01344 01345 /* --------------------------------------------------------------------------------------------- * 01346 * typeinf.c 01347 * --------------------------------------------------------------------------------------------- */ 01348 01349 boolean OCI_TypeInfoClose 01350 ( 01351 OCI_TypeInfo *typeinf 01352 ); 01353 01354 #ifdef __cplusplus 01355 } 01356 #endif 01357 01358 #endif /* OCILIB_OCILIB_TYPES_H_INCLUDED */ 01359