00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
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
00048
00049
00050
00051
00052
00053
00054 boolean OCI_BindFree
00055 (
00056 OCI_Bind *bnd
00057 );
00058
00059
00060
00061
00062
00063 sb4 OCI_ProcInBind
00064 (
00065 dvoid *ictxp,
00066 OCIBind *bindp,
00067 ub4 iter,
00068 ub4 index,
00069 dvoid **bufpp,
00070 ub4 *alenp,
00071 ub1 *piecep,
00072 dvoid **indp
00073 );
00074
00075 sb4 OCI_ProcOutBind(
00076 dvoid *octxp,
00077 OCIBind *bindp,
00078 ub4 iter,
00079 ub4 index,
00080 dvoid **bufpp,
00081 ub4 **alenp,
00082 ub1 *piecep,
00083 void **indp,
00084 ub2 **rcodep
00085 );
00086
00087
00088
00089
00090
00091 OCI_Coll * OCI_CollInit
00092 (
00093 OCI_Connection *con,
00094 OCI_Coll **pcoll,
00095 void *handle,
00096 OCI_TypeInfo *typeinf
00097 );
00098
00099
00100
00101
00102
00103 boolean OCI_ColumnMap
00104 (
00105 OCI_Column *col,
00106 OCI_Statement *stmt
00107 );
00108
00109 boolean OCI_ColumnDescribe
00110 (
00111 OCI_Column *col,
00112 OCI_Connection *con,
00113 OCI_Statement *stmt,
00114 void *handle,
00115 int index,
00116 int ptype
00117 );
00118
00119
00120
00121
00122
00123 OCI_Connection * OCI_ConnectionAllocate
00124 (
00125 OCI_ConnPool *pool,
00126 const mtext *db,
00127 const mtext *user,
00128 const mtext *pwd,
00129 unsigned int mode
00130 );
00131
00132 boolean OCI_ConnectionDeallocate
00133 (
00134 OCI_Connection *con
00135 );
00136
00137 boolean OCI_ConnectionAttach
00138 (
00139 OCI_Connection *con
00140 );
00141
00142 boolean OCI_ConnectionLogon
00143 (
00144 OCI_Connection *con
00145 );
00146
00147 boolean OCI_ConnectionDetach
00148 (
00149 OCI_Connection *con
00150 );
00151
00152 boolean OCI_ConnectionLogOff
00153 (
00154 OCI_Connection *con
00155 );
00156
00157 boolean OCI_ConnectionClose
00158 (
00159 OCI_Connection *con
00160 );
00161
00162
00163
00164
00165
00166 boolean OCI_ConnPoolClose
00167 (
00168 OCI_ConnPool *pool
00169 );
00170
00171
00172
00173
00174
00175 OCI_Date * OCI_DateInit
00176 (
00177 OCI_Connection *con,
00178 OCI_Date **pdate,
00179 OCIDate *buffer,
00180 boolean allocate,
00181 boolean ansi
00182 );
00183
00184
00185
00186
00187
00188 OCI_Define * OCI_GetDefine
00189 (
00190 OCI_Resultset *rs,
00191 unsigned int index
00192 );
00193
00194 int OCI_GetDefineIndex
00195 (
00196 OCI_Resultset *rs,
00197 const mtext *name
00198 );
00199
00200 boolean OCI_DefineGetNumber
00201 (
00202 OCI_Resultset *rs,
00203 unsigned int index,
00204 void *value,
00205 uword type,
00206 uword size
00207 );
00208
00209 boolean OCI_DefineAlloc
00210 (
00211 OCI_Define *def
00212 );
00213
00214 boolean OCI_DefineDef
00215 (
00216 OCI_Define *def
00217 );
00218
00219 void * OCI_DefineGetData
00220 (
00221 OCI_Define *def
00222 );
00223
00224
00225
00226
00227
00228 boolean OCI_ElemGetNumber
00229 (
00230 OCI_Elem *elem,
00231 void *value,
00232 uword size,
00233 uword flag
00234 );
00235
00236 boolean OCI_ElemSetNumber
00237 (
00238 OCI_Elem *elem,
00239 void *value,
00240 uword size,
00241 uword flag
00242 );
00243
00244 OCI_Elem * OCI_ElemInit
00245 (
00246 OCI_Connection *con,
00247 OCI_Elem **pelem,
00248 void *handle,
00249 OCIInd *pind,
00250 OCI_TypeInfo *typeinf
00251 );
00252
00253 boolean OCI_ElemSetNullIndicator
00254 (
00255 OCI_Elem *elem,
00256 OCIInd value
00257 );
00258
00259
00260
00261
00262
00263 void OCI_ErrorFree
00264 (
00265 OCI_Error *err
00266 );
00267
00268 void OCI_ErrorReset
00269 (
00270 OCI_Error *err
00271 );
00272
00273 OCI_Error * OCI_ErrorGet
00274 (
00275 boolean check
00276 );
00277
00278 OCI_Error * OCI_ErrorCreate
00279 (
00280 void
00281 );
00282
00283
00284
00285
00286
00287 OCI_Error * OCI_ExceptionGetError(void);
00288
00289 void OCI_ExceptionRaise
00290 (
00291 OCI_Error *err
00292 );
00293
00294 void OCI_ExceptionOCI
00295 (
00296 OCIError *p_err,
00297 OCI_Connection *con,
00298 OCI_Statement *stmt
00299 );
00300
00301 void OCI_ExceptionMemory
00302 (
00303 int type,
00304 size_t nb_bytes,
00305 OCI_Connection *con,
00306 OCI_Statement *stmt
00307 );
00308
00309 void OCI_ExceptionNotAvailable
00310 (
00311 OCI_Connection *con,
00312 int feature
00313 );
00314
00315 void OCI_ExceptionNullPointer
00316 (
00317 int type
00318 );
00319
00320 void OCI_ExceptionDatatypeNotSupported
00321 (
00322 OCI_Connection *con,
00323 OCI_Statement *stmt,
00324 int code
00325 );
00326
00327 void OCI_ExceptionParsingToken
00328 (
00329 OCI_Connection *con,
00330 OCI_Statement *stmt,
00331 mtext token
00332 );
00333
00334 void OCI_ExceptionMappingArgument
00335 (
00336 OCI_Connection *con,
00337 OCI_Statement *stmt,
00338 int arg
00339 );
00340
00341 void OCI_ExceptionNotInitialized(void);
00342
00343 void OCI_ExceptionLoadingSharedLib(void);
00344
00345 void OCI_ExceptionLoadingSymbols(void);
00346
00347 void OCI_ExceptionNotMultithreaded(void);
00348
00349 void OCI_ExceptionOutOfBounds
00350 (
00351 OCI_Connection *con,
00352 int value
00353 );
00354
00355 void OCI_ExceptionUnfreedData
00356 (
00357 int type_elem,
00358 int nb_elem
00359 );
00360
00361 void OCI_ExceptionMaxBind
00362 (
00363 OCI_Statement *stmt
00364 );
00365
00366 void OCI_ExceptionAttributeNotFound
00367 (
00368 OCI_Connection *con,
00369 const mtext *attr
00370 );
00371
00372 void OCI_ExceptionMinimumValue
00373 (
00374 OCI_Connection *con,
00375 OCI_Statement *stmt,
00376 int min
00377 );
00378
00379 void OCI_ExceptionTypeNotCompatible
00380 (
00381 OCI_Connection *con
00382 );
00383
00384 void OCI_ExceptionStatementState
00385 (
00386 OCI_Statement *stmt,
00387 int state
00388 );
00389
00390 void OCI_ExceptionStatementNotScrollable
00391 (
00392 OCI_Statement *stmt
00393 );
00394
00395 void OCI_ExceptionBindAlreadyUsed
00396 (
00397 OCI_Statement *stmt,
00398 const mtext * bind
00399 );
00400
00401 void OCI_ExceptionBindArraySize
00402 (
00403 OCI_Statement *stmt,
00404 unsigned int maxsize,
00405 unsigned int cursize,
00406 unsigned int newsize
00407 );
00408
00409 void OCI_ExceptionDirPathColNotFound
00410 (
00411 OCI_DirPath *dp,
00412 const mtext * column,
00413 const mtext *table
00414 );
00415
00416 void OCI_ExceptionDirPathState
00417 (
00418 OCI_DirPath *dp,
00419 int state
00420 );
00421
00422 void OCI_ExceptionOCIEnvironment(void);
00423
00424
00425
00426
00427
00428
00429 OCI_File * OCI_FileInit
00430 (
00431 OCI_Connection *con,
00432 OCI_File **pfile,
00433 OCILobLocator *handle,
00434 ub4 type
00435 );
00436
00437 boolean OCI_FileGetInfo
00438 (
00439 OCI_File *file
00440 );
00441
00442
00443
00444
00445
00446 int OCI_ParseSqlFmt
00447 (
00448 OCI_Statement *stmt,
00449 mtext *buffer,
00450 const mtext *format,
00451 va_list *pargs
00452 );
00453
00454
00455
00456
00457
00458 unsigned int OCI_HashCompute
00459 (
00460 OCI_HashTable *table,
00461 const mtext *str
00462 );
00463
00464 boolean OCI_HashAdd
00465 (
00466 OCI_HashTable *table,
00467 const mtext *key,
00468 OCI_Variant value,
00469 unsigned int type
00470 );
00471
00472
00473
00474
00475
00476 OCI_Interval * OCI_IntervalInit
00477 (
00478 OCI_Connection *con,
00479 OCI_Interval **pitv,
00480 OCIInterval *buffer,
00481 ub4 type
00482 );
00483
00484
00485
00486
00487
00488 void OCI_SetLastError
00489 (
00490 OCI_Error err
00491 );
00492
00493 void OCI_SetStatus
00494 (
00495 boolean res
00496 );
00497
00498 boolean OCI_KeyMapFree(void);
00499
00500
00501
00502
00503
00504 OCI_List * OCI_ListCreate
00505 (
00506 int type
00507 );
00508
00509 boolean OCI_ListFree
00510 (
00511 OCI_List *list
00512 );
00513
00514 OCI_Item * OCI_ListCreateItem
00515 (
00516 int type,
00517 int size
00518 );
00519
00520 OCI_Item * OCI_ListAppend
00521 (
00522 OCI_List *list,
00523 int size
00524 );
00525
00526 boolean OCI_ListClear
00527 (
00528 OCI_List *list
00529 );
00530
00531 boolean OCI_ListForEach
00532 (
00533 OCI_List *list,
00534 boolean (*proc)(void *)
00535 );
00536
00537 boolean OCI_ListRemove
00538 (
00539 OCI_List *list,
00540 void *data
00541 );
00542
00543
00544
00545
00546
00547 OCI_Lob * OCI_LobInit
00548 (
00549 OCI_Connection *con,
00550 OCI_Lob **plob,
00551 OCILobLocator *handle,
00552 ub4 type
00553 );
00554
00555
00556
00557
00558
00559 OCI_Long * OCI_LongInit
00560 (
00561 OCI_Statement *stmt,
00562 OCI_Long **plg,
00563 OCI_Define *def,
00564 unsigned int type
00565 );
00566
00567
00568
00569
00570
00571 void * OCI_MemAlloc
00572 (
00573 int ptr_type,
00574 int block_size,
00575 int block_count,
00576 boolean zero_fill
00577 );
00578
00579 void * OCI_MemRealloc
00580 (
00581 void * ptr_mem,
00582 int ptr_type,
00583 int block_size,
00584 int block_count
00585 );
00586
00587 void OCI_MemFree
00588 (
00589 void * ptr_mem
00590 );
00591
00592 sword OCI_HandleAlloc
00593 (
00594 CONST dvoid *parenth,
00595 dvoid **hndlpp,
00596 CONST ub4 type,
00597 CONST size_t xtramem_sz,
00598 dvoid **usrmempp
00599 );
00600
00601 sword OCI_HandleFree
00602 (
00603 dvoid *hndlp,
00604 CONST ub4 type
00605 );
00606
00607 sword OCI_DescriptorAlloc
00608 (
00609 CONST dvoid *parenth,
00610 dvoid **descpp,
00611 CONST ub4 type,
00612 CONST size_t xtramem_sz,
00613 dvoid **usrmempp
00614 );
00615
00616 sword OCI_DescriptorFree
00617 (
00618 void *descp, CONST ub4 type
00619 );
00620
00621 sword OCI_ObjectNew
00622 (
00623 OCIEnv *env,
00624 OCIError *err,
00625 CONST OCISvcCtx *svc,
00626 OCITypeCode typecode,
00627 OCIType *tdo,
00628 dvoid *table,
00629 OCIDuration duration,
00630 boolean value,
00631 dvoid **instance
00632 );
00633
00634 sword OCI_OCIObjectFree
00635 (
00636 OCIEnv *env,
00637 OCIError *err,
00638 dvoid *instance,
00639 ub2 flags
00640 );
00641
00642
00643
00644
00645
00646
00647 OCI_Mutex * OCI_MutexCreateInternal(void);
00648
00649
00650
00651
00652
00653 boolean OCI_NumberGet
00654 (
00655 OCI_Connection *con,
00656 OCINumber *data,
00657 void *value,
00658 uword size,
00659 uword flag)
00660 ;
00661
00662 boolean OCI_NumberSet
00663 (
00664 OCI_Connection *con,
00665 OCINumber *data,
00666 void *value,
00667 uword size,
00668 uword flag
00669 );
00670
00671 boolean OCI_NumberConvertStr
00672 (
00673 OCI_Connection *con,
00674 OCINumber *num,
00675 const dtext *str,
00676 int str_size,
00677 const mtext* fmt,
00678 ub4 fmt_size
00679 );
00680
00681 boolean OCI_NumberGetFromStr
00682 (
00683 OCI_Connection *con,
00684 void *value,
00685 uword size,
00686 uword type,
00687 const dtext *str,
00688 int str_size,
00689 const mtext* fmt,
00690 ub4 fmt_size
00691 );
00692
00693
00694
00695
00696
00697 void OCI_ObjectReset
00698 (
00699 OCI_Object *obj
00700 );
00701
00702 boolean OCI_ObjectGetAttr
00703 (
00704 OCI_Object *obj,
00705 const mtext *attr,
00706 void ** p_value,
00707 OCIInd* p_ind,
00708 OCIType **p_tdo
00709 );
00710
00711 boolean OCI_ObjectSetAttr
00712 (
00713 OCI_Object *obj,
00714 const mtext *attr,
00715 void * value,
00716 OCIInd ind
00717 );
00718
00719 boolean OCI_ObjectSetNumber
00720 (
00721 OCI_Object *obj,
00722 const mtext *attr,
00723 void *value,
00724 uword size, uword flag
00725 );
00726
00727 boolean OCI_ObjectGetNumber
00728 (
00729 OCI_Object *obj,
00730 const mtext *attr,
00731 void *value,
00732 uword size, uword flag
00733 );
00734
00735 int OCI_ObjectGetIndex
00736 (
00737 OCI_Object *obj,
00738 const mtext *attr,
00739 int type
00740 );
00741
00742 ub2 OCI_GetIndTabIndex
00743 (
00744 OCI_TypeInfo *typeinf,
00745 int index
00746 );
00747
00748 OCI_Object * OCI_ObjectInit
00749 (
00750 OCI_Connection *con,
00751 OCI_Object **pobj,
00752 void *handle,
00753 OCI_TypeInfo *typinf,
00754 OCI_Object *parent,
00755 int index,
00756 boolean reset
00757 );
00758
00759
00760
00761
00762
00763 OCI_Ref * OCI_RefInit
00764 (
00765 OCI_Connection *con,
00766 OCI_TypeInfo *typeinf,
00767 OCI_Ref **pref,
00768 void *handle
00769 );
00770
00771 boolean OCI_RefPin
00772 (
00773 OCI_Ref *ref
00774 );
00775
00776 boolean OCI_RefUnpin
00777 (
00778 OCI_Ref *ref
00779 );
00780
00781
00782
00783
00784
00785 OCI_Resultset * OCI_ResultsetCreate
00786 (
00787 OCI_Statement *stmt,
00788 int size
00789 );
00790
00791 boolean OCI_ResultsetFree
00792 (
00793 OCI_Resultset *rs
00794 );
00795
00796 boolean OCI_FetchPieces
00797 (
00798 OCI_Resultset *rs
00799 );
00800
00801 boolean OCI_FetchData
00802 (
00803 OCI_Resultset *rs,
00804 int mode,
00805 int offset,
00806 boolean *err
00807 );
00808
00809 boolean OCI_FetchCustom
00810 (
00811 OCI_Resultset *rs,
00812 int mode,
00813 int offset,
00814 boolean *err
00815 );
00816
00817 #ifdef OCI_CHECK_DATASTRINGS
00818
00819 boolean OCI_ResultsetExpandStrings
00820 (
00821 OCI_Resultset *rs
00822 );
00823
00824 #endif
00825
00826
00827
00828
00829
00830 boolean OCI_BindFreeAll
00831 (
00832 OCI_Statement *stmt
00833 );
00834
00835 boolean OCI_BindCheck
00836 (
00837 OCI_Statement *stmt
00838 );
00839
00840 boolean OCI_BindReset
00841 (
00842 OCI_Statement *stmt
00843 );
00844
00845 boolean OCI_BindData
00846 (
00847 OCI_Statement *stmt,
00848 void *data,
00849 ub4 size,
00850 const mtext *name,
00851 ub1 type,
00852 unsigned int code,
00853 unsigned int mode,
00854 unsigned int subtype,
00855 OCI_TypeInfo *typinf,
00856 unsigned int nbelem
00857 );
00858
00859 int OCI_BindGetIndex
00860 (
00861 OCI_Statement *stmt,
00862 const mtext *name
00863 );
00864
00865 boolean OCI_FetchIntoUserVariables
00866 (
00867 OCI_Statement *stmt,
00868 va_list args
00869 );
00870
00871 boolean OCI_StatementReset
00872 (
00873 OCI_Statement *stmt
00874 );
00875
00876 boolean OCI_StatementClose
00877 (
00878 OCI_Statement *stmt
00879 );
00880
00881 OCI_Statement * OCI_StatementInit
00882 (
00883 OCI_Connection *con,
00884 OCI_Statement **pstmt,
00885 OCIStmt *handle,
00886 OCI_Define *def
00887 );
00888
00889 boolean OCI_BatchErrorClear
00890 (
00891 OCI_Statement *stmt
00892 );
00893
00894 boolean OCI_BatchErrorInit
00895 (
00896 OCI_Statement *stmt
00897 );
00898
00899
00900
00901
00902
00903
00904 int OCI_StringCopy4to2bytes
00905 (
00906 const unsigned int* src,
00907 int src_size,
00908 unsigned short* dst,
00909 int dst_size
00910 );
00911
00912 int OCI_StringCopy2to4bytes
00913 (
00914 const unsigned short* src,
00915 int src_size,
00916 unsigned int* dst,
00917 int dst_size
00918 );
00919
00920
00921 void * OCI_GetInputString
00922 (
00923 void *src,
00924 int *size,
00925 int size_char_in,
00926 int size_char_out
00927 );
00928
00929 void OCI_GetOutputString
00930 (
00931 void *src,
00932 void *dest,
00933 int *size,
00934 int size_char_in,
00935 int size_char_out
00936 );
00937
00938 void OCI_MoveString
00939 (
00940 void *src,
00941 void *dst,
00942 int char_count,
00943 int size_char_in,
00944 int size_char_out
00945 );
00946
00947 void OCI_ConvertString
00948 (
00949 void *str,
00950 int char_count,
00951 int size_char_in,
00952 int size_char_out
00953 );
00954
00955 void OCI_CopyString
00956 (
00957 void *src,
00958 void *dest,
00959 int *size,
00960 int size_char_in,
00961 int size_char_out
00962 );
00963
00964 void OCI_ReleaseMetaString
00965 (
00966 void *ptr
00967 );
00968
00969 void OCI_ReleaseDataString
00970 (
00971 void *ptr
00972 );
00973
00974 int OCI_StringLength
00975 (
00976 void *ptr,
00977 int size_elem
00978 );
00979
00980
00981 #define OCI_GetInputMetaString(s, n) OCI_GetInputString((void *) s, n, \
00982 sizeof(mtext), \
00983 sizeof(omtext))
00984
00985 #define OCI_GetOutputMetaString(s, d, n) OCI_GetOutputString((void *) s, d, n, \
00986 sizeof(omtext), \
00987 sizeof(mtext))
00988
00989 #define OCI_GetInputDataString(s, n) OCI_GetInputString((void *) s, n, \
00990 sizeof(dtext), \
00991 sizeof(odtext))
00992
00993 #define OCI_GetOutputDataString(s, d, n) OCI_GetOutputString((void *) s, d, n, \
00994 sizeof(odtext), \
00995 sizeof(dtext))
00996
00997 void * OCI_StringFromStringPtr
00998 (
00999 OCIString *str,
01000 void ** buf,
01001 int *buflen
01002 );
01003
01004 boolean OCI_StringToStringPtr
01005 (
01006 OCIString **str,
01007 OCIError *err,
01008 void *value,
01009 void **buf,
01010 int *buflen
01011 );
01012
01013
01014
01015
01016
01017 void OCI_ThreadProc
01018 (
01019 dvoid *arg
01020 );
01021
01022
01023
01024
01025
01026 OCI_ThreadKey * OCI_ThreadKeyCreateInternal
01027 (
01028 POCI_THREADKEYDEST destfunc
01029 );
01030
01031 boolean OCI_ThreadKeyFree
01032 (
01033 OCI_ThreadKey *key
01034 );
01035
01036 boolean OCI_ThreadKeySet
01037 (
01038 OCI_ThreadKey *key,
01039 void *value
01040 );
01041
01042 boolean OCI_ThreadKeyGet
01043 (
01044 OCI_ThreadKey* key,
01045 void **value
01046 );
01047
01048
01049
01050
01051
01052 OCI_Timestamp * OCI_TimestampInit
01053 (
01054 OCI_Connection *con,
01055 OCI_Timestamp **ptmsp,
01056 OCIDateTime *buffer,
01057 ub4 type
01058 );
01059
01060
01061
01062
01063
01064 boolean OCI_TransactionClose
01065 (
01066 OCI_Transaction * trans
01067 );
01068
01069
01070
01071
01072
01073 boolean OCI_TypeInfoClose
01074 (
01075 OCI_TypeInfo *typeinf
01076 );
01077
01078
01079 #ifdef __cplusplus
01080 }
01081 #endif
01082
01083
01084 #endif
01085