ort.inc 127 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676
  1. {
  2. Automatically converted by H2Pas 1.0.0 from ort.h
  3. The following command line parameters were used:
  4. -p
  5. -D
  6. -l
  7. jojo.so
  8. ort.h
  9. }
  10. { @(#)ort.h 1.44 95/07/07 }
  11. { Copyright (c) 1994, 2003, Oracle Corporation. All rights reserved. }
  12. {
  13. NAME
  14. ORT - ORacle's external open Type interface to the open type manager (OTM)
  15. DESCRIPTION
  16. The open type manager interface includes dynamic type operations to
  17. create, delete, update, and access types. See the "Functional
  18. Specification for Oracle Object Call Interface (Objects Project),
  19. Version 1.0" for a user level description of the OTM. For a more
  20. detailed description, see the "Component Document for the Open Type
  21. Manager, Version 1.0".
  22. NOTE: MOST Of the functions in this header file are being desupported.
  23. Please use the OCIDescribeAny interface as described in oci.h
  24. instead.
  25. The OCIType, OCITypeElem, OCITypeMethod abstract types continue
  26. to be supported. The only two functions that remain to be documented
  27. are OCITypeArrayByName and OCITypeArrayByRef.
  28. All obsolete types/functions are marked accordingly below.
  29. RELATED DOCUMENTS
  30. For the functional specification for the OTM, see:
  31. [1] Kotsovolos, Susan, "Functional Specification for Oracle Object
  32. Call Interface (Objects Project), Version 1.0", Oracle
  33. Corporation, February 1995.
  34. For the internal design of the OTM, see the following:
  35. [2] Kotsovolos, Susan, "Component Document for the Open Type Manager",
  36. Oracle Corporation, November 1994.
  37. [3] Kotsovolos, Susan, "Design for The Open Type Manager, Oracle
  38. Object Management Subsystem Version 1.0", Oracle Corporation,
  39. March 1994.
  40. [4] Kotsovolos, Susan and Tin A. Nguyen, "The Open Type Manager",
  41. Oracle Corporation, March 1994.
  42. [5] Kotsovolos, Susan and Tin A. Nguyen, "Schema Evolution",
  43. Oracle Corporation, March 1994.
  44. For a description of the types the OTM must support, see:
  45. [6] Nguyen, Tin A., "The Open Type System", Oracle Corporation,
  46. February 1994.
  47. INSPECTION STATUS
  48. Inspection date:
  49. Inspection status:
  50. Estimated increasing cost defects per page:
  51. Rule sets:
  52. ACCEPTANCE REVIEW STATUS
  53. Review date:
  54. Review status:
  55. Reviewers:
  56. **** ALL OBSOLETE FUNCTIONS/TYPES ARE MARKED ACCORDINGLY ***
  57. EXPORT FUNCTIONS
  58. None
  59. PUBLIC DATA STRUCTURES
  60. OCIType - type descriptor in the object cache
  61. OCITypeElem - type element descriptor in the object cache
  62. (used for attributes and paramters)
  63. OCITypeCode - Open Type System type code.
  64. OCITypeMethod - method descriptor in the object cache
  65. OCITypeParamMode - parameter modes (ie. IN, IN-OUT etc)
  66. PUBLIC FUNCTIONS
  67. ITERATOR (for OCITypeAttrNext and OCITypeMethodNext)
  68. OCITypeIterNew - ** OBSOLETE ** Create new instance of an iteraton.
  69. OCITypeIterSet - ** OBSOLETE ** Initialize iterator.
  70. OCITypeIterFree - ** OBSOLETE ** Free instance of iterator.
  71. TYPE GET
  72. OCITypeByName - ** OBSOLETE ** Get a type by name.
  73. OCITypeArrayByName - Get an array of types by their names.
  74. OCITypeByRef - ** OBSOLETE ** Get a type by its CREF.
  75. OCITypeArrayByRef - Get an array of types by their CREFs.
  76. TYPE ACCESSORS
  77. OCITypeName - ** OBSOLETE ** OCI Get a type's name.
  78. OCITypeSchema - ** OBSOLETE ** OCI Get a type's schema name.
  79. OCITypeTypeCode - ** OBSOLETE ** OCI Get a type's type code.
  80. OCITypeVersion - ** OBSOLETE ** OCI Get a Type's user-readable Version.
  81. OCITypeAttrs - ** OBSOLETE ** OCI Get a Type's Number of Attributes.
  82. OCITypeMethods - ** OBSOLETE ** OCI Get a Type's Number of Methods.
  83. TYPE ELEMENT ACCESSORS (they represent attributes/parameters/results)
  84. OCITypeElemName - ** OBSOLETE ** Get a type element's (only for
  85. attributes) name.
  86. OCITypeElemType - ** OBSOLETE ** Get a type element's type
  87. descriptor.
  88. OCITypeElemTypeCode - ** OBSOLETE ** Get a type element's typecode.
  89. OCITypeElemParameterizedType - ** OBSOLETE ** Get a type element's
  90. parameterized type's type descriptor.
  91. OCITypeElemNumPrec - ** OBSOLETE ** Get a number's precision.
  92. OCITypeElemNumScale - ** OBSOLETE ** Get a decimal or oracle Number's
  93. Scale
  94. OCITypeElemCharSetID - ** OBSOLETE ** Get a fixed or variable length
  95. string's character set ID.
  96. OCITypeElemCharSetForm - ** OBSOLETE ** Get a fixed or variable length
  97. string's character set form (how
  98. character set information has
  99. been specified).
  100. OCITypeElemLength - ** OBSOLETE ** Get a raw, fixed or variable
  101. length string's length.
  102. OCITypeElemParamMode - ** OBSOLETE ** Get element's parameter's mode
  103. (only valid for parameter).
  104. OCITypeElemDefaultValue - ** OBSOLETE ** Get element's Default Value.
  105. ATTRIBUTE ACCESSORS
  106. OCITypeAttrByName - ** OBSOLETE ** Get an Attribute by Name.
  107. OCITypeAttrNext - ** OBSOLETE ** Get an Attribute by Iteration.
  108. COLLECTION ACCESSORS
  109. OCITypeCollTypeCode - ** OBSOLETE ** Get a named collection's typecode.
  110. OCITypeCollElem - ** OBSOLETE ** Get a named collection's element's
  111. type element information.
  112. OCITypeCollSize - ** OBSOLETE ** Get a named collection's size in
  113. number of elements.
  114. METHOD ACCESSORS
  115. OCITypeMethodOverload - ** OBSOLETE ** Get number of overloaded methods
  116. with the given method name.
  117. (no direct equivalent for
  118. OCIDescribe interface)
  119. OCITypeMethodByName - ** OBSOLETE ** Get one or more methods by name.
  120. OCITypeMethodNext - ** OBSOLETE ** Iterate to the next method to
  121. retrieve.
  122. OCITypeMethodName - ** OBSOLETE ** Get method's name.
  123. OCITypeMethodEncap - ** OBSOLETE ** Get method's encapsulation level.
  124. OCITypeMethodFlags - ** OBSOLETE ** et method's flags.
  125. OCITypeMethodMap - ** OBSOLETE ** Get type's map function.
  126. OCITypeMethodOrder - ** OBSOLETE ** Get type's order function.
  127. OCITypeMethodParams - ** OBSOLETE ** Get a method's number of
  128. parameters.
  129. RESULT ACCESSORS
  130. OCITypeResult - ** OBSOLETE ** OCI Get a method's Result.
  131. See also ATTRIBUTE/PARAMETER/RESULT TYPE ACCESSORS.
  132. PARAMETER ACCESSORS
  133. OCITypeParamByPos - ** OBSOLETE ** Get a Parameter in a method By
  134. Position.
  135. OCITypeParamByName - ** OBSOLETE ** Get a Parameter in a method By Name.
  136. OCITypeParamPos - ** OBSOLETE ** Get a Parameter's PoSition in a
  137. method.
  138. CALL GRAPHS:
  139. Only type accessors are supported for 8.0.
  140. ** OBSOLETE ** please use OCIDescribe interface
  141. TYPE ACCESSOR EXAMPLE
  142. CREATE TYPE CAR
  143. (
  144. name vstring,
  145. age number,
  146. number car_age; /o Oracle number o/
  147. weight car_weight; /o abstract type o/
  148. PUBLIC:
  149. /o methods o/
  150. car(orlvs a_name, number an_age, WEIGHT a_weight);
  151. ~car();
  152. inline number get_age() const;
  153. /o relative ordering (map) functions o/
  154. number car_map
  155. );
  156. /o the following code accesses the type created above o/
  157. ub1 meth_flags;
  158. ub4 i, j;
  159. ub4 text_len, position;
  160. ub4 count;
  161. ub4 length;
  162. OCITypeCode typecode;
  163. OCIRef *attr_ref;
  164. OCIRef *param_ref;
  165. OCIType *tdo, new_tdo, final_tdo;
  166. OCITypeElem *elem;
  167. OCITypeIter *iterator_ort;
  168. oratext (*names)[];
  169. ub4 lengths[];
  170. ub4 *positions;
  171. oratext *name;
  172. oratext name_buffer[M_IDEN];
  173. /o initialize the references o/
  174. DISCARD orlrini(env, err, (dvoid *)&attr_ref);
  175. DISCARD orlrini(env, err, (dvoid *)&param_ref);
  176. /o ----------------- GET INFORMATION ABOUT A TYPE ----------------- o/
  177. /o start a transaction o/
  178. /o Pin the type until the end of the transaction. Pinning the type is
  179. o required before using any type accessors.
  180. o/
  181. if (OCITypeByName(env, err, svc, (oratext *)0, 0, "CAR", strlen("CAR"),
  182. OCI_DURATION_TRANS, &car_ref, &car_tdo) != OCI_SUCCESS)
  183. /o error o/ ;
  184. /o get the type's name o/
  185. if (!memcmp(OCITypeName(env, err, car_tdo, &text_len), "person",
  186. text_len))
  187. /o do something o/ ;
  188. /o get the type's schema name o/
  189. if (!memcmp(OCITypeSchema(env, err, car_tdo, &text_len), "john",
  190. text_len))
  191. /o do something o/ ;
  192. /o get the type code of the type o/
  193. if (OCITypeTypeCode(env, err, car_tdo) == OCI_TYPECODE_ADT)
  194. /o do something o/ ;
  195. /o get the type version o/
  196. if (!memcmp(OCITypeVersion(env, err, car_tdo, &text_len), "1", text_len))
  197. /o do something o/ ;
  198. /o ------- GET FLATTENED POSITION OF AN ATTRIBUTES IN A TYPE ------- o/
  199. names = malloc(sizeof(oratext *) * 2);
  200. names[0] = malloc(strlen("car_weight"));
  201. names[1] = malloc(strlen("ounces"));
  202. memcpy(names[0], "car_weight", strlen("car_weight"));
  203. memcpy(names[1], "ounces", strlen("ounces"));
  204. lengths = malloc(sizeof(ub4) * 2);
  205. lengths[0] = strlen("car_weight");
  206. lengths[1] = strlen("ounces");
  207. /o ---------- GET IMMEDIATE ATTRIBUTES IN A TYPE ---------- o/
  208. /o loop through all attributes in the type with iterator o/
  209. if (OCITypeIterNew(env, err, car_tdo, &iterator_ort) != OCI_SUCCESS)
  210. /o do something o/
  211. while (OCITypeAttrNext(env, err, iterator_ort, &ado) != OCI_NO_DATA)
  212. /o get the attribute's name o/
  213. if (!memcmp(OCITypeElemName(env, err, ado, &text_len),
  214. "tiger", text_len))
  215. /o do something o/ ;
  216. /o get the attribute's type descriptor o/
  217. if (OCITypeElemType(env, err, ado, &tdo) != OCI_SUCCESS)
  218. /o error o/ ;
  219. /o get the attribute's type code o/
  220. typecode = OCITypeElemTypeCode(env, err, ado);
  221. switch (typecode)
  222. /o scalar types o/
  223. case OCI_TYPECODE_DATE: /o date o/
  224. case OCI_TYPECODE_SIGNED8: /o byte o/
  225. case OCI_TYPECODE_SIGNED16: /o short o/
  226. case OCI_TYPECODE_UNSIGNED8: /o unsigned byte o/
  227. case OCI_TYPECODE_UNSIGNED16: /o unsigned short o/
  228. case OCI_TYPECODE_OCTET: /o octet o/
  229. case OCI_TYPECODE_TABLE: /o nested table o/
  230. case OCI_TYPECODE_CLOB: /o character lob o/
  231. case OCI_TYPECODE_BLOB: /o binary lob o/
  232. case OCI_TYPECODE_CFILE: /o character file object o/
  233. case OCI_TYPECODE_BFILE: /o binary file object o/
  234. /o do something o/
  235. break;
  236. /o number types o/
  237. case OCI_TYPECODE_NUMBER: /o oracle number o/
  238. case OCI_TYPECODE_DECIMAL: /o decimal o/
  239. /o get the scale of the number o/
  240. if (OCITypeElemNumScale(env, err, ado) == 3)
  241. /o do something o/ ;
  242. /o fall through to get the precision o/
  243. case OCI_TYPECODE_FLOAT: /o float o/
  244. case OCI_TYPECODE_SIGNED32: /o long o/
  245. case OCI_TYPECODE_UNSIGNED32: /o unsigned long o/
  246. case OCI_TYPECODE_REAL: /o real o/
  247. case OCI_TYPECODE_DOUBLE: /o double o/
  248. /o get the precision of the number o/
  249. if (OCITypeElemNumPrec(env, err, ado) == 2)
  250. /o do something o/ ;
  251. break;
  252. /o string types o/
  253. case OCI_TYPECODE_CHAR: /o fixed length string o/
  254. case OCI_TYPECODE_VARCHAR2: /o variable length string o/
  255. case OCI_TYPECODE_RAW: /o raw o/
  256. /o get the length of the fixed or variable length string o/
  257. if (OCITypeElemLength(env, err, ado) < 100)
  258. /o do something o/
  259. break;
  260. /o parameterized types o/
  261. case OCI_TYPECODE_REF: /o reference o/
  262. case OCI_TYPECODE_PTR: /o pointer o/
  263. /o get the type stored in the parameterized type o/
  264. if (OCITypeElemParameterizedType(env, err, ado, &tdo)
  265. != OCI_SUCCESS)
  266. /o error o/ ;
  267. /o do something o/
  268. if (OCI_TYPEELEM_IS_REF(OCITypeElemFlags(env, err, ado)))...
  269. break;
  270. /o domain type o/
  271. case OCI_TYPECODE_NAMEDCOLLECTION:
  272. switch (OCITypeCollTypeCode(env, err, tdo))
  273. case OCI_TYPECODE_VARRAY: /o variable array o/
  274. ub4 num_elems;
  275. OCIType *element_type;
  276. /o get the number of elements in the farray or the maximum number
  277. o of elements in the varray.
  278. o/
  279. OCITypeCollSize(env, err, tdo, &num_elems);
  280. /o get the type of the array o/
  281. OCITypeElemType(env, err, tdo, &element_type);
  282. break;
  283. case OCI_TYPECODE_TABLE: /o multiset o/
  284. OCIType *table_type;
  285. /o get the type of the multiset o/
  286. OCITypeElemType(env, err, tdo, &table_type);
  287. /o do something o/
  288. /o abstract type o/
  289. case OCI_TYPECODE_ADT: /o abstract data type o/
  290. /o get the adt information o/
  291. if (OCITypeElemType(env, err, ado, &tdo) != OCI_SUCCESS)
  292. /o error o/ ;
  293. /o do something o/
  294. break;
  295. default:
  296. DISCARD printf("Error: invalid type code\n");
  297. /o end of typecode switch o/
  298. /o end of loop through all attributes in a type o/
  299. /o ------------ GET THE IMMEDIATE METHODS OF A TYPE ------------ o/
  300. /o loop through all methods in the type by reusing iterator o/
  301. if (OCITypeIterSet(env, err, car_tdo, iterator_ort) != OCI_SUCCESS)
  302. /o do something o/
  303. while (OCITypeMethodNext(env, err, iterator_ort) != OCI_NO_DATA)
  304. /o get the method's name o/
  305. if (!memcmp(OCITypeMethodName(env, err, mdo, &text_len), "car",
  306. text_len))
  307. /o do something o/ ;
  308. /o get the method's encapsulation o/
  309. if (OCITypeMethodEncap(env, err, mdo) == OCI_TYPEENCAP_PUBLIC)
  310. /o do something o/ ;
  311. /o get the method's flags o/
  312. meth_flags = OCITypeMethodFlags(env, err, mdo);
  313. if (meth_flags & OCI_TYPEMETHOD_VIRTUAL)
  314. /o do something o/ ;
  315. /o ------------ GET THE PARAMETERS IN A METHOD ------------ o/
  316. /o loop through all parameters in the method o/
  317. count = OCITypeMethodParams(env, err, mdo);
  318. for (j = 1; j <= count; j++)
  319. /o get the parameter information by position o/
  320. if (OCITypeParamByPos(env, err, mdo, i, &elem) != OCI_SUCCESS)
  321. /o error o/ ;
  322. /o get the parameter's name o/
  323. if (!memcmp(OCITypeElemName(env, err, elem, &text_len), "an_age",
  324. text_len))
  325. /o do something o/ ;
  326. /o get the parameter's mode o/
  327. if (OCITypeElemMode(env, err, elem) == OCI_PARAM_OUT)
  328. /o do something o/ ;
  329. /o get the parameter's required flag o/
  330. if (ortgprq(env, err, elem))
  331. /o do something o/ ;
  332. /o get a method by name o/
  333. if (OCITypeMethodByName(env, err, car_tdo, "car_constructor",
  334. strlen("car_constructor"), NULLP(OCIRef), &mdo)
  335. != OCI_SUCCESS)
  336. /o error o/ ;
  337. /o get a parameter in a method by name o/
  338. if (OCITypeParamByName(env, err, mdo, "an_age", strlen("an_age"), &elem)
  339. != OCI_SUCCESS)
  340. /o error o/ ;
  341. /o get a parameter's typecode o/
  342. typecode = OCITypeElemTypeCode(env, err, elem);
  343. /o get a parameter's type object o/
  344. if (OCITypeElemType(env, err, elem, &tdo)) != OCI_SUCCESS)
  345. /o error o/ ;
  346. /o get a parameter's position in a method o/
  347. if (ortgpps(env, err, mdo, "an_age", strlen("an_age"),
  348. &position, NULLP(OCIRef), NULLP(OCITypeElem)) != OCI_SUCCESS)
  349. /o error o/ ;
  350. /o ------------ GET THE METHOD's RESULT ------------ o/
  351. /o get a method by name o/
  352. if (OCITypeMethodByName(env, err, car_tdo, "get_age", strlen("get_age"),
  353. &mdo) != OCI_SUCCESS)
  354. /o error o/ ;
  355. /o get the typecode of the method's result o/
  356. typecode = OCITypeElemTypeCode(env, err, mdo);
  357. /o ----------------- END ---------------- o/
  358. /o free the references implicitly allocated o/
  359. DISCARD orlrfre(env, err, (dvoid *)&attr_ref);
  360. DISCARD orlrfre(env, err, (dvoid *)&param_ref);
  361. NOTES
  362. MODIFIED
  363. srseshad 03/12/03 - convert oci public api to ansi
  364. aahluwal 06/03/02 - bug 2360115
  365. skabraha 04/16/02 - fix compiler warnings
  366. rkasamse 03/02/01 - do not use iterator : keyword in MSVB
  367. bpalaval 02/09/01 - Change text to oratext.
  368. rxgovind 01/31/00 - add OCIType interfaces for transient types
  369. whe 09/01/99 - 976457:check __cplusplus for C++ code
  370. cxcheng 05/06/97 - make OCI_TYPE?? test macros return either 1 or 0
  371. cxcheng 04/22/97 - add comment on desupporting OCIType functions
  372. skrishna 03/18/97 - fix ifdef for supporting ansi and k&r proto-types
  373. cxcheng 02/26/97 - fix lint problem with oro names
  374. cxcheng 02/06/97 - take out short name support except with SLSHORTNAME
  375. cxcheng 01/15/97 - change prototype of OCITypeElemParameterizedType()
  376. cxcheng 01/03/97 - replace bit in OCI_TYPEPARAM_IS_REQUIRED with bitwis
  377. cxcheng 12/31/96 - replace OCI_PARAM_IS_REQUIRED with OCI_TYPEPARAM_IS_
  378. cxcheng 12/09/96 - add prototype for OCITypeElemExtTypeCode and OCIType
  379. cxcheng 11/25/96 - add schema name parameter to OCITypeVTInsert()
  380. cxcheng 11/20/96 - fix prototype for OCITypeByName()
  381. cxcheng 11/11/96 - fix prototype for OCITypeByName()
  382. cxcheng 11/05/96 - remove OCITypeElemExtTypeCode and OCITypeCollExtType
  383. dchatter 10/28/96 - change ortgatyp to be OCITypeArrayByName
  384. cxcheng 10/25/96 - fix problem with ortgatyp at end
  385. cxcheng 10/22/96 - add OCITypeByRef and OCITypeArrayByRef
  386. cxcheng 10/20/96 - remove ortgtyp() from #define section at end
  387. cxcheng 10/18/96 - rename OCITypeGetArray to OCITypeArrayByName
  388. cxcheng 10/17/96 - final change to prototype for OCI_TYPEPARAM_IS_REQUI
  389. cxcheng 10/15/96 - rename OCIEncapLevel and OCIMethodFlag
  390. cxcheng 10/14/96 - change prototype of OCITypeResult
  391. mluong 10/11/96 - fix compile error
  392. jwijaya 10/10/96 - fix bug on OCI_PARAM_IS_REQUIRED
  393. cxcheng 10/09/96 - more lint and link fixes
  394. cxcheng 10/08/96 - more lint fixes
  395. cxcheng 10/07/96 - more changes
  396. cxcheng 10/04/96 - replace short names with long names
  397. cxcheng 10/01/96 - change to long names for readability
  398. cxcheng 09/27/96 - rename ortgatyp() to ortgtya() for lint
  399. cxcheng 09/20/96 - add ortgatyp() for array get type
  400. cxcheng 09/18/96 - add array pin and iterator functions
  401. cxcheng 08/09/96 - add version table calls
  402. cxcheng 07/22/96 - add OCITypeElemType() to top
  403. jwijaya 07/03/96 - add ANSI prototypes
  404. cxcheng 06/28/96 - add OCITypeElemCharSetForm()
  405. cxcheng 06/26/96 - fix comment on OCITypeParamByPos()/ortgpps()
  406. cxcheng 06/18/96 - fix comments on OCITypeResult()
  407. cxcheng 06/17/96 - improve comments
  408. skrishna 06/03/96 - change OCITypeCollElem() prototype
  409. vkrishna 05/29/96 - replace OROTCFAR with OROTCCAR
  410. cxcheng 05/28/96 - fix comments, remove non-beta1 functions
  411. cxcheng 05/02/96 - fix prototype bugs
  412. cxcheng 04/29/96 - rename OCITypeElemm() to ortanct()
  413. cxcheng 04/26/96 - add ortgrbp and ortftyi,
  414. fix comments and examples
  415. cxcheng 04/22/96 - big merge to main branch
  416. cxcheng 04/17/96 - fix syntax
  417. cxcheng 04/08/96 - change prototype to ortaty()
  418. skrishna 04/08/96 - change ort*() to take OCIEnv* and OCIError* instead
  419. of oroenv*
  420. cxcheng 03/28/96 - add ortslob(), change ortsstr() prototype
  421. cxcheng 03/13/96 - change alter type interface
  422. cxcheng 03/11/96 - ORT interface changes
  423. cxcheng 02/27/96 - correct comments
  424. jboonleu 02/09/96 - rename oroopd to OCIDuration
  425. cxcheng 01/19/96 - change ORTCTYVAL to ORTCTYEMB for embedded ADT
  426. cxcheng 02/14/96 - add more comments
  427. jboonleu 02/09/96 - rename oroopd to OCIDuration
  428. cxcheng 02/07/96 - fix comments and examples
  429. cxcheng 01/19/96 - new ORT interface without korfc's
  430. cxcheng 01/08/96 - consolidate collection functions
  431. cxcheng 12/14/95 - remove obsolete ortgcol() and ortrelease()
  432. jweisz 12/12/95 - merge screwup: ortdth twice
  433. cxcheng 12/05/95 - change multiset interface for new standard
  434. skotsovo 12/01/95 - merge from /vobs/rdbms/public/ort.h@@/main/
  435. st_rdbms_big_dev/st_rdbms_obj/
  436. st_rdbms_jwijaya_variable_ref
  437. cxcheng 11/13/95 - add ortaty()/orteaty()
  438. cxcheng 11/13/95 - add new collection type accessors
  439. skotsovo 10/30/95 - add 'oid' type b/c extent type uses it.
  440. skotsovo 10/24/95 - update according to new variable length ref
  441. cxcheng 10/05/95 - add null support, change prototypes to calls
  442. cxcheng 10/03/95 - add OCITypeMethodOrder() to get ORDER method
  443. cxcheng 09/28/95 - add OCITypeElemm() for collection types support
  444. skotsovo 06/05/95 - add adt_type parameter to ortsab()
  445. skotsovo 05/10/95 - ifdef'd out ortgafp()
  446. skotsovo 03/07/95 - update interface to only include release 1
  447. skotsovo 02/22/95 - add multiset accessors
  448. skotsovo 02/09/95 - update according to new ots doc
  449. skotsovo 01/31/95 - add rest of release 1 types
  450. skotsovo 01/24/95 - categorize sint32, double, and real as number types
  451. (with precision and scale) instead of scalar types.
  452. skotsovo 01/12/95 - remove dependency from ortdty interface
  453. skotsovo 01/03/95 - remove orotyp accessors
  454. skotsovo 12/12/94 - update comments
  455. skotsovo 12/05/94 - change OCITypeElemParameterizedTyper interface
  456. skotsovo 10/26/94 - add type version table
  457. skotsovo 10/17/94 - fix ortgafp() comments
  458. skotsovo 10/14/94 - modify ortgafp() parameters
  459. skotsovo 10/14/94 - add examples
  460. skotsovo 10/13/94 - add a few new routines
  461. jwijaya 10/07/94 - add namespace to pin by name
  462. jwijaya 10/02/94 - connection handle -> connection number
  463. skotsovo 09/13/94 - modify example to use updated oririni interface
  464. skotsovo 08/25/94 - change scale to sb1 from sb2
  465. skotsovo 07/28/94 - add ortbeg() and ortend()
  466. skotsovo 07/14/94 - add decimal type & call graph
  467. skotsovo 06/28/94 - subset by removing miscellaneous functions
  468. skotsovo 06/28/94 - consistently put comments before typedefs
  469. skotsovo 06/27/94 - modify according to new header file template, add
  470. more examples, and change ortcty() to return a
  471. reference to the type
  472. skotsovo 06/24/94 - add functions to get type information from orotyp
  473. skotsovo 06/20/94 - finish modifying according to header template
  474. skotsovo 06/09/94 - modify according to header file template
  475. skotsovo 06/08/94 - replace s.h with oratypes.h
  476. skotsovo 05/24/94 - modify comments & update example
  477. skotsovo 05/23/94 - modify fnt names for create, alter and drop type
  478. skotsovo 05/18/94 - remove ortdme() -- delete a method
  479. skotsovo 05/17/94 - add tdo parameter to all type modifiers
  480. skotsovo 05/11/94 - return text* instead of including it in arglist
  481. skotsovo 11/16/93 - creation
  482. }
  483. {$ifndef ORO_ORACLE}
  484. { $include <oro.h>}
  485. {$endif}
  486. {--------------------------------------------------------------------------- }
  487. { SHORT NAMES SUPPORT SECTION }
  488. {--------------------------------------------------------------------------- }
  489. {$ifdef SLSHORTNAME}
  490. { the following are short names that are only supported on IBM mainframes
  491. with the SLSHORTNAME defined.
  492. With this all subsequent long names will actually be substituted with
  493. the short names here }
  494. const
  495. OCITypeArrayByName = ortgatyp;
  496. OCITypeAttrByName = ortgabn;
  497. OCITypeAttrNext = ortgabi;
  498. OCITypeAttrs = ortgtna;
  499. OCITypeByRef = ortgtbrf;
  500. OCITypeCollElem = ortgcel;
  501. OCITypeCollExtTypeCode = ortgcsqt;
  502. OCITypeCollSize = ortgcne;
  503. OCITypeCollTypeCode = ortgdttc;
  504. OCITypeElem = ortado;
  505. OCITypeElemCharSetForm = ortgscform;
  506. OCITypeElemCharSetID = ortgscid;
  507. OCITypeElemDefaultValue = ortgpdv;
  508. OCITypeElemExtTypeCode = ortgasqt;
  509. OCITypeElemLength = ortgsl;
  510. OCITypeElemName = ortganm;
  511. OCITypeElemNumPrec = ortgnp;
  512. OCITypeElemNumScale = ortgns;
  513. OCITypeElemParamMode = ortgpmo;
  514. OCITypeElemParameterizedType = ortgpa;
  515. OCITypeElemType = ortgaty;
  516. OCITypeElemTypeCode = ortgatc;
  517. OCITypeIter = ortitr;
  518. OCITypeIterFree = ortifre;
  519. OCITypeIterNew = ortinew;
  520. OCITypeIterSet = ortiset;
  521. OCITypeMethod = ortmdo;
  522. OCITypeMethodByName = ortgmbn;
  523. OCITypeMethodEncap = ortgmen;
  524. OCITypeMethodFlags = ortgmfl;
  525. OCITypeMethodMap = ortgmmap;
  526. OCITypeMethodName = ortgmnm;
  527. OCITypeMethodNext = ortgmbi;
  528. OCITypeMethodOrder = ortgmor;
  529. OCITypeMethodOverload = ortgmno;
  530. OCITypeMethodParams = ortgmnp;
  531. OCITypeMethods = ortgtnm;
  532. OCITypeName = ortgtme;
  533. OCITypeParamByName = ortgpbn;
  534. OCITypeParamPos = ortgpps;
  535. OCITypeSchema = ortgtsch;
  536. OCITypeTypeCode = ortgttc;
  537. OCITypeVTInit = ortvini;
  538. OCITypeVTInsert = ortvins;
  539. OCITypeVTSelect = ortvsel;
  540. OCITypeVersion = ortgtvn;
  541. {$endif}
  542. { SLSHORTNAME }
  543. {============================ } { PUBLIC TYPES AND CONSTANTS }
  544. {============================ }
  545. {----------------------------- TYPE DESCRIPTION ---------------------------- }
  546. {
  547. * OCIType - OCI Type Description Object
  548. *
  549. * The contents of an 'OCIType' is private/opaque to clients. Clients just
  550. * need to declare and pass 'OCIType' pointers in to the type manage
  551. * functions.
  552. * The pointer points to the type in the object cache. Thus, clients don't
  553. * need to allocate space for this type and must NEVER free the pointer to the
  554. * 'OCIType'.
  555. }
  556. type
  557. POCIType = pointer;
  558. {------------------------- TYPE ELEMENT DESCRIPTION ------------------------ }
  559. {
  560. * OCITypeElem - OCI Type Element object
  561. *
  562. * The contents of an 'OCITypeElem' is private/opaque to clients. Clients just
  563. * need to declare and pass 'OCITypeElem' pointers in to the type manager
  564. * functions.
  565. *
  566. * 'OCITypeElem' objects contains type element information such as the numeric
  567. * precision for example, for number objects, and the number of elements for
  568. * arrays.
  569. * They ARE used to describe type attributes, collection elements,
  570. * method parameters, and method results. Hence they are pass in or returned
  571. * by attribute, collection, and method parameter/result accessors.
  572. }
  573. POCITypeElem = pointer;
  574. {--------------------------- METHOD DESCRIPTION --------------------------- }
  575. {
  576. * OCITypeMethod - OCI Method Description object
  577. *
  578. * The contents of an 'OCITypeMethod' is private/opaque to clients. Clients
  579. * just need to declare and pass 'OCITypeMethod' pointers in to the type
  580. * manager functions.
  581. * The pointer points to the method in the object cache. Thus, clients don't
  582. * need to allocate space for this type and must NEVER free the pointer to
  583. * the 'OCITypeMethod'.
  584. }
  585. POCITypeMethod = pointer;
  586. {--------------------------- TYPE ACCESS ITERATOR -------------------------- }
  587. {
  588. * OCITypeIter- OCI Type Iterator
  589. *
  590. * The contents of an 'orti' is private/opaque to clients. Clients just
  591. * need to declare and pass 'orti' pointers in to the type manager functions.
  592. * The iterator is used to retreive MDO's and ADO's that belong to the TDO
  593. * one at a time. It needs to be allocated by the 'OCITypeIterNew()' function
  594. * call and deallocated with the 'OCITypeIterFree()' function call.
  595. }
  596. POCITypeIter = pointer;
  597. {================== }
  598. { PUBLIC FUNCTIONS }
  599. {================== }
  600. {-------------------------------------------------------------------------- }
  601. { ITERATOR }
  602. {-------------------------------------------------------------------------- }
  603. {-----------------------_- OCITypeIterNew --------------------------------- }
  604. { ** OBSOLETE ** }
  605. {$IFNDEF LinkDynamically}
  606. function OCITypeIterNew(env:POCIEnv; err:POCIError; tdo:POCIType; var iterator_ort:POCITypeIter):sword;cdecl;external ocilib name 'OCITypeIterNew';
  607. {$ELSE}
  608. var OCITypeIterNew : function (env:POCIEnv; err:POCIError; tdo:POCIType; var iterator_ort:POCITypeIter):sword;cdecl;
  609. {$ENDIF}
  610. {
  611. NAME: OCITypeIterNew - OCI Iterator NEW
  612. PARAMETERS:
  613. env (IN/OUT) - OCI environment handle initialized in object mode
  614. err (IN/OUT) - error handle. If there is an error, it is
  615. recorded in 'err' and this function returns OCI_ERROR.
  616. The error recorded in 'err' can be retrieved by calling
  617. OCIErrorGet().
  618. tdo (IN) - pointer to the pinned type in the object cache to
  619. initialize the iterator with
  620. iterator_ort (OUT) - pointer to the pointer to the new iterator created
  621. DESCRIPTION:
  622. Create a new instance of a method/attribute iterator and initalize
  623. it's values.
  624. RETURNS:
  625. OCI_SUCCESS if the function completes successfully.
  626. OCI_INVALID_HANDLE if 'env' or 'err' is null.
  627. OCI_ERROR if
  628. 1) any of the required parameters is null.
  629. 2) error while allocating space for the iterator.
  630. }
  631. {------------------------ OCITypeIterSet --------------------------------- }
  632. { ** OBSOLETE ** }
  633. {$IFNDEF LinkDynamically}
  634. function OCITypeIterSet(env:POCIEnv; err:POCIError; tdo:POCIType; iterator_ort:POCITypeIter):sword;cdecl;external ocilib name 'OCITypeIterSet';
  635. {$ELSE}
  636. OCITypeIterSet : function (env:POCIEnv; err:POCIError; tdo:POCIType; iterator_ort:POCITypeIter):sword;cdecl;
  637. {$ENDIF}
  638. {
  639. NAME: OCITypeIterSet - OCI Iterator SET
  640. PARAMETERS:
  641. env (IN/OUT) - OCI environment handle initialized in object mode
  642. err (IN/OUT) - error handle. If there is an error, it is
  643. recorded in 'err' and this function returns OCI_ERROR.
  644. The error recorded in 'err' can be retrieved by calling
  645. OCIErrorGet().
  646. tdo (IN) - pointer to the pinned type in the object cache to
  647. initialize the iterator with
  648. iterator_ort (IN/OUT) - pointer to the iterator to set
  649. DESCRIPTION:
  650. Initializes the iterator. This is used to reset the state of the
  651. iterator.
  652. RETURNS:
  653. OCI_SUCCESS if the function completes successfully.
  654. OCI_INVALID_HANDLE if 'env' or 'err' is null.
  655. OCI_ERROR if
  656. 1) any of the required parameters is null.
  657. }
  658. {------------------------ OCITypeIterFree --------------------------------- }
  659. { ** OBSOLETE ** }
  660. {$IFNDEF LinkDynamically}
  661. function OCITypeIterFree(env:POCIEnv; err:POCIError; iterator_ort:POCITypeIter):sword;cdecl;external ocilib name 'OCITypeIterFree';
  662. {$ELSE}
  663. OCITypeIterFree : function (env:POCIEnv; err:POCIError; iterator_ort:POCITypeIter):sword;cdecl;
  664. {$ENDIF}
  665. {
  666. NAME: OCITypeIterFree - OCI Iterator FREe
  667. PARAMETERS:
  668. env (IN/OUT) - OCI environment handle initialized in object mode
  669. err (IN/OUT) - error handle. If there is an error, it is
  670. recorded in 'err' and this function returns OCI_ERROR.
  671. The error recorded in 'err' can be retrieved by calling
  672. OCIErrorGet().
  673. iterator_ort (IN/OUT) - pointer to the iterator to free
  674. DESCRIPTION:
  675. Free space allocated for the iterator.
  676. RETURNS:
  677. OCI_SUCCESS if the function completes successfully.
  678. OCI_INVALID_HANDLE if 'env' or 'err' is null.
  679. OCI_ERROR if
  680. 1) any of the required parameters is null.
  681. 2) error while freeing the iterator, probably bad iterator pointer.
  682. }
  683. {-------------------------------------------------------------------------- }
  684. { TYPE GET }
  685. {-------------------------------------------------------------------------- }
  686. { ** OBSOLETE ** }
  687. {$IFNDEF LinkDynamically}
  688. function OCITypeByName(env:POCIEnv; err:POCIError; svc:POCISvcCtx; schema_name:Poratext; s_length:ub4;
  689. type_name:Poratext; t_length:ub4; version_name:Poratext; v_length:ub4; pin_duration:OCIDuration;
  690. get_option:OCITypeGetOpt;var tdo:POCIType):sword;cdecl;external ocilib name 'OCITypeByName';
  691. {$ELSE}
  692. OCITypeByName : function (env:POCIEnv; err:POCIError; svc:POCISvcCtx; schema_name:Poratext; s_length:ub4;
  693. type_name:Poratext; t_length:ub4; version_name:Poratext; v_length:ub4; pin_duration:OCIDuration;
  694. get_option:OCITypeGetOpt;var tdo:POCIType):sword;cdecl;
  695. {$ENDIF}
  696. {
  697. NAME: OCITypeByName - OCI Get the most current version of an existing TYPe
  698. by name.
  699. PARAMETERS:
  700. env (IN/OUT) - OCI environment handle initialized in object mode
  701. err (IN/OUT) - error handle. If there is an error, it is
  702. recorded in 'err' and this function returns OCI_ERROR.
  703. The error recorded in 'err' can be retrieved by calling
  704. OCIErrorGet().
  705. svc (IN) - OCI service handle
  706. schema_name (IN, optional) - name of schema associated with the
  707. type. By default, the user's schema name is used.
  708. s_length (IN) - length of the 'schema_name' parameter
  709. type_name (IN) - name of the type to get
  710. t_length (IN) - length of the 'type_name' parameter
  711. version_name (IN, optional) - user readable version of the type.
  712. Pass (oratext *)0 for the most current version.
  713. v_length (IN) - length of version_name in bytes. Should be 0 if
  714. the most current version is to be retrieved.
  715. pin_duration (IN) - pin duration (e.g. until the end of current
  716. transaction). See 'oro.h' for a description of
  717. each option.
  718. get_option (IN) - options for loading the types. It can be one of two
  719. values:
  720. OCI_TYPEGET_HEADER for only the header to be loaded, or
  721. OCI_TYPEGET_ALL for the TDO and all ADO and MDOs to be
  722. loaded.
  723. tdo (OUT) - pointer to the pinned type in the object cache
  724. DESCRIPTION:
  725. Get a pointer to a version of the existing type associated
  726. with schema/type name.
  727. RETURNS:
  728. OCI_SUCCESS if the function completes successfully.
  729. OCI_INVALID_HANDLE if 'env' or 'err' is null.
  730. OCI_ERROR if
  731. 1) any of the required parameters is null.
  732. 2) the adt type associated with schema/type name does not exist.
  733. NOTE:
  734. Schema and type names are CASE-SENSITIVE. If they have been created
  735. via SQL, you need to use uppercase names.
  736. }
  737. {$IFNDEF LinkDynamically}
  738. function OCITypeArrayByName(env:POCIEnv; err:POCIError; svc:POCISvcCtx; array_len:ub4; schema_name:array of Poratext;
  739. s_length:array of ub4; type_name:array of Poratext; t_length:array of ub4; version_name:array of Poratext; v_length:array of ub4;
  740. pin_duration:OCIDuration; get_option:OCITypeGetOpt; var tdo:POCIType):sword;cdecl;external ocilib name 'OCITypeArrayByName';
  741. {$ELSE}
  742. OCITypeArrayByName : function (env:POCIEnv; err:POCIError; svc:POCISvcCtx; array_len:ub4; schema_name:array of Poratext;
  743. s_length:array of ub4; type_name:array of Poratext; t_length:array of ub4; version_name:array of Poratext; v_length:array of ub4;
  744. pin_duration:OCIDuration; get_option:OCITypeGetOpt; var tdo:POCIType):sword;cdecl;
  745. {$ENDIF}
  746. {
  747. NAME: OCITypeArrayByName - OCI Get array of TYPes by name.
  748. PARAMETERS:
  749. env (IN/OUT) - OCI environment handle initialized in object mode
  750. err (IN/OUT) - error handle. If there is an error, it is
  751. recorded in 'err' and this function returns OCI_ERROR.
  752. The error recorded in 'err' can be retrieved by calling
  753. OCIErrorGet().
  754. svc (IN) - OCI service handle
  755. array_len (IN) - number of schema_name/type_name/version_name entries to
  756. be retrieved.
  757. schema_name (IN, optional) - array of schema names associated with the
  758. types to be retrieved. The array must have array_len
  759. elements if specified.
  760. If 0 is supplied, the default schema is assumed, otherwise
  761. it MUST have array_len number of elements.
  762. 0 can be supplied for one or more of the entries to indicate
  763. that the default schema is desired for those entries.
  764. s_length (IN) - array of schema_name lengths with each entry
  765. corresponding to the length of the corresponding schema_name
  766. entry in the schema_name array in bytes.
  767. The array must either have array_len number of elements or
  768. it MUST be 0 if schema_name is not specified.
  769. type_name (IN) - array of the names of the types to retrieve. This
  770. MUST have array_len number of elements.
  771. t_length (IN) - array of the lengths of type names in the type_name
  772. array in bytes.
  773. version_name (IN) - array of the version names of the types to retrieve
  774. corresponding. This can be 0 to indicate retrieval of the
  775. most current versions, or it MUST have array_len number of
  776. elements.
  777. If 0 is supplied, the most current version is assumed,
  778. otherwise it MUST have array_len number of elements.
  779. 0 can be supplied for one or more of the entries to indicate
  780. that the current version is desired for those entries.
  781. v_length (IN) - array of the lengths of version names in the
  782. version_name array in bytes.
  783. pin_duration (IN) - pin duration (e.g. until the end of current
  784. transaction) for the types retreieve. See 'oro.h' for a
  785. description of each option.
  786. get_option (IN) - options for loading the types. It can be one of two
  787. values:
  788. OCI_TYPEGET_HEADER for only the header to be loaded, or
  789. OCI_TYPEGET_ALL for the TDO and all ADO and MDOs to be
  790. loaded.
  791. tdo (OUT) - output array for the pointers to each pinned type in the
  792. object cache. It must have space for array_len pointers.
  793. Use OCIObjectGetObjectRef() to obtain the CREF to each
  794. pinned type descriptor.
  795. DESCRIPTION:
  796. Get pointers to the existing types associated with the schema/type name
  797. array. This is similar to OCITypeByName() except that all the TDO's are
  798. retreived via a single network roundtrip.
  799. RETURNS:
  800. OCI_SUCCESS if the function completes successfully.
  801. OCI_INVALID_HANDLE if 'env' or 'err' is null.
  802. OCI_ERROR if
  803. 1) any of the required parameters is null.
  804. 2) one or more adt types associated with a schema/type name entry
  805. does not exist.
  806. }
  807. {$IFNDEF LinkDynamically}
  808. function OCITypeByRef(env:POCIEnv; err:POCIError; type_ref:POCIRef; pin_duration:OCIDuration; get_option:OCITypeGetOpt;
  809. var tdo:POCIType):sword;cdecl;external ocilib name 'OCITypeByRef';
  810. {$ELSE}
  811. OCITypeByRef : function (env:POCIEnv; err:POCIError; type_ref:POCIRef; pin_duration:OCIDuration; get_option:OCITypeGetOpt;
  812. var tdo:POCIType):sword;cdecl;
  813. {$ENDIF}
  814. {
  815. NAME: OCITypeArrayByRef - OCI Get array of TYPes by REF.
  816. PARAMETERS:
  817. env (IN/OUT) - OCI environment handle initialized in object mode
  818. err (IN/OUT) - error handle. If there is an error, it is
  819. recorded in 'err' and this function returns OCI_ERROR.
  820. The error recorded in 'err' can be retrieved by calling
  821. OCIErrorGet().
  822. type_ref (IN) - OCIRef * pointing to the particular version of
  823. the type descriptor object to obtain.
  824. The array must have array_len elements if specified.
  825. pin_duration (IN) - pin duration (e.g. until the end of current
  826. transaction) for the type to retreieve. See 'oro.h' for a
  827. description of each option.
  828. get_option (IN) - options for loading the type. It can be one of two
  829. values:
  830. OCI_TYPEGET_HEADER for only the header to be loaded, or
  831. OCI_TYPEGET_ALL for the TDO and all ADO and MDOs to be
  832. loaded.
  833. tdo (OUT) - pointer to the pinned type in the object cache
  834. DESCRIPTION:
  835. Get pointers to the
  836. with the schema/type name array. This is similar to OCITypeByName()
  837. except that all the TDO's are retreived via a single network roundtrip.
  838. RETURNS:
  839. OCI_SUCCESS if the function completes successfully.
  840. OCI_INVALID_HANDLE if 'env' or 'err' is null.
  841. OCI_ERROR if
  842. 1) any of the required parameters is null.
  843. 2) one or more adt types associated with a schema/type name entry
  844. does not exist.
  845. }
  846. {$IFNDEF LinkDynamically}
  847. function OCITypeArrayByRef(env:POCIEnv; err:POCIError; array_len:ub4; var type_ref:POCIRef; pin_duration:OCIDuration;
  848. get_option:OCITypeGetOpt; var tdo:POCIType):sword;cdecl;external ocilib name 'OCITypeArrayByRef';
  849. {$ELSE}
  850. OCITypeArrayByRef : function (env:POCIEnv; err:POCIError; array_len:ub4; var type_ref:POCIRef; pin_duration:OCIDuration;
  851. get_option:OCITypeGetOpt; var tdo:POCIType):sword;cdecl;
  852. {$ENDIF}
  853. {
  854. NAME: OCITypeArrayByRef - OCI Get array of TYPes by REF.
  855. PARAMETERS:
  856. env (IN/OUT) - OCI environment handle initialized in object mode
  857. err (IN/OUT) - error handle. If there is an error, it is
  858. recorded in 'err' and this function returns OCI_ERROR.
  859. The error recorded in 'err' can be retrieved by calling
  860. OCIErrorGet().
  861. array_len (IN) - number of schema_name/type_name/version_name entries to
  862. be retrieved.
  863. type_ref (IN) - array of OCIRef * pointing to the particular version of
  864. the type descriptor object to obtain.
  865. The array must have array_len elements if specified.
  866. pin_duration (IN) - pin duration (e.g. until the end of current
  867. transaction) for the types retreieve. See 'oro.h' for a
  868. description of each option.
  869. get_option (IN) - options for loading the types. It can be one of two
  870. values:
  871. OCI_TYPEGET_HEADER for only the header to be loaded, or
  872. OCI_TYPEGET_ALL for the TDO and all ADO and MDOs to be
  873. loaded.
  874. tdo (OUT) - output array for the pointers to each pinned type in the
  875. object cache. It must have space for array_len pointers.
  876. Use OCIObjectGetObjectRef() to obtain the CREF to each
  877. pinned type descriptor.
  878. DESCRIPTION:
  879. Get pointers to the
  880. with the schema/type name array. This is similar to OCITypeByName()
  881. except that all the TDO's are retreived via a single network roundtrip.
  882. RETURNS:
  883. OCI_SUCCESS if the function completes successfully.
  884. OCI_INVALID_HANDLE if 'env' or 'err' is null.
  885. OCI_ERROR if
  886. 1) any of the required parameters is null.
  887. 2) one or more adt types associated with a schema/type name entry
  888. does not exist.
  889. }
  890. {-------------------------------------------------------------------------- }
  891. { TYPE ACCESSORS }
  892. {-------------------------------------------------------------------------- }
  893. {---------------------------- OCITypeName --------------------------------- }
  894. { ** OBSOLETE ** }
  895. {$IFNDEF LinkDynamically}
  896. function OCITypeName(env:POCIEnv; err:POCIError; tdo:POCIType; n_length:Pub4):Poratext;cdecl;external ocilib name 'OCITypeName';
  897. {$ELSE}
  898. OCITypeName : function (env:POCIEnv; err:POCIError; tdo:POCIType; n_length:Pub4):Poratext;cdecl;
  899. {$ENDIF}
  900. {
  901. NAME: OCITypeName - ORT Get a Type's naME.
  902. PARAMETERS:
  903. env (IN/OUT) - OCI environment handle initialized in object mode
  904. err (IN/OUT) - error handle. If there is an error, it is
  905. recorded in 'err' and this function returns OCI_ERROR.
  906. The error recorded in 'err' can be retrieved by calling
  907. OCIErrorGet().
  908. tdo (IN) - pointer to to the type descriptor in the object cache
  909. n_length (OUT) - length (in bytes) of the returned type name. The
  910. caller must allocate space for the ub4 before calling this
  911. routine.
  912. REQUIRES:
  913. 1) All type accessors require that the type be pinned before calling
  914. any accessor.
  915. 2) All input parameters must not be NULL and must be valid.
  916. 3) 'n_length' must point to an allocated ub4.
  917. DESCRIPTION:
  918. Get the name of the type.
  919. RETURNS:
  920. the name of the type
  921. NOTES:
  922. The type descriptor, 'tdo', must be unpinned when the accessed
  923. information is no longer needed.
  924. }
  925. {------------------------ OCITypeSchema --------------------------------- }
  926. { ** OBSOLETE ** }
  927. {$IFNDEF LinkDynamically}
  928. function OCITypeSchema(env:POCIEnv; err:POCIError; tdo:POCIType; n_length:Pub4):Poratext;cdecl;external ocilib name 'OCITypeSchema';
  929. {$ELSE}
  930. OCITypeSchema : function (env:POCIEnv; err:POCIError; tdo:POCIType; n_length:Pub4):Poratext;cdecl;
  931. {$ENDIF}
  932. {
  933. NAME: OCITypeSchema - ORT Get a Type's SCHema name.
  934. PARAMETERS:
  935. env (IN/OUT) - OCI environment handle initialized in object mode
  936. err (IN/OUT) - error handle. If there is an error, it is
  937. recorded in 'err' and this function returns OCI_ERROR.
  938. The error recorded in 'err' can be retrieved by calling
  939. OCIErrorGet().
  940. tdo (IN) - pointer to to the type descriptor in the object cache
  941. n_length (OUT) - length (in bytes) of the returned schema name. The
  942. caller must allocate space for the ub4 before calling this
  943. routine.
  944. REQUIRES:
  945. 1) All type accessors require that the type be pinned before calling
  946. any accessor.
  947. 2) All input parameters must not be NULL and must be valid.
  948. 3) 'n_length' must point to an allocated ub4.
  949. DESCRIPTION:
  950. Get the schema name of the type.
  951. RETURNS:
  952. the schema name of the type
  953. NOTES:
  954. The type descriptor, 'tdo', must be unpinned when the accessed
  955. information is no longer needed.
  956. }
  957. {------------------------ OCITypeTypeCode --------------------------------- }
  958. { ** OBSOLETE ** }
  959. {$IFNDEF LinkDynamically}
  960. function OCITypeTypeCode(env:POCIEnv; err:POCIError; tdo:POCIType):OCITypeCode;cdecl;external ocilib name 'OCITypeTypeCode';
  961. {$ELSE}
  962. OCITypeTypeCode : function (env:POCIEnv; err:POCIError; tdo:POCIType):OCITypeCode;cdecl;
  963. {$ENDIF}
  964. {
  965. NAME: OCITypeTypeCode - OCI Get a Type's Type Code.
  966. PARAMETERS:
  967. env (IN/OUT) - OCI environment handle initialized in object mode
  968. err (IN/OUT) - error handle. If there is an error, it is
  969. recorded in 'err' and this function returns OCI_ERROR.
  970. The error recorded in 'err' can be retrieved by calling
  971. OCIErrorGet().
  972. tdo (IN) - pointer to to the type descriptor in the object cache
  973. REQUIRES:
  974. 1) All type accessors require that the type be pinned before calling
  975. any accessor.
  976. 2) All input parameters must not be NULL and must be valid.
  977. DESCRIPTION:
  978. Get the type code of the type.
  979. RETURNS:
  980. The type code of the type.
  981. NOTES:
  982. The type descriptor, 'tdo', must be unpinned when the accessed
  983. information is no longer needed.
  984. }
  985. {----------------------- OCITypeCollTypeCode ------------------------------- }
  986. { ** OBSOLETE ** }
  987. {$IFNDEF LinkDynamically}
  988. function OCITypeCollTypeCode(env:POCIEnv; err:POCIError; tdo:POCIType):OCITypeCode;cdecl;external ocilib name 'OCITypeCollTypeCode';
  989. {$ELSE}
  990. OCITypeCollTypeCode : function (env:POCIEnv; err:POCIError; tdo:POCIType):OCITypeCode;cdecl;
  991. {$ENDIF}
  992. {
  993. NAME: OCITypeCollTypeCode - OCI Get a Domain Type's Type Code.
  994. PARAMETERS:
  995. env (IN/OUT) - OCI environment handle initialized in object mode
  996. err (IN/OUT) - error handle. If there is an error, it is
  997. recorded in 'err' and this function returns OCI_ERROR.
  998. The error recorded in 'err' can be retrieved by calling
  999. OCIErrorGet().
  1000. tdo (IN) - pointer to to the type descriptor in the object cache
  1001. REQUIRES:
  1002. 1) All type accessors require that the type be pinned before calling
  1003. any accessor.
  1004. 2) All input parameters must not be NULL and must be valid.
  1005. 3) 'tdo' MUST point to a named collection type.
  1006. DESCRIPTION:
  1007. Get the type code of the named collection type. For V8.0, named
  1008. collection types can only be variable length arrays and nested tables.
  1009. RETURNS:
  1010. OCI_TYPECODE_VARRAY for variable length array, and
  1011. OCI_TYPECODE_TABLE for nested tables.
  1012. NOTES:
  1013. The type descriptor, 'tdo', should be unpinned when the accessed
  1014. information is no longer needed.
  1015. }
  1016. {------------------------- OCITypeVersion --------------------------------- }
  1017. { ** OBSOLETE ** }
  1018. {$IFNDEF LinkDynamically}
  1019. function OCITypeVersion(env:POCIEnv; err:POCIError; tdo:POCIType; v_length:Pub4):Poratext;cdecl;external ocilib name 'OCITypeVersion';
  1020. {$ELSE}
  1021. OCITypeVersion : function (env:POCIEnv; err:POCIError; tdo:POCIType; v_length:Pub4):Poratext;cdecl;
  1022. {$ENDIF}
  1023. {
  1024. NAME: OCITypeVersion - OCI Get a Type's user-readable VersioN.
  1025. PARAMETERS:
  1026. env (IN/OUT) - OCI environment handle initialized in object mode
  1027. err (IN/OUT) - error handle. If there is an error, it is
  1028. recorded in 'err' and this function returns OCI_ERROR.
  1029. The error recorded in 'err' can be retrieved by calling
  1030. OCIErrorGet().
  1031. tdo (IN) - pointer to to the type descriptor in the object cache
  1032. v_length (OUT) - length (in bytes) of the returned user-readable
  1033. version. The caller must allocate space for the ub4 before
  1034. calling this routine.
  1035. REQUIRES:
  1036. 1) All type accessors require that the type be pinned before calling
  1037. any accessor.
  1038. 2) All input parameters must not be NULL and must be valid.
  1039. 3) 'v_length' must point to an allocated ub4.
  1040. DESCRIPTION:
  1041. Get the user-readable version of the type.
  1042. RETURNS:
  1043. The user-readable version of the type
  1044. NOTES:
  1045. The type descriptor, 'tdo', must be unpinned when the accessed
  1046. information is no longer needed.
  1047. }
  1048. {--------------------------- OCITypeAttrs --------------------------------- }
  1049. { ** OBSOLETE ** }
  1050. {$IFNDEF LinkDynamically}
  1051. function OCITypeAttrs(env:POCIEnv; err:POCIError; tdo:POCIType):ub4;cdecl;external ocilib name 'OCITypeAttrs';
  1052. {$ELSE}
  1053. OCITypeAttrs : function (env:POCIEnv; err:POCIError; tdo:POCIType):ub4;cdecl;
  1054. {$ENDIF}
  1055. {
  1056. NAME: OCITypeAttrs - OCI Get a Type's Number of Attributes.
  1057. PARAMETERS:
  1058. env (IN/OUT) - OCI environment handle initialized in object mode
  1059. err (IN/OUT) - error handle. If there is an error, it is
  1060. recorded in 'err' and this function returns OCI_ERROR.
  1061. The error recorded in 'err' can be retrieved by calling
  1062. OCIErrorGet().
  1063. tdo (IN) - pointer to to the type descriptor in the object cache
  1064. REQUIRES:
  1065. 1) All type accessors require that the type be pinned before calling
  1066. any accessor.
  1067. 2) All input parameters must not be NULL and must be valid.
  1068. DESCRIPTION:
  1069. Get the number of attributes in the type.
  1070. RETURNS:
  1071. The number of attributes in the type. 0 for ALL non-ADTs.
  1072. NOTES:
  1073. The type descriptor, 'tdo', must be unpinned when the accessed
  1074. information is no longer needed.
  1075. }
  1076. {------------------------- OCITypeMethods --------------------------------- }
  1077. { ** OBSOLETE ** }
  1078. {$IFNDEF LinkDynamically}
  1079. function OCITypeMethods(env:POCIEnv; err:POCIError; tdo:POCIType):ub4;cdecl;external ocilib name 'OCITypeMethods';
  1080. {$ELSE}
  1081. OCITypeMethods : function (env:POCIEnv; err:POCIError; tdo:POCIType):ub4;cdecl;
  1082. {$ENDIF}
  1083. {
  1084. NAME: OCITypeMethods - OCI Get a Type's Number of Methods.
  1085. PARAMETERS:
  1086. env (IN/OUT) - OCI environment handle initialized in object mode
  1087. err (IN/OUT) - error handle. If there is an error, it is
  1088. recorded in 'err' and this function returns OCI_ERROR.
  1089. The error recorded in 'err' can be retrieved by calling
  1090. OCIErrorGet().
  1091. tdo (IN) - pointer to to the type descriptor in the object cache
  1092. REQUIRES:
  1093. 1) All type accessors require that the type be pinned before calling
  1094. any accessor.
  1095. 2) All input parameters must not be NULL and must be valid.
  1096. DESCRIPTION:
  1097. Get the number of methods in a type.
  1098. RETURNS:
  1099. The number of methods in the type
  1100. NOTES:
  1101. The type descriptor, 'tdo', must be unpinned when the accessed
  1102. information is no longer needed.
  1103. }
  1104. {-------------------------------------------------------------------------- }
  1105. { TYPE ELEMENT INFORMATION ACCESSORS }
  1106. {-------------------------------------------------------------------------- }
  1107. {------------------------ OCITypeElemName --------------------------------- }
  1108. { ** OBSOLETE ** }
  1109. {$IFNDEF LinkDynamically}
  1110. function OCITypeElemName(env:POCIEnv; err:POCIError; elem:POCITypeElem; n_length:Pub4):Poratext;cdecl;external ocilib name 'OCITypeElemName';
  1111. {$ELSE}
  1112. OCITypeElemName : function (env:POCIEnv; err:POCIError; elem:POCITypeElem; n_length:Pub4):Poratext;cdecl;
  1113. {$ENDIF}
  1114. {
  1115. NAME: OCITypeElemName - OCI Get an Attribute's NaMe.
  1116. PARAMETERS:
  1117. env (IN/OUT) - OCI environment handle initialized in object mode
  1118. err (IN/OUT) - error handle. If there is an error, it is
  1119. recorded in 'err' and this function returns OCI_ERROR.
  1120. The error recorded in 'err' can be retrieved by calling
  1121. OCIErrorGet().
  1122. elem (IN) - pointer to the type element descriptor in the object cache
  1123. n_length (OUT) - length (in bytes) of the returned attribute name.
  1124. The caller must allocate space for the ub4 before calling this
  1125. routine.
  1126. REQUIRES:
  1127. 1) All type accessors require that the type be pinned before calling
  1128. any accessor.
  1129. 2) All input parameters must not be NULL and must be valid.
  1130. 3) 'n_length' must point to an allocated ub4.
  1131. DESCRIPTION:
  1132. Get the name of the attribute.
  1133. RETURNS:
  1134. the name of the attribute and the length in n_length
  1135. NOTES:
  1136. The type must be unpinned when the accessed information is no
  1137. longer needed.
  1138. }
  1139. {------------------------ OCITypeElemTypeCode ------------------------------ }
  1140. { ** OBSOLETE ** }
  1141. {$IFNDEF LinkDynamically}
  1142. function OCITypeElemTypeCode(env:POCIEnv; err:POCIError; elem:POCITypeElem):OCITypeCode;cdecl;external ocilib name 'OCITypeElemTypeCode';
  1143. {$ELSE}
  1144. OCITypeElemTypeCode : function (env:POCIEnv; err:POCIError; elem:POCITypeElem):OCITypeCode;cdecl;
  1145. {$ENDIF}
  1146. {
  1147. NAME: OCITypeElemTypeCode - OCI Get an Attribute's TypeCode.
  1148. PARAMETERS:
  1149. env (IN/OUT) - OCI environment handle initialized in object mode
  1150. err (IN/OUT) - error handle. If there is an error, it is
  1151. recorded in 'err' and this function returns OCI_ERROR.
  1152. The error recorded in 'err' can be retrieved by calling
  1153. OCIErrorGet().
  1154. elem (IN) - pointer to the type element descriptor in the object cache
  1155. REQUIRES:
  1156. 1) All type accessors require that the type be pinned before calling
  1157. any accessor.
  1158. 2) All input parameters must not be NULL and must be valid.
  1159. DESCRIPTION:
  1160. Get the typecode of an attribute's type.
  1161. RETURNS:
  1162. the typecode of the attribute's type. If this is a scalar type, the
  1163. typecode sufficiently describes the scalar type and no further calls
  1164. need to be made. Valid scalar types include: OCI_TYPECODE_SIGNED8,
  1165. OCI_TYPECODE_UNSIGNED8, OCI_TYPECODE_SIGNED16, OCI_TYPECODE_UNSIGNED16,
  1166. OCI_TYPECODE_SIGNED32, OCI_TYPECODE_UNSIGNED32, OCI_TYPECODE_REAL,
  1167. OCI_TYPECODE_DOUBLE, OCI_TYPECODE_DATE,
  1168. OCI_TYPECODE_MLSLABEL, OROTCOID, OCI_TYPECODE_OCTET, or OROTCLOB.
  1169. This function converts the CREF (stored in the attribute) into a
  1170. typecode.
  1171. NOTES:
  1172. The type must be unpinned when the accessed information is no
  1173. longer needed.
  1174. }
  1175. {------------------------ OCITypeElemType --------------------------------- }
  1176. { ** OBSOLETE ** }
  1177. {$IFNDEF LinkDynamically}
  1178. function OCITypeElemType(env:POCIEnv; err:POCIError; elem:POCITypeElem; var elem_tdo:POCIType):sword;cdecl;external ocilib name 'OCITypeElemType';
  1179. {$ELSE}
  1180. OCITypeElemType : function (env:POCIEnv; err:POCIError; elem:POCITypeElem; var elem_tdo:POCIType):sword;cdecl;
  1181. {$ENDIF}
  1182. {
  1183. PARAMETERS
  1184. env (IN/OUT) - OCI environment handle initialized in object mode
  1185. err (IN/OUT) - error handle. If there is an error, it is
  1186. recorded in 'err' and this function returns OCI_ERROR.
  1187. The error recorded in 'err' can be retrieved by calling
  1188. OCIErrorGet().
  1189. elem (IN) - pointer to the type element descriptor in the object cache
  1190. elem_tdo (OUT) - If the function completes successfully, 'elem_tdo'
  1191. points to the type descriptor (in the object cache) of the type of
  1192. the element.
  1193. REQUIRES
  1194. 1) All type accessors require that the type be pinned before calling
  1195. any accessor. This can be done by calling 'OCITypeByName()'.
  1196. 2) if 'elem' is not null, it must point to a valid type element descriptor
  1197. in the object cache.
  1198. DESCRIPTION
  1199. Get the type tdo of the type of this element.
  1200. RETURNS
  1201. OCI_SUCCESS if the function completes successfully.
  1202. OCI_INVALID_HANDLE if 'env' or 'err' is null.
  1203. OCI_ERROR if
  1204. 1) any of the parameters is null.
  1205. NOTES
  1206. The type must be unpinned when the accessed information is no
  1207. longer needed. This can be done by calling 'OCIObjectUnpin()'.
  1208. }
  1209. {------------------------- OCITypeElemFlags ------------------------------- }
  1210. { ** OBSOLETE ** }
  1211. {$IFNDEF LinkDynamically}
  1212. function OCITypeElemFlags(env:POCIEnv; err:POCIError; elem:POCITypeElem):ub4;cdecl;external ocilib name 'OCITypeElemFlags';
  1213. {$ELSE}
  1214. OCITypeElemFlags : function (env:POCIEnv; err:POCIError; elem:POCITypeElem):ub4;cdecl;
  1215. {$ENDIF}
  1216. {
  1217. NAME: OCITypeElemFlags - OCI Get a Elem's FLags
  1218. (inline, constant, virtual, constructor,
  1219. destructor).
  1220. PARAMETERS:
  1221. env (IN/OUT) - OCI environment handle initialized in object mode
  1222. err (IN/OUT) - error handle. If there is an error, it is
  1223. recorded in 'err' and this function returns OCI_ERROR.
  1224. The error recorded in 'err' can be retrieved by calling
  1225. OCIErrorGet().
  1226. elem (IN) - pointer to the type element descriptor in the object cache
  1227. REQUIRES:
  1228. 1) All type accessors require that the type be pinned before calling
  1229. any accessor.
  1230. 2) All input parameters must not be NULL and must be valid.
  1231. DESCRIPTION:
  1232. Get the flags of a type element (attribute, parameter).
  1233. RETURNS:
  1234. The flags of the type element.
  1235. NOTES:
  1236. The flag bits are not externally documented. Use only the macros
  1237. in the last section (ie. OCI_TYPEPARAM_IS_REQUIRED, and
  1238. OCI_TYPEELEM_IS_REF) to test for them only. The type must be unpinned
  1239. when the accessed information is no longer needed.
  1240. }
  1241. {------------------------ OCITypeElemNumPrec ------------------------------ }
  1242. { ** OBSOLETE ** }
  1243. {$IFNDEF LinkDynamically}
  1244. function OCITypeElemNumPrec(env:POCIEnv; err:POCIError; elem:POCITypeElem):ub1;cdecl;external ocilib name 'OCITypeElemNumPrec';
  1245. {$ELSE}
  1246. OCITypeElemNumPrec : function (env:POCIEnv; err:POCIError; elem:POCITypeElem):ub1;cdecl;
  1247. {$ENDIF}
  1248. {
  1249. NAME: OCITypeElemNumPrec - Get a Number's Precision. This includes float,
  1250. decimal, real, double, and oracle number.
  1251. PARAMETERS:
  1252. env (IN/OUT) - OCI environment handle initialized in object mode
  1253. err (IN/OUT) - error handle. If there is an error, it is
  1254. recorded in 'err' and this function returns OCI_ERROR.
  1255. The error recorded in 'err' can be retrieved by calling
  1256. OCIErrorGet().
  1257. elem (IN) - pointer to the type element descriptor in the object cache
  1258. REQUIRES:
  1259. All input parameters must not be NULL and must be valid.
  1260. DESCRIPTION:
  1261. Get the precision of a float, decimal, long, unsigned long, real,
  1262. double, or Oracle number type.
  1263. RETURNS:
  1264. the precision of the float, decimal, long, unsigned long, real, double,
  1265. or Oracle number
  1266. }
  1267. {------------------------- OCITypeElemNumScale ----------------------------- }
  1268. { ** OBSOLETE ** }
  1269. {$IFNDEF LinkDynamically}
  1270. function OCITypeElemNumScale(env:POCIEnv; err:POCIError; elem:POCITypeElem):sb1;cdecl;external ocilib name 'OCITypeElemNumScale';
  1271. {$ELSE}
  1272. OCITypeElemNumScale : function (env:POCIEnv; err:POCIError; elem:POCITypeElem):sb1;cdecl;
  1273. {$ENDIF}
  1274. {
  1275. NAME: OCITypeElemNumScale - Get a decimal or oracle Number's Scale
  1276. PARAMETERS:
  1277. env (IN/OUT) - OCI environment handle initialized in object mode
  1278. err (IN/OUT) - error handle. If there is an error, it is
  1279. recorded in 'err' and this function returns OCI_ERROR.
  1280. The error recorded in 'err' can be retrieved by calling
  1281. OCIErrorGet().
  1282. elem (IN) - pointer to the type element descriptor in the object cache
  1283. REQUIRES:
  1284. All input parameters must not be NULL and must be valid.
  1285. DESCRIPTION:
  1286. Get the scale of a decimal, or Oracle number type.
  1287. RETURNS:
  1288. the scale of the decimal, or Oracle number
  1289. }
  1290. {------------------------ OCITypeElemLength ------------------------------- }
  1291. { ** OBSOLETE ** }
  1292. {$IFNDEF LinkDynamically}
  1293. function OCITypeElemLength(env:POCIEnv; err:POCIError; elem:POCITypeElem):ub4;cdecl;external ocilib name 'OCITypeElemLength';
  1294. {$ELSE}
  1295. OCITypeElemLength : function (env:POCIEnv; err:POCIError; elem:POCITypeElem):ub4;cdecl;
  1296. {$ENDIF}
  1297. {
  1298. NAME: OCITypeElemLength - Get a raw, fixed or variable length String's
  1299. length in bytes.
  1300. PARAMETERS:
  1301. env (IN/OUT) - OCI environment handle initialized in object mode
  1302. err (IN/OUT) - error handle. If there is an error, it is
  1303. recorded in 'err' and this function returns OCI_ERROR.
  1304. The error recorded in 'err' can be retrieved by calling
  1305. OCIErrorGet().
  1306. elem (IN) - pointer to the type element descriptor in the object cache
  1307. REQUIRES:
  1308. All input parameters must not be NULL and must be valid.
  1309. DESCRIPTION:
  1310. Get the length of a raw, fixed or variable length string type.
  1311. RETURNS:
  1312. length of the raw, fixed or variable length string
  1313. }
  1314. {----------------------- OCITypeElemCharSetID ----------------------------- }
  1315. { ** OBSOLETE ** }
  1316. {$IFNDEF LinkDynamically}
  1317. function OCITypeElemCharSetID(env:POCIEnv; err:POCIError; elem:POCITypeElem):ub2;cdecl;external ocilib name 'OCITypeElemCharSetID';
  1318. {$ELSE}
  1319. OCITypeElemCharSetID : function (env:POCIEnv; err:POCIError; elem:POCITypeElem):ub2;cdecl;
  1320. {$ENDIF}
  1321. {
  1322. NAME: OCITypeElemCharSetID - Get a fixed or variable length String's
  1323. character set ID
  1324. PARAMETERS:
  1325. env (IN/OUT) - OCI environment handle initialized in object mode
  1326. err (IN/OUT) - error handle. If there is an error, it is
  1327. recorded in 'err' and this function returns OCI_ERROR.
  1328. The error recorded in 'err' can be retrieved by calling
  1329. OCIErrorGet().
  1330. elem (IN) - pointer to the type element descriptor in the object cache
  1331. REQUIRES:
  1332. All input parameters must not be NULL and must be valid.
  1333. DESCRIPTION:
  1334. Get the character set ID of a fixed or variable length string type.
  1335. RETURNS:
  1336. character set ID of the fixed or variable length string
  1337. }
  1338. {---------------------- OCITypeElemCharSetForm ---------------------------- }
  1339. { ** OBSOLETE ** }
  1340. {$IFNDEF LinkDynamically}
  1341. function OCITypeElemCharSetForm(env:POCIEnv; err:POCIError; elem:POCITypeElem):ub2;cdecl;external ocilib name 'OCITypeElemCharSetForm';
  1342. {$ELSE}
  1343. OCITypeElemCharSetForm : function (env:POCIEnv; err:POCIError; elem:POCITypeElem):ub2;cdecl;
  1344. {$ENDIF}
  1345. {
  1346. NAME: OCITypeElemCharSetForm - Get a fixed or variable length String's
  1347. character set specification form.
  1348. PARAMETERS:
  1349. env (IN/OUT) - OCI environment handle initialized in object mode
  1350. err (IN/OUT) - error handle. If there is an error, it is
  1351. recorded in 'err' and this function returns OCI_ERROR.
  1352. The error recorded in 'err' can be retrieved by calling
  1353. OCIErrorGet().
  1354. elem (IN) - pointer to the attribute information in the object cache
  1355. REQUIRES:
  1356. All input parameters must not be NULL and must be valid.
  1357. DESCRIPTION:
  1358. Get the character form of a fixed or variable length string type.
  1359. The character form is an enumerated value that can be one of the
  1360. 4 values below:
  1361. SQLCS_IMPLICIT for CHAR, VARCHAR2, CLOB w/o a specified set
  1362. SQLCS_NCHAR for NCHAR, NCHAR VARYING, NCLOB
  1363. SQLCS_EXPLICIT for CHAR, etc, with "CHARACTER SET ..." syntax
  1364. SQLCS_FLEXIBLE for PL/SQL "flexible" parameters
  1365. RETURNS:
  1366. character form of the fixed or variable string
  1367. }
  1368. {--------------------- OCITypeElemParameterizedType ------------------------ }
  1369. { ** OBSOLETE ** }
  1370. {$IFNDEF LinkDynamically}
  1371. function OCITypeElemParameterizedType(env:POCIEnv; err:POCIError; elem:POCITypeElem; var type_stored:POCIType):sword;cdecl;external ocilib name 'OCITypeElemParameterizedType';
  1372. {$ELSE}
  1373. OCITypeElemParameterizedType : function (env:POCIEnv; err:POCIError; elem:POCITypeElem; var type_stored:POCIType):sword;cdecl;
  1374. {$ENDIF}
  1375. {
  1376. NAME: OCITypeElemParameterizedType
  1377. PARAMETERS:
  1378. env (IN/OUT) - OCI environment handle initialized in object mode
  1379. err (IN/OUT) - error handle. If there is an error, it is
  1380. recorded in 'err' and this function returns OCI_ERROR.
  1381. The error recorded in 'err' can be retrieved by calling
  1382. OCIErrorGet().
  1383. elem (IN) - pointer to the type element descriptor in the object cache
  1384. type_stored (OUT) - If the function completes successfully,
  1385. and the parameterized type is complex, 'type_stored' is NULL.
  1386. Otherwise, 'type_stored' points to the type descriptor (in the
  1387. object cache) of the type that is stored in the parameterized
  1388. type. The caller must allocate space for the OCIType*
  1389. before calling this routine and must not write into the space.
  1390. REQUIRES:
  1391. All input parameters must be valid.
  1392. DESCRIPTION:
  1393. Get a descriptor to the parameter type of a parameterized type.
  1394. Parameterized types are types of the form:
  1395. REF T
  1396. VARRAY (n) OF T
  1397. etc, where T is the parameter in the parameterized type.
  1398. Additionally is_ref is set if the parameter is a PTR or REF.
  1399. For example, it is set for REF T or VARRAY(n) OF REF T.
  1400. RETURNS:
  1401. OCI_SUCCESS if the function completes successfully.
  1402. OCI_INVALID_HANDLE if 'env' or 'err' is null.
  1403. OCI_ERROR if
  1404. 1) any of the parameters is null.
  1405. 2) 'type_stored' is not NULL but points to NULL data.
  1406. NOTES:
  1407. Complex parameterized types will be in a future release (once
  1408. typedefs are supported. When setting the parameterized type
  1409. information, the user must typedef the contents if it's a
  1410. complex parameterized type. Ex. for varray<varray<car>>, use
  1411. 'typedef varray<car> varcar' and then use varray<varcar>.
  1412. }
  1413. {----------------------- OCITypeElemExtTypeCode ---------------------------- }
  1414. { ** OBSOLETE ** }
  1415. {$IFNDEF LinkDynamically}
  1416. function OCITypeElemExtTypeCode(env:POCIEnv; err:POCIError; elem:POCITypeElem):OCITypeCode;cdecl;external ocilib name 'OCITypeElemExtTypeCode';
  1417. {$ELSE}
  1418. OCITypeElemExtTypeCode : function (env:POCIEnv; err:POCIError; elem:POCITypeElem):OCITypeCode;cdecl;
  1419. {$ENDIF}
  1420. {
  1421. NAME: OCITypeElemExtTypeCode - OCI Get an element's SQLT constant.
  1422. PARAMETERS:
  1423. env (IN/OUT) - OCI environment handle initialized in object mode
  1424. err (IN/OUT) - error handle. If there is an error, it is
  1425. recorded in 'err' and this function returns OCI_ERROR.
  1426. The error recorded in 'err' can be retrieved by calling
  1427. OCIErrorGet().
  1428. elem (IN) - pointer to the type element descriptor in the object cache
  1429. REQUIRES:
  1430. 1) All type accessors require that the type be pinned before calling
  1431. any accessor.
  1432. 2) All input parameters must not be NULL and must be valid.
  1433. DESCRIPTION:
  1434. Get the internal Oracle typecode associated with an attribute's type.
  1435. This is the actual typecode for the attribute when it gets mapped
  1436. to a column in the Oracle database.
  1437. RETURNS:
  1438. The Oracle typecode associated with the attribute's type.
  1439. NOTES:
  1440. The type must be unpinned when the accessed information is no
  1441. longer needed.
  1442. }
  1443. {-------------------------------------------------------------------------- }
  1444. { ATTRIBUTE ACCESSORS }
  1445. {-------------------------------------------------------------------------- }
  1446. {------------------------ OCITypeAttrByName ------------------------------- }
  1447. { ** OBSOLETE ** }
  1448. {$IFNDEF LinkDynamically}
  1449. function OCITypeAttrByName(env:POCIEnv; err:POCIError; tdo:POCIType; name:Poratext; n_length:ub4;
  1450. var elem:POCITypeElem):sword;cdecl;external ocilib name 'OCITypeAttrByName';
  1451. {$ELSE}
  1452. OCITypeAttrByName : function (env:POCIEnv; err:POCIError; tdo:POCIType; name:Poratext; n_length:ub4;
  1453. var elem:POCITypeElem):sword;cdecl;
  1454. {$ENDIF}
  1455. {
  1456. NAME: OCITypeAttrByName - OCI Get an Attribute By Name.
  1457. PARAMETERS:
  1458. env (IN/OUT) - OCI environment handle initialized in object mode
  1459. err (IN/OUT) - error handle. If there is an error, it is
  1460. recorded in 'err' and this function returns OCI_ERROR.
  1461. The error recorded in 'err' can be retrieved by calling
  1462. OCIErrorGet().
  1463. tdo (IN) - pointer to to the type descriptor in the object cache
  1464. name (IN) - the attribute's name
  1465. n_length (IN) - length (in bytes) of the 'name' parameter
  1466. elem (OUT) - If this function completes successfully, 'elem' points to
  1467. the selected type element descriptor pertaining to the
  1468. attributein the object cache.
  1469. REQUIRES:
  1470. 1) All type accessors require that the type be pinned before calling
  1471. any accessor.
  1472. 2) if 'tdo' is not null, it must point to a valid type descriptor
  1473. in the object cache.
  1474. DESCRIPTION:
  1475. Get an attribute given its name.
  1476. RETURNS:
  1477. OCI_SUCCESS if the function completes successfully.
  1478. OCI_INVALID_HANDLE if 'env' or 'err' is null.
  1479. OCI_ERROR if
  1480. 1) any of the required parameters is null.
  1481. 2) the type does not contain an attribute with the input 'name'.
  1482. 3) 'name' is NULL.
  1483. NOTES:
  1484. The type descriptor, 'tdo', must be unpinned when the accessed
  1485. information is no longer needed.
  1486. Schema and type names are CASE-SENSITIVE. If they have been created
  1487. via SQL, you need to use uppercase names.
  1488. }
  1489. {------------------------ OCITypeAttrNext --------------------------------- }
  1490. { ** OBSOLETE ** }
  1491. {$IFNDEF LinkDynamically}
  1492. function OCITypeAttrNext(env:POCIEnv; err:POCIError; iterator_ort:POCITypeIter; var elem:POCITypeElem):sword;cdecl;external ocilib name 'OCITypeAttrNext';
  1493. {$ELSE}
  1494. OCITypeAttrNext : function (env:POCIEnv; err:POCIError; iterator_ort:POCITypeIter; var elem:POCITypeElem):sword;cdecl;
  1495. {$ENDIF}
  1496. {
  1497. NAME: OCITypeAttrNext - OCI Get an Attribute By Iteration.
  1498. PARAMETERS:
  1499. env (IN/OUT) - OCI environment handle initialized in object mode
  1500. err (IN/OUT) - error handle. If there is an error, it is
  1501. recorded in 'err' and this function returns OCI_ERROR.
  1502. The error recorded in 'err' can be retrieved by calling
  1503. OCIErrorGet().
  1504. iterator_ort (IN/OUT) - iterator for retrieving the next attribute;
  1505. see OCITypeIterNew() to initialize iterator.
  1506. elem (OUT) - If this function completes successfully, 'elem' points to
  1507. the selected type element descriptor pertaining to the
  1508. attributein the object cache.
  1509. REQUIRES:
  1510. 1) All type accessors require that the type be pinned before calling
  1511. any accessor.
  1512. 2) if 'tdo' is not null, it must point to a valid type descriptor
  1513. in the object cache.
  1514. DESCRIPTION:
  1515. Iterate to the next attribute to retrieve.
  1516. RETURNS:
  1517. OCI_SUCCESS if the function completes successfully.
  1518. OCI_NO_DATA if there are no more attributes to iterate on; use
  1519. OCITypeIterSet() to reset the iterator if necessary.
  1520. OCI_INVALID_HANDLE if 'env' or 'err' is null.
  1521. OCI_ERROR if
  1522. 1) any of the required parameters is null.
  1523. NOTES:
  1524. The type must be unpinned when the accessed information is no
  1525. longer needed.
  1526. }
  1527. {-------------------------------------------------------------------------- }
  1528. { COLLECTION ACCESSORS }
  1529. {-------------------------------------------------------------------------- }
  1530. {------------------------ OCITypeCollElem --------------------------------- }
  1531. { ** OBSOLETE ** }
  1532. {$IFNDEF LinkDynamically}
  1533. function OCITypeCollElem(env:POCIEnv; err:POCIError; tdo:POCIType; var element:POCITypeElem):sword;cdecl;external ocilib name 'OCITypeCollElem';
  1534. {$ELSE}
  1535. OCITypeCollElem : function (env:POCIEnv; err:POCIError; tdo:POCIType; var element:POCITypeElem):sword;cdecl;
  1536. {$ENDIF}
  1537. {
  1538. NAME: OCITypeCollElem
  1539. PARAMETERS:
  1540. env (IN/OUT) - OCI environment handle initialized in object mode
  1541. err (IN/OUT) - error handle. If there is an error, it is
  1542. recorded in 'err' and this function returns OCI_ERROR.
  1543. The error recorded in 'err' can be retrieved by calling
  1544. OCIErrorGet().
  1545. tdo (IN) - pointer to the type descriptor in the object cache
  1546. element (IN/OUT) - If the function completes successfully, this
  1547. points to the descriptor for the collection's element.
  1548. It is stored in the same format as an ADT attribute's
  1549. descriptor.
  1550. If *element is NULL, OCITypeCollElem() implicitly allocates a
  1551. new instance of OCITypeElem in the object cache. This instance
  1552. will be
  1553. automatically freed at the end of the session, and does not have
  1554. to be freed explicitly.
  1555. If *element is not NULL, OCITypeCollElem() assumes that it
  1556. points to a valid OCITypeElem descriptor and will copy the
  1557. results into it.
  1558. REQUIRES:
  1559. All input parameters must be valid.
  1560. DESCRIPTION:
  1561. Get a pointer to the descriptor (OCITypeElem) of the element of an
  1562. array or the rowtype of a nested table.
  1563. RETURNS:
  1564. OCI_SUCCESS if the function completes successfully.
  1565. OCI_INVALID_HANDLE if 'env' or 'err' is null.
  1566. OCI_ERROR if
  1567. 1) any of the parameters is null.
  1568. 2) the type TDO does not point to a valid collection's type.
  1569. NOTES:
  1570. Complex parameterized types will be in a future release (once
  1571. typedefs are supported. When setting the parameterized type
  1572. information, the user must typedef the contents if it's a
  1573. complex parameterized type. Ex. for varray<varray<car>>, use
  1574. 'typedef varray<car> varcar' and then use varray<varcar>.
  1575. }
  1576. {------------------------ OCITypeCollSize --------------------------------- }
  1577. { ** OBSOLETE ** }
  1578. {$IFNDEF LinkDynamically}
  1579. function OCITypeCollSize(env:POCIEnv; err:POCIError; tdo:POCIType; num_elems:Pub4):sword;cdecl;external ocilib name 'OCITypeCollSize';
  1580. {$ELSE}
  1581. OCITypeCollSize : function (env:POCIEnv; err:POCIError; tdo:POCIType; num_elems:Pub4):sword;cdecl;
  1582. {$ENDIF}
  1583. {
  1584. NAME: OCITypeCollSize - OCI Get a Collection's Number of Elements.
  1585. PARAMETERS:
  1586. env (IN/OUT) - OCI environment handle initialized in object mode
  1587. err (IN/OUT) - error handle. If there is an error, it is
  1588. recorded in 'err' and this function returns OCI_ERROR.
  1589. The error recorded in 'err' can be retrieved by calling
  1590. OCIErrorGet().
  1591. tdo (IN) - pointer to the type descriptor in the object cache
  1592. num_elems (OUT) - number of elements in collection
  1593. REQUIRES:
  1594. All input parameters must be valid. tdo points to an array type
  1595. defined as a domain.
  1596. DESCRIPTION:
  1597. Get the number of elements stored in a fixed array or the maximum
  1598. number of elements in a variable array.
  1599. RETURNS:
  1600. OCI_SUCCESS if the function completes successfully.
  1601. OCI_INVALID_HANDLE if 'env' or 'err' is null.
  1602. OCI_ERROR if
  1603. 1) any of the parameters is null.
  1604. 2) 'tdo' does not point to a domain with a collection type.
  1605. NOTES:
  1606. Complex parameterized types will be in a future release (once
  1607. typedefs are supported. When setting the parameterized type
  1608. information, the user must typedef the contents if it's a
  1609. complex parameterized type. Ex. for varray<varray<car>>, use
  1610. 'typedef varray<car> varcar' and then use varray<varcar>.
  1611. }
  1612. {------------------------ OCITypeCollExtTypeCode --------------------------- }
  1613. { ** OBSOLETE ** }
  1614. {$IFNDEF LinkDynamically}
  1615. function OCITypeCollExtTypeCode(env:POCIEnv; err:POCIError; tdo:POCIType; sqt_code:POCITypeCode):sword;cdecl;external ocilib name 'OCITypeCollExtTypeCode';
  1616. {$ELSE}
  1617. OCITypeCollExtTypeCode : function (env:POCIEnv; err:POCIError; tdo:POCIType; sqt_code:POCITypeCode):sword;cdecl;
  1618. {$ENDIF}
  1619. {
  1620. NAME: ortcsqt - OCI Get a Collection element's DTY constant.
  1621. PARAMETERS:
  1622. env (IN/OUT) - OCI environment handle initialized in object mode
  1623. err (IN/OUT) - error handle. If there is an error, it is
  1624. recorded in 'err' and this function returns OCI_ERROR.
  1625. The error recorded in 'err' can be retrieved by calling
  1626. OCIErrorGet().
  1627. tdo (IN) - pointer to the type descriptor in the object cache
  1628. sqt_code (OUT) - SQLT code of type element.
  1629. REQUIRES:
  1630. 1) All type accessors require that the type be pinned before calling
  1631. any accessor.
  1632. 2) All input parameters must not be NULL and must be valid.
  1633. DESCRIPTION:
  1634. Get the SQLT constant associated with an domain's element type.
  1635. The SQLT codes are defined in <sqldef.h> and are needed for OCI/OOCI
  1636. use.
  1637. RETURNS:
  1638. OCI_SUCCESS if the function completes successfully.
  1639. OCI_INVALID_HANDLE if 'env' or 'err' is null.
  1640. OCI_ERROR if
  1641. 1) any of the parameters is null.
  1642. 2) 'tdo' does not point to a domain with a collection type.
  1643. NOTES:
  1644. The type must be unpinned when the accessed information is no
  1645. longer needed.
  1646. }
  1647. {-------------------------------------------------------------------------- }
  1648. { METHOD ACCESSORS }
  1649. {-------------------------------------------------------------------------- }
  1650. {------------------------- OCITypeMethodOverload -------------------------- }
  1651. { ** OBSOLETE ** }
  1652. {$IFNDEF LinkDynamically}
  1653. function OCITypeMethodOverload(env:POCIEnv; err:POCIError; tdo:POCIType; method_name:Poratext; m_length:ub4):ub4;cdecl;external ocilib name 'OCITypeMethodOverload';
  1654. {$ELSE}
  1655. OCITypeMethodOverload : function (env:POCIEnv; err:POCIError; tdo:POCIType; method_name:Poratext; m_length:ub4):ub4;cdecl;
  1656. {$ENDIF}
  1657. {
  1658. NAME: OCITypeMethodOverload - OCI Get type's Number of Overloaded names
  1659. for the given method name.
  1660. PARAMETERS:
  1661. gp (IN/OUT) - pga environment handle. Any errors are recorded here.
  1662. tdo (IN) - pointer to to the type descriptor in the object cache
  1663. method_name (IN) - the method's name
  1664. m_length (IN) - length (in bytes) of the 'method_name' parameter
  1665. REQUIRES:
  1666. 1) All type accessors require that the type be pinned before calling
  1667. any accessor.
  1668. 2) if 'tdo' is not null, it must point to a valid type descriptor
  1669. in the object cache.
  1670. DESCRIPTION:
  1671. Overloading of methods implies that more than one method may have the
  1672. same method name. This routine returns the number of methods that
  1673. have the given method name. If there are no methods with the input
  1674. method name, 'num_methods' is 0. The caller uses this information when
  1675. allocating space for the array of mdo and/or position pointers before
  1676. calling 'OCITypeMethodByName()' or 'ortgmps()'.
  1677. RETURNS:
  1678. The number of methods with the given name. 0 if none contains the
  1679. name.
  1680. NOTES:
  1681. Schema and type names are CASE-SENSITIVE. If they have been created
  1682. via SQL, you need to use uppercase names.
  1683. }
  1684. {------------------------ OCITypeMethodByName ------------------------------ }
  1685. { ** OBSOLETE ** }
  1686. {$IFNDEF LinkDynamically}
  1687. function OCITypeMethodByName(env:POCIEnv; err:POCIError; tdo:POCIType; method_name:Poratext; m_length:ub4;
  1688. var mdos:POCITypeMethod):sword;cdecl;external ocilib name 'OCITypeMethodByName';
  1689. {$ELSE}
  1690. OCITypeMethodByName : function (env:POCIEnv; err:POCIError; tdo:POCIType; method_name:Poratext; m_length:ub4;
  1691. var mdos:POCITypeMethod):sword;cdecl;
  1692. {$ENDIF}
  1693. {
  1694. NAME: OCITypeMethodByName - OCI Get one or more Methods with Name.
  1695. PARAMETERS:
  1696. env (IN/OUT) - OCI environment handle initialized in object mode
  1697. err (IN/OUT) - error handle. If there is an error, it is
  1698. recorded in 'err' and this function returns OCI_ERROR.
  1699. The error recorded in 'err' can be retrieved by calling
  1700. OCIErrorGet().
  1701. tdo (IN) - pointer to to the type descriptor in the object cache
  1702. method_name (IN) - the methods' name
  1703. m_length (IN) - length (in bytes) of the 'name' parameter
  1704. mdos (OUT) - If this function completes successfully, 'mdos' points to
  1705. the selected methods in the object cache. The caller must
  1706. allocate space for the array of OCITypeMethod pointers before
  1707. calling this routine and must not write into the space.
  1708. The number of OCITypeMethod pointers that will be returned can
  1709. be obtained by calling 'OCITypeMethodOverload()'.
  1710. REQUIRES:
  1711. 1) All type accessors require that the type be pinned before calling
  1712. any accessor.
  1713. 2) if 'tdo' is not null, it must point to a valid type descriptor
  1714. in the object cache.
  1715. DESCRIPTION:
  1716. Get one or more methods given the name.
  1717. RETURNS:
  1718. OCI_SUCCESS if the function completes successfully.
  1719. OCI_INVALID_HANDLE if 'env' or 'err' is null.
  1720. OCI_ERROR if
  1721. 1) any of the required parameters is null.
  1722. 2) No methods in type has name 'name'.
  1723. 3) 'mdos' is not NULL but points to NULL data.
  1724. NOTES:
  1725. The type must be unpinned when the accessed information is no
  1726. longer needed.
  1727. Schema and type names are CASE-SENSITIVE. If they have been created
  1728. via SQL, you need to use uppercase names.
  1729. }
  1730. {------------------------ OCITypeMethodNext -------------------------------- }
  1731. { ** OBSOLETE ** }
  1732. {$IFNDEF LinkDynamically}
  1733. function OCITypeMethodNext(env:POCIEnv; err:POCIError; iterator_ort:POCITypeIter; var mdo:POCITypeMethod):sword;cdecl;external ocilib name 'OCITypeMethodNext';
  1734. {$ELSE}
  1735. OCITypeMethodNext : function (env:POCIEnv; err:POCIError; iterator_ort:POCITypeIter; var mdo:POCITypeMethod):sword;cdecl;
  1736. {$ENDIF}
  1737. {
  1738. NAME: OCITypeMethodNext - OCI Get a Method By Iteration.
  1739. PARAMETERS:
  1740. env (IN/OUT) - OCI environment handle initialized in object mode
  1741. err (IN/OUT) - error handle. If there is an error, it is
  1742. recorded in 'err' and this function returns OCI_ERROR.
  1743. The error recorded in 'err' can be retrieved by calling
  1744. OCIErrorGet().
  1745. iterator_ort (IN/OUT) - iterator for retrieving the next method;
  1746. see OCITypeIterNew() to set iterator.
  1747. mdo (OUT) - If this function completes successfully, 'mdo' points to
  1748. the selected method descriptor in the object cache. Positions
  1749. start at 1. The caller must allocate space for the
  1750. OCITypeMethod* before calling this routine and must not write
  1751. nto the space.
  1752. REQUIRES:
  1753. 1) All type accessors require that the type be pinned before calling
  1754. any accessor.
  1755. 2) if 'tdo' is not null, it must point to a valid type descriptor
  1756. in the object cache.
  1757. DESCRIPTION:
  1758. Iterate to the next method to retrieve.
  1759. RETURNS:
  1760. OCI_SUCCESS if the function completes successfully.
  1761. OCI_NO_DATA if there are no more attributes to iterate on; use
  1762. OCITypeIterSet() to reset the iterator if necessary.
  1763. OCI_INVALID_HANDLE if 'env' or 'err' is null.
  1764. OCI_ERROR if
  1765. 1) any of the required parameters is null.
  1766. 2) 'mdo' is not NULL but points to NULL data.
  1767. NOTES:
  1768. The type must be unpinned when the accessed information is no
  1769. longer needed.
  1770. }
  1771. {------------------------ OCITypeMethodName -------------------------------- }
  1772. { ** OBSOLETE ** }
  1773. {$IFNDEF LinkDynamically}
  1774. function OCITypeMethodName(env:POCIEnv; err:POCIError; mdo:POCITypeMethod; n_length:Pub4):Poratext;cdecl;external ocilib name 'OCITypeMethodName';
  1775. {$ELSE}
  1776. OCITypeMethodName : function (env:POCIEnv; err:POCIError; mdo:POCITypeMethod; n_length:Pub4):Poratext;cdecl;
  1777. {$ENDIF}
  1778. {
  1779. NAME: OCITypeMethodName - OCI Get a Method's NaMe.
  1780. PARAMETERS:
  1781. env (IN/OUT) - OCI environment handle initialized in object mode
  1782. err (IN/OUT) - error handle. If there is an error, it is
  1783. recorded in 'err' and this function returns OCI_ERROR.
  1784. The error recorded in 'err' can be retrieved by calling
  1785. OCIErrorGet().
  1786. mdo (IN) - pointer to the method descriptor in the object cache
  1787. n_length (OUT) - length (in bytes) of the 'name' parameter. The caller
  1788. must allocate space for the ub4 before calling this routine.
  1789. REQUIRES:
  1790. 1) All type accessors require that the type be pinned before calling
  1791. any accessor.
  1792. 2) All input parameters must not be NULL and must be valid.
  1793. DESCRIPTION:
  1794. Get the (non-unique) real name of the method.
  1795. RETURNS:
  1796. the non-unique name of the method or NULL if there is an error.
  1797. NOTES:
  1798. The type must be unpinned when the accessed information is no
  1799. longer needed.
  1800. }
  1801. {------------------------ OCITypeMethodEncap ------------------------------- }
  1802. { ** OBSOLETE ** }
  1803. {$IFNDEF LinkDynamically}
  1804. function OCITypeMethodEncap(env:POCIEnv; err:POCIError; mdo:POCITypeMethod):OCITypeEncap;cdecl;external ocilib name 'OCITypeMethodName';
  1805. {$ELSE}
  1806. OCITypeMethodEncap : function (env:POCIEnv; err:POCIError; mdo:POCITypeMethod):OCITypeEncap;cdecl;
  1807. {$ENDIF}
  1808. {
  1809. NAME: OCITypeMethodEncap - Get a Method's ENcapsulation (private/public).
  1810. PARAMETERS:
  1811. env (IN/OUT) - OCI environment handle initialized in object mode
  1812. err (IN/OUT) - error handle. If there is an error, it is
  1813. recorded in 'err' and this function returns OCI_ERROR.
  1814. The error recorded in 'err' can be retrieved by calling
  1815. OCIErrorGet().
  1816. mdo (IN) - pointer to the method descriptor in the object cache
  1817. REQUIRES:
  1818. 1) All type accessors require that the type be pinned before calling
  1819. any accessor.
  1820. 2) All input parameters must not be NULL and must be valid.
  1821. DESCRIPTION:
  1822. Get the encapsulation (private, or public) of a method.
  1823. RETURNS:
  1824. the encapsulation (private, or public) of the method
  1825. NOTES:
  1826. The type must be unpinned when the accessed information is no
  1827. longer needed.
  1828. }
  1829. {------------------------ OCITypeMethodFlags ------------------------------- }
  1830. { ** OBSOLETE ** }
  1831. {$IFNDEF LinkDynamically}
  1832. function OCITypeMethodFlags (env:POCIEnv; err:POCIError; mdo:POCITypeMethod):OCITypeMethodFlag;cdecl;external ocilib name 'OCITypeMethodEncap';
  1833. {$ELSE}
  1834. OCITypeMethodFlags : function (env:POCIEnv; err:POCIError; mdo:POCITypeMethod):OCITypeMethodFlag;cdecl;
  1835. {$ENDIF}
  1836. {
  1837. NAME: OCITypeMethodFlags - OCI Get a Method's FLags
  1838. (inline, constant, virtual, constructor,
  1839. destructor).
  1840. PARAMETERS:
  1841. env (IN/OUT) - OCI environment handle initialized in object mode
  1842. err (IN/OUT) - error handle. If there is an error, it is
  1843. recorded in 'err' and this function returns OCI_ERROR.
  1844. The error recorded in 'err' can be retrieved by calling
  1845. OCIErrorGet().
  1846. mdo (IN) - pointer to the method descriptor in the object cache
  1847. REQUIRES:
  1848. 1) All type accessors require that the type be pinned before calling
  1849. any accessor.
  1850. 2) All input parameters must not be NULL and must be valid.
  1851. DESCRIPTION:
  1852. Get the flags (inline, constant, virutal, constructor, destructor) of
  1853. a method.
  1854. RETURNS:
  1855. the flags (inline, constant, virutal, constructor, destructor) of
  1856. the method
  1857. NOTES:
  1858. The type must be unpinned when the accessed information is no
  1859. longer needed.
  1860. }
  1861. {------------------------ OCITypeMethodMap --------------------------------- }
  1862. { ** OBSOLETE ** }
  1863. {$IFNDEF LinkDynamically}
  1864. function OCITypeMethodMap(env:POCIEnv; err:POCIError; tdo:POCIType; var mdo:POCITypeMethod):sword;cdecl;external ocilib name 'OCITypeMethodMap';
  1865. {$ELSE}
  1866. OCITypeMethodMap : function (env:POCIEnv; err:POCIError; tdo:POCIType; var mdo:POCITypeMethod):sword;cdecl;
  1867. {$ENDIF}
  1868. {
  1869. NAME: OCITypeMethodMap - OCI Get the Method's MAP function.
  1870. PARAMETERS:
  1871. env (IN/OUT) - OCI environment handle initialized in object mode
  1872. err (IN/OUT) - error handle. If there is an error, it is
  1873. recorded in 'err' and this function returns OCI_ERROR.
  1874. The error recorded in 'err' can be retrieved by calling
  1875. OCIErrorGet().
  1876. tdo (IN) - pointer to to the type descriptor in the object cache
  1877. mdo (OUT) - If this function completes successfully, and there is a
  1878. map function for this type, 'mdo' points to the selected method
  1879. descriptor in the object cache. Otherwise, 'mdo' is null.
  1880. REQUIRES:
  1881. 1) All type accessors require that the type be pinned before calling
  1882. any accessor.
  1883. 2) All required input parameters must not be NULL and must be valid.
  1884. DESCRIPTION:
  1885. A type may have only one map function. 'OCITypeMethodMap()' finds
  1886. this function, if it exists, and returns a reference and a pointer to
  1887. the method descriptor in the object cache. If the type does not have a
  1888. map (relative ordering) function, then 'mdo_ref' and 'mdo' are set
  1889. to null and an error is returned.
  1890. RETURNS:
  1891. OCI_SUCCESS if the function completes successfully.
  1892. OCI_INVALID_HANDLE if 'env' or 'err' is null.
  1893. OCI_ERROR if
  1894. the type does not contain a map function.
  1895. NOTES:
  1896. The type must be unpinned when the accessed information is no
  1897. longer needed.
  1898. }
  1899. {------------------------ OCITypeMethodOrder ------------------------------- }
  1900. { ** OBSOLETE ** }
  1901. {$IFNDEF LinkDynamically}
  1902. function OCITypeMethodOrder(env:POCIEnv; err:POCIError; tdo:POCIType; var mdo:POCITypeMethod):sword;cdecl;external ocilib name 'OCITypeMethodOrder';
  1903. {$ELSE}
  1904. OCITypeMethodOrder : function (env:POCIEnv; err:POCIError; tdo:POCIType; var mdo:POCITypeMethod):sword;cdecl;
  1905. {$ENDIF}
  1906. {
  1907. NAME: OCITypeMethodOrder - OCI Get the Method's ORder function.
  1908. PARAMETERS:
  1909. env (IN/OUT) - OCI environment handle initialized in object mode
  1910. err (IN/OUT) - error handle. If there is an error, it is
  1911. recorded in 'err' and this function returns OCI_ERROR.
  1912. The error recorded in 'err' can be retrieved by calling
  1913. OCIErrorGet().
  1914. tdo (IN) - pointer to to the type descriptor in the object cache
  1915. mdo (OUT) - If this function completes successfully, and there is a
  1916. map function for this type, 'mdo' points to the selected method
  1917. descriptor in the object cache. Otherwise, 'mdo' is null.
  1918. REQUIRES:
  1919. 1) All type accessors require that the type be pinned before calling
  1920. any accessor.
  1921. 2) All required input parameters must not be NULL and must be valid.
  1922. DESCRIPTION:
  1923. A type may have only one ORder or MAP function. 'OCITypeMethodOrder()'
  1924. finds this function, if it exists, and returns a ref and a pointer
  1925. to the method descriptor in the object cache. If the type does not
  1926. have a map (relative ordering) function, then 'mdo_ref' and 'mdo' are
  1927. set to null and an error is returned.
  1928. RETURNS:
  1929. OCI_SUCCESS if the function completes successfully.
  1930. OCI_INVALID_HANDLE if 'env' or 'err' is null.
  1931. OCI_ERROR if
  1932. the type does not contain a map function.
  1933. NOTES:
  1934. The type must be unpinned when the accessed information is no
  1935. longer needed.
  1936. }
  1937. {------------------------ OCITypeMethodParams ------------------------------ }
  1938. { ** OBSOLETE ** }
  1939. {$IFNDEF LinkDynamically}
  1940. function OCITypeMethodParams(env:POCIEnv; err:POCIError; mdo:POCITypeMethod):ub4;cdecl;external ocilib name 'OCITypeMethodParams';
  1941. {$ELSE}
  1942. OCITypeMethodParams : function (env:POCIEnv; err:POCIError; mdo:POCITypeMethod):ub4;cdecl;
  1943. {$ENDIF}
  1944. {
  1945. NAME: OCITypeMethodParams - OCI Get a Method's Number of Parameters.
  1946. PARAMETERS:
  1947. env (IN/OUT) - OCI environment handle initialized in object mode
  1948. err (IN/OUT) - error handle. If there is an error, it is
  1949. recorded in 'err' and this function returns OCI_ERROR.
  1950. The error recorded in 'err' can be retrieved by calling
  1951. OCIErrorGet().
  1952. mdo (IN) - pointer to the method descriptor in the object cache
  1953. REQUIRES:
  1954. 1) All type accessors require that the type be pinned before calling
  1955. any accessor.
  1956. 2) All input parameters must not be NULL and must be valid.
  1957. DESCRIPTION:
  1958. Get the number of parameters in a method.
  1959. RETURNS:
  1960. the number of parameters in the method
  1961. NOTES:
  1962. The type must be unpinned when the accessed information is no
  1963. longer needed.
  1964. }
  1965. {-------------------------------------------------------------------------- }
  1966. { RESULT ACCESSORS }
  1967. {-------------------------------------------------------------------------- }
  1968. {-------------------------- OCITypeResult --------------------------------- }
  1969. { ** OBSOLETE ** }
  1970. {$IFNDEF LinkDynamically}
  1971. function OCITypeResult(env:POCIEnv; err:POCIError; mdo:POCITypeMethod; var elem:POCITypeElem):sword;cdecl;external ocilib name 'OCITypeResult';
  1972. {$ELSE}
  1973. OCITypeResult : function (env:POCIEnv; err:POCIError; mdo:POCITypeMethod; var elem:POCITypeElem):sword;cdecl;
  1974. {$ENDIF}
  1975. {
  1976. NAME: OCITypeResult - OCI Get a method's result type descriptor.
  1977. PARAMETERS:
  1978. env (IN/OUT) - OCI environment handle initialized in object mode
  1979. err (IN/OUT) - error handle. If there is an error, it is
  1980. recorded in 'err' and this function returns OCI_ERROR.
  1981. The error recorded in 'err' can be retrieved by calling
  1982. OCIErrorGet().
  1983. mdo (IN) - pointer to the method descriptor in the object cache
  1984. elem (OUT) - If this function completes successfully, 'rdo' points to
  1985. the selected result (parameter) descriptor in the object cache.
  1986. REQUIRES:
  1987. 1) All type accessors require that the type be pinned before calling
  1988. any accessor.
  1989. 2) 'elem' MUST be the address of an OCITypeElem pointer.
  1990. DESCRIPTION:
  1991. Get the result of a method.
  1992. RETURNS:
  1993. OCI_SUCCESS if the function completes successfully.
  1994. OCI_INVALID_HANDLE if 'env' or 'err' is null.
  1995. OCI_ERROR if
  1996. 1) any of the required parameters is null.
  1997. 2) method returns no results.
  1998. NOTES:
  1999. The method must be unpinned when the accessed information is no
  2000. longer needed.
  2001. }
  2002. {-------------------------------------------------------------------------- }
  2003. { PARAMETER ACCESSORS }
  2004. {-------------------------------------------------------------------------- }
  2005. {------------------------ OCITypeParamByPos ------------------------------- }
  2006. { ** OBSOLETE ** }
  2007. {$IFNDEF LinkDynamically}
  2008. function OCITypeParamByPos(env:POCIEnv; err:POCIError; mdo:POCITypeMethod; position:ub4; var elem:POCITypeElem):sword;cdecl;external ocilib name 'OCITypeParamByPos';
  2009. {$ELSE}
  2010. OCITypeParamByPos : function (env:POCIEnv; err:POCIError; mdo:POCITypeMethod; position:ub4; var elem:POCITypeElem):sword;cdecl;
  2011. {$ENDIF}
  2012. {
  2013. NAME: OCITypeParamByPos - OCI Get a Parameter in a method By Position.
  2014. PARAMETERS:
  2015. env (IN/OUT) - OCI environment handle initialized in object mode
  2016. err (IN/OUT) - error handle. If there is an error, it is
  2017. recorded in 'err' and this function returns OCI_ERROR.
  2018. The error recorded in 'err' can be retrieved by calling
  2019. OCIErrorGet().
  2020. mdo (IN) - pointer to the method descriptor in the object cache
  2021. position (IN) - the parameter's position. Positions start at 1.
  2022. elem (OUT) - If this function completes successfully, 'elem' points to
  2023. the selected parameter descriptor in the object cache.
  2024. REQUIRES:
  2025. 1) All type accessors require that the type be pinned before calling
  2026. any accessor.
  2027. DESCRIPTION:
  2028. Get a parameter given its position in the method. Positions start
  2029. at 1.
  2030. RETURNS:
  2031. OCI_SUCCESS if the function completes successfully.
  2032. OCI_INVALID_HANDLE if 'env' or 'err' is null.
  2033. OCI_ERROR if
  2034. 1) any of the required parameters is null.
  2035. 2) 'position' is not >= 1 and <= the number of parameters in the
  2036. method.
  2037. NOTES:
  2038. The type must be unpinned when the accessed information is no
  2039. longer needed.
  2040. }
  2041. {------------------------ OCITypeParamByName ------------------------------- }
  2042. { ** OBSOLETE ** }
  2043. {$IFNDEF LinkDynamically}
  2044. function OCITypeParamByName(env:POCIEnv; err:POCIError; mdo:POCITypeMethod; name:Poratext; n_length:ub4;
  2045. var elem:POCITypeElem):sword;cdecl;external ocilib name 'OCITypeParamByName';
  2046. {$ELSE}
  2047. OCITypeParamByName : function (env:POCIEnv; err:POCIError; mdo:POCITypeMethod; name:Poratext; n_length:ub4;
  2048. var elem:POCITypeElem):sword;cdecl;
  2049. {$ENDIF}
  2050. {
  2051. NAME: OCITypeParamByName - OCI Get a Parameter in a method By Name.
  2052. PARAMETERS:
  2053. env (IN/OUT) - OCI environment handle initialized in object mode
  2054. err (IN/OUT) - error handle. If there is an error, it is
  2055. recorded in 'err' and this function returns OCI_ERROR.
  2056. The error recorded in 'err' can be retrieved by calling
  2057. OCIErrorGet().
  2058. mdo (IN) - pointer to the method descriptor in the object cache
  2059. name (IN) - the parameter's name
  2060. n_length (IN) - length (in bytes) of the 'name' parameter
  2061. elem (OUT) - If this function completes successfully, 'elem' points to
  2062. the selected parameter descriptor in the object cache.
  2063. REQUIRES:
  2064. 1) All type accessors require that the type be pinned before calling
  2065. any accessor.
  2066. 2) if 'mdo' is not null, it must point to a valid method descriptor
  2067. in the object cache.
  2068. DESCRIPTION:
  2069. Get a parameter given its name.
  2070. RETURNS:
  2071. OCI_SUCCESS if the function completes successfully.
  2072. OCI_INVALID_HANDLE if 'env' or 'err' is null.
  2073. OCI_ERROR if
  2074. 1) any of the required parameters is null.
  2075. 2) the method does not contain a parameter with the input 'name'.
  2076. NOTES:
  2077. The type must be unpinned when the accessed information is no
  2078. longer needed.
  2079. }
  2080. {------------------------ OCITypeParamPos --------------------------------- }
  2081. { ** OBSOLETE ** }
  2082. {$IFNDEF LinkDynamically}
  2083. function OCITypeParamPos(env:POCIEnv; err:POCIError; mdo:POCITypeMethod; name:Poratext; n_length:ub4;
  2084. position:Pub4; var elem:POCITypeElem):sword;cdecl;external ocilib name 'OCITypeParamPos';
  2085. {$ELSE}
  2086. OCITypeParamPos : function (env:POCIEnv; err:POCIError; mdo:POCITypeMethod; name:Poratext; n_length:ub4;
  2087. position:Pub4; var elem:POCITypeElem):sword;cdecl;
  2088. {$ENDIF}
  2089. {
  2090. NAME: OCITypeParamPos - OCI Get a parameter's position in a method
  2091. PARAMETERS:
  2092. env (IN/OUT) - OCI environment handle initialized in object mode
  2093. err (IN/OUT) - error handle. If there is an error, it is
  2094. recorded in 'err' and this function returns OCI_ERROR.
  2095. The error recorded in 'err' can be retrieved by calling
  2096. OCIErrorGet().
  2097. mdo (IN) - pointer to the method descriptor in the object cache
  2098. name (IN) - the parameter's name
  2099. n_length (IN) - length (in bytes) of the 'name' parameter
  2100. position (OUT) - If this function completes successfully, 'position'
  2101. points to the position of the parameter in the method starting
  2102. at position 1. position MUST point to space for a ub4.
  2103. elem (OUT) - If this function completes successfully, and
  2104. the input 'elem' is not NULL, 'elem' points to the selected
  2105. parameter descriptor in the object cache.
  2106. REQUIRES:
  2107. 1) All type accessors require that the type be pinned before calling
  2108. any accessor.
  2109. 2) if 'mdo' is not null, it must point to a valid method descriptor
  2110. in the object cache.
  2111. DESCRIPTION:
  2112. Get the position of a parameter in a method. Positions start at 1.
  2113. RETURNS:
  2114. OCI_SUCCESS if the function completes successfully.
  2115. OCI_INVALID_HANDLE if 'env' or 'err' is null.
  2116. OCI_ERROR if
  2117. 1) any of the parameters is null.
  2118. 2) the method does not contain a parameter with the input 'name'.
  2119. NOTES:
  2120. The type must be unpinned when the accessed information is no
  2121. longer needed.
  2122. }
  2123. {------------------------ OCITypeParamElemMode ----------------------------- }
  2124. { ** OBSOLETE ** }
  2125. {$IFNDEF LinkDynamically}
  2126. function OCITypeElemParamMode(env:POCIEnv; err:POCIError; elem:POCITypeElem):OCITypeParamMode;cdecl;external ocilib name 'OCITypeElemParamMode';
  2127. {$ELSE}
  2128. OCITypeElemParamMode : function (env:POCIEnv; err:POCIError; elem:POCITypeElem):OCITypeParamMode;cdecl;
  2129. {$ENDIF}
  2130. {
  2131. NAME: OCITypeElemParamMode - OCI Get a parameter's mode
  2132. PARAMETERS:
  2133. env (IN/OUT) - OCI environment handle initialized in object mode
  2134. err (IN/OUT) - error handle. If there is an error, it is
  2135. recorded in 'err' and this function returns OCI_ERROR.
  2136. The error recorded in 'err' can be retrieved by calling
  2137. OCIErrorGet().
  2138. elem (IN) - pointer to the parameter descriptor in the object cache
  2139. (represented by an OCITypeElem)
  2140. REQUIRES:
  2141. 1) All type accessors require that the type be pinned before calling
  2142. any accessor.
  2143. 2) All input parameters must not be NULL and must be valid.
  2144. DESCRIPTION:
  2145. Get the mode (in, out, or in/out) of the parameter.
  2146. RETURNS:
  2147. the mode (in, out, or in/out) of the parameter
  2148. NOTES:
  2149. The type must be unpinned when the accessed information is no
  2150. longer needed.
  2151. }
  2152. {------------------------- OCITypeElemDefaultValue ------------------------- }
  2153. { ** OBSOLETE ** }
  2154. {$IFNDEF LinkDynamically}
  2155. function OCITypeElemDefaultValue(env:POCIEnv; err:POCIError; elem:POCITypeElem; d_v_length:Pub4):Poratext;cdecl;external ocilib name 'OCITypeElemDefaultValue';
  2156. {$ELSE}
  2157. OCITypeElemDefaultValue : function (env:POCIEnv; err:POCIError; elem:POCITypeElem; d_v_length:Pub4):Poratext;cdecl;
  2158. {$ENDIF}
  2159. {
  2160. NAME: OCITypeElemDefaultValue - OCI Get the element's Default Value.
  2161. PARAMETERS:
  2162. env (IN/OUT) - OCI environment handle initialized in object mode
  2163. err (IN/OUT) - error handle. If there is an error, it is
  2164. recorded in 'err' and this function returns OCI_ERROR.
  2165. The error recorded in 'err' can be retrieved by calling
  2166. OCIErrorGet().
  2167. elem (IN) - pointer to the parameter descriptor in the object cache
  2168. (represented by an OCITypeElem)
  2169. d_v_length (OUT) - length (in bytes) of the returned default value.
  2170. The caller must allocate space for the ub4 before calling this
  2171. routine.
  2172. REQUIRES:
  2173. 1) All type accessors require that the type be pinned before calling
  2174. any accessor.
  2175. 2) All input parameters must not be NULL and must be valid.
  2176. DESCRIPTION:
  2177. Get the default value in text form (PL/SQL) of an element. For V8.0,
  2178. this only makes sense for a method parameter.
  2179. RETURNS:
  2180. The default value (text) of the parameter.
  2181. NOTES:
  2182. The type must be unpinned when the accessed information is no
  2183. longer needed.
  2184. }
  2185. {-------------------------------------------------------------------------- }
  2186. { TYPE VERSION TABLE }
  2187. {-------------------------------------------------------------------------- }
  2188. { For V8.0, the type version table is meant to be an internal data structure
  2189. only for Oracle clients for type version maintanence purposes. A more
  2190. general version of the API may be made public in subsequent releases. }
  2191. {--------------------------- OCITypeVTInit -------------------------------- }
  2192. { ** OBSOLETE ** }
  2193. {$IFNDEF LinkDynamically}
  2194. function OCITypeVTInit(env:POCIEnv; err:POCIError):sword;cdecl;external ocilib name 'OCITypeVTInit';
  2195. {$ELSE}
  2196. OCITypeVTInit : function (env:POCIEnv; err:POCIError):sword;cdecl;
  2197. {$ENDIF}
  2198. {
  2199. NAME: OCITypeVTInit - OCI type Version table INItialize
  2200. PARAMETERS:
  2201. env (IN/OUT) - OCI environment handle initialized in object mode
  2202. err (IN/OUT) - error handle. If there is an error, it is
  2203. recorded in 'err' and this function returns OCI_ERROR.
  2204. The error recorded in 'err' can be retrieved by calling
  2205. OCIErrorGet().
  2206. REQUIRES:
  2207. none
  2208. DESCRIPTION:
  2209. Allocate space for and initialize the type version table and the type
  2210. version table's index.
  2211. RETURNS:
  2212. OCI_SUCCESS if the function completes successfully.
  2213. OCI_INVALID_HANDLE if 'env' or 'err' is null.
  2214. OCI_ERROR if internal errors occurrs during initialization.
  2215. }
  2216. {--------------------------- OCITypeVTInsert ------------------------------- }
  2217. { ** OBSOLETE ** }
  2218. {$IFNDEF LinkDynamically}
  2219. function OCITypeVTInsert(env:POCIEnv; err:POCIError; schema_name:Poratext; s_n_length:ub4; type_name:Poratext;
  2220. t_n_length:ub4; user_version:Poratext; u_v_length:ub4):sword;cdecl;external ocilib name 'OCITypeVTInsert';
  2221. {$ELSE}
  2222. OCITypeVTInsert : function (env:POCIEnv; err:POCIError; schema_name:Poratext; s_n_length:ub4; type_name:Poratext;
  2223. t_n_length:ub4; user_version:Poratext; u_v_length:ub4):sword;cdecl;
  2224. {$ENDIF}
  2225. {
  2226. NAME: OCITypeVTInsert - OCI type Version table INSert entry.
  2227. PARAMETERS:
  2228. env (IN/OUT) - OCI environment handle initialized in object mode
  2229. err (IN/OUT) - error handle. If there is an error, it is
  2230. recorded in 'err' and this function returns OCI_ERROR.
  2231. The error recorded in 'err' can be retrieved by calling
  2232. OCIErrorGet().
  2233. schema_name (IN, optional) - name of schema associated with the
  2234. type. By default, the user's schema name is used.
  2235. s_n_length (IN) - length of the 'schema_name' parameter
  2236. type_name (IN) - type name to insert
  2237. t_n_length (IN) - length (in bytes) of the 'type_name' parameter
  2238. user_version (IN) - user readable version of the type
  2239. u_v_length (IN) - length (in bytes) of the 'user_version' parameter
  2240. REQUIRES:
  2241. none
  2242. DESCRIPTION:
  2243. Insert an entry into the type version table and the type version
  2244. table's index. The entry's type name and user readable version
  2245. fields are updated with the input values. All other fields are
  2246. initialized to null.
  2247. RETURNS:
  2248. OCI_SUCCESS if the function completes successfully.
  2249. OCI_INVALID_HANDLE if 'env' or 'err' is null.
  2250. OCI_ERROR if
  2251. 1) any of the parameters is invalid.
  2252. 2) an entry for 'type_name' has already been registered in the
  2253. type version table.
  2254. }
  2255. {------------------------------ OCITypeVTSelect ---------------------------- }
  2256. { OCITypeVTSelect - OCI type VERSion table SELECT entry }
  2257. { ** OBSOLETE ** }
  2258. {$IFNDEF LinkDynamically}
  2259. function OCITypeVTSelect(env:POCIEnv; err:POCIError; schema_name:Poratext; s_n_length:ub4; type_name:Poratext;
  2260. t_n_length:ub4; var user_version:Poratext; u_v_length:Pub4; version:Pub2):sword;cdecl;external ocilib name 'OCITypeVTSelect';
  2261. {$ELSE}
  2262. OCITypeVTSelect : function (env:POCIEnv; err:POCIError; schema_name:Poratext; s_n_length:ub4; type_name:Poratext;
  2263. t_n_length:ub4; var user_version:Poratext; u_v_length:Pub4; version:Pub2):sword;cdecl;
  2264. {$ENDIF}
  2265. {
  2266. NAME: OCITypeVTSelect - OCI type Version table SELect entry.
  2267. PARAMETERS:
  2268. env (IN/OUT) - OCI environment handle initialized in object mode
  2269. err (IN/OUT) - error handle. If there is an error, it is
  2270. recorded in 'err' and this function returns OCI_ERROR.
  2271. The error recorded in 'err' can be retrieved by calling
  2272. OCIErrorGet().
  2273. schema_name (IN, optional) - name of schema associated with the
  2274. type. By default, the user's schema name is used.
  2275. s_n_length (IN) - length of the 'schema_name' parameter
  2276. type_name (IN) - type name to select
  2277. t_n_length (IN) - length (in bytes) of the 'type_name' parameter
  2278. user_version (OUT, optional) - pointer to user readable version of the
  2279. type
  2280. u_v_length (OUT, optional) - length (in bytes) of the 'user_version'
  2281. parameter
  2282. version (OUT, optional) - internal type version
  2283. REQUIRES:
  2284. All input parameters must not be NULL and must be valid.
  2285. DESCRIPTION:
  2286. Select an entry in the type version table by name.
  2287. RETURNS:
  2288. OCI_SUCCESS if the function completes successfully.
  2289. OCI_INVALID_HANDLE if 'env' or 'err' is null.
  2290. OCI_ERROR if
  2291. 1) any of the parameters is invalid.
  2292. 2) an entry with 'type_name' does not exist.
  2293. }
  2294. { Compatibility function - following function prototype retained for
  2295. compatibility only }
  2296. {$IFNDEF LinkDynamically}
  2297. function ortgcty(env:POCIEnv; err:POCIError; coll_tdo:POCIType; var collelem_tdo:POCIType):sword;cdecl;external ocilib name 'ortgcty';
  2298. {$ELSE}
  2299. ortgcty : function (env:POCIEnv; err:POCIError; coll_tdo:POCIType; var collelem_tdo:POCIType):sword;cdecl;
  2300. {$ENDIF}
  2301. {--------------------------------------------------------------------------- }
  2302. { Transient Type Construction functions }
  2303. {--------------------------------------------------------------------------- }
  2304. {$IFNDEF LinkDynamically}
  2305. function OCITypeBeginCreate(svchp:POCISvcCtx; errhp:POCIError; tc:OCITypeCode; dur:OCIDuration; var _type:POCIType):sword;cdecl;external ocilib name 'OCITypeBeginCreate';
  2306. {$ELSE}
  2307. OCITypeBeginCreate : function (svchp:POCISvcCtx; errhp:POCIError; tc:OCITypeCode; dur:OCIDuration; var _type:POCIType):sword;cdecl;
  2308. {$ENDIF}
  2309. {
  2310. NAME: OCITypeBeginCreate - OCI Type Begin Creation of a transient type.
  2311. REMARKS
  2312. Begins the construction process for a transient type. The type will be
  2313. anonymous (no name). To create a persistent named type, the CREATE TYPE
  2314. statement should be used from SQL. Transient types have no identity.
  2315. They are pure values.
  2316. PARAMETERS:
  2317. svchp (IN) - The OCI Service Context.
  2318. errhp (IN/OUT) - The OCI error handle. If there is an error, it is
  2319. recorded in errhp and this function returns
  2320. OCI_ERROR. Diagnostic information can be obtained by
  2321. calling OCIErrorGet().
  2322. tc - The TypeCode for the type. The Typecode could
  2323. correspond to a User Defined Type or a Built-in type.
  2324. Currently, the permissible values for User Defined
  2325. Types are OCI_TYPECODE_OBJECT for an Object Type
  2326. (structured), OCI_TYPECODE_VARRAY for a VARRAY
  2327. collection type or OCI_TYPECODE_TABLE for a nested
  2328. table collection type. For Object types,
  2329. OCITypeAddAttr() needs to be called to add each of
  2330. the attribute types. For Collection types,
  2331. OCITypeSetCollection() needs to be called.
  2332. Subsequently, OCITypeEndCreate() needs to be called
  2333. to finish the creation process.
  2334. The permissible values for Built-in type codes are
  2335. specified in the user manual. Additional information
  2336. on built-ins if any (like precision, scale for
  2337. numbers, character set info for VARCHAR2s etc.) must
  2338. be set with a subsequent call to OCITypeSetBuiltin().
  2339. Subsequently OCITypeEndCreate() needs to be called
  2340. to finish the creation process.
  2341. dur - The allocation duration for the Type. Could be a
  2342. predefined or a user defined duration.
  2343. type(OUT) - The OCIType (Type Descriptor) that is being
  2344. constructed.
  2345. RETURNS:
  2346. OCI_SUCCESS if the function completes successfully.
  2347. OCI_ERROR on error.
  2348. }
  2349. {$IFNDEF LinkDynamically}
  2350. function OCITypeSetCollection(svchp:POCISvcCtx; errhp:POCIError; _type:POCIType; collelem_info:POCIParam; coll_count:ub4):sword;cdecl;external ocilib name 'OCITypeSetCollection';
  2351. {$ELSE}
  2352. OCITypeSetCollection : function (svchp:POCISvcCtx; errhp:POCIError; _type:POCIType; collelem_info:POCIParam; coll_count:ub4):sword;cdecl;
  2353. {$ENDIF}
  2354. {
  2355. NAME: OCITypeSetCollection - OCI Type Set Collection information
  2356. REMARKS :
  2357. Set Collection type information. This call can be called only if the
  2358. OCIType has been constructed with a collection typecode.
  2359. PARAMETERS:
  2360. svchp (IN) - The OCI Service Context.
  2361. errhp (IN/OUT) - The OCI error handle. If there is an error, it is
  2362. recorded in errhp and this function returns
  2363. OCI_ERROR. Diagnostic information can be obtained by
  2364. calling OCIErrorGet().
  2365. type(IN OUT) - The OCIType (Type Descriptor) that is being
  2366. constructed.
  2367. collelem_info - collelem_info provides information on the collection
  2368. element. It is obtained by allocating an OCIParam
  2369. (parameter handle) and setting type information in
  2370. the OCIParam using OCIAttrSet() calls.
  2371. coll_count - The count of elements in the collection. Pass 0 for
  2372. a nested table (unbounded).
  2373. RETURNS:
  2374. OCI_SUCCESS if the function completes successfully.
  2375. OCI_ERROR on error.
  2376. }
  2377. {$IFNDEF LinkDynamically}
  2378. function OCITypeSetBuiltin(svchp:POCISvcCtx; errhp:POCIError; _type:POCIType; builtin_info:POCIParam):sword;cdecl;external ocilib name 'OCITypeSetBuiltin';
  2379. {$ELSE}
  2380. OCITypeSetBuiltin : function (svchp:POCISvcCtx; errhp:POCIError; _type:POCIType; builtin_info:POCIParam):sword;cdecl;
  2381. {$ENDIF}
  2382. {
  2383. NAME: OCITypeSetBuiltin - OCI Type Set Builtin information.
  2384. REMARKS:
  2385. Set Built-in type information. This call can be called only if the
  2386. OCIType has been constructed with a built-in typecode
  2387. (OCI_TYPECODE_NUMBER etc.).
  2388. PARAMETERS:
  2389. svchp (IN) - The OCI Service Context.
  2390. errhp (IN/OUT) - The OCI error handle. If there is an error, it is
  2391. recorded in errhp and this function returns
  2392. OCI_ERROR. Diagnostic information can be obtained by
  2393. calling OCIErrorGet().
  2394. type(IN OUT) - The OCIType (Type Descriptor) that is being
  2395. constructed.
  2396. builtin_info - builtin_info provides information on the built-in
  2397. (like precision, scale, charater set etc.). It is
  2398. obtained by allocating an OCIParam (parameter handle)
  2399. and setting type information in the OCIParam using
  2400. OCIAttrSet() calls.
  2401. RETURNS:
  2402. OCI_SUCCESS if the function completes successfully.
  2403. OCI_ERROR on error.
  2404. }
  2405. {$IFNDEF LinkDynamically}
  2406. function OCITypeAddAttr(svchp:POCISvcCtx; errhp:POCIError; _type:POCIType; a_name:Poratext; a_length:ub4;
  2407. attr_info:POCIParam):sword;cdecl;external ocilib name 'OCITypeAddAttr';
  2408. {$ELSE}
  2409. OCITypeAddAttr : function (svchp:POCISvcCtx; errhp:POCIError; _type:POCIType; a_name:Poratext; a_length:ub4;
  2410. attr_info:POCIParam):sword;cdecl;
  2411. {$ENDIF}
  2412. {
  2413. NAME: OCITypeAddAttr - OCI Type Add Attribute to an Object Type.
  2414. REMARKS:
  2415. Adds an attribute to an Object type (that was constructed earlier with
  2416. typecode OCI_TYPECODE_OBJECT).
  2417. PARAMETERS:
  2418. svchp (IN) - The OCI Service Context
  2419. errhp (IN/OUT) - The OCI error handle. If there is an error, it is
  2420. recorded in errhp and this function returns
  2421. OCI_ERROR. Diagnostic information can be obtained by
  2422. calling OCIErrorGet().
  2423. type (IN/OUT) - The Type description that is being constructed.
  2424. a_name(IN) - Optional. gives the name of the attribute.
  2425. a_length - Optional. gives length of attribute name.
  2426. attr_info - Information on the attribute. It is obtained by
  2427. allocating an OCIParam (parameter handle) and setting
  2428. type information in the OCIParam using OCIAttrSet()
  2429. calls.
  2430. RETURNS:
  2431. OCI_SUCCESS if the function completes successfully.
  2432. OCI_ERROR on error.
  2433. }
  2434. {$IFNDEF LinkDynamically}
  2435. function OCITypeEndCreate(svchp:POCISvcCtx; errhp:POCIError; _type:POCIType):sword;cdecl;external ocilib name 'OCITypeEndCreate';
  2436. {$ELSE}
  2437. OCITypeEndCreate : function (svchp:POCISvcCtx; errhp:POCIError; _type:POCIType):sword;cdecl;
  2438. {$ENDIF}
  2439. {
  2440. NAME: OCITypeEndCreate - OCI Type End Creation
  2441. REMARKS:
  2442. Finishes construction of a type description.Subsequently, only access
  2443. will be allowed.
  2444. PARAMETERS:
  2445. svchp (IN) - The OCI Service Context
  2446. errhp (IN/OUT) - The OCI error handle. If there is an error, it is
  2447. recorded in errhp and this function returns
  2448. OCI_ERROR. Diagnostic information can be obtained by
  2449. calling OCIErrorGet().
  2450. type (IN/OUT) - The Type description that is being constructed.
  2451. RETURNS:
  2452. OCI_SUCCESS if the function completes successfully.
  2453. OCI_ERROR on error.
  2454. }
  2455. {========================= }
  2456. { PUBLIC MACROS AND FLAGS }
  2457. {========================= }
  2458. {-------------------------------------------------------------------------- }
  2459. { TYPE ELEMENT FLAGS }
  2460. {-------------------------------------------------------------------------- }
  2461. { element is a REF }
  2462. const
  2463. OCI_TYPEELEM_REF = $8000;
  2464. { parameter is required }
  2465. OCI_TYPEPARAM_REQUIRED = $0800;
  2466. { macros to test flags }
  2467. // function OCI_TYPEELEM_IS_REF(elem_flag : longint) : longint;
  2468. // function OCI_TYPEPARAM_IS_REQUIRED(param_flag : longint) : longint;
  2469. {implementation
  2470. function OCI_TYPEELEM_IS_REF(elem_flag : longint) : longint;
  2471. begin
  2472. // OCI_TYPEELEM_IS_REF:=(elem_flag(@(OCI_TYPEELEM_REF)))<>0;
  2473. end;
  2474. function OCI_TYPEPARAM_IS_REQUIRED(param_flag : longint) : longint;
  2475. begin
  2476. // OCI_TYPEPARAM_IS_REQUIRED:=(param_flag(@(OCI_TYPEPARAM_REQUIRED)))<>0;
  2477. end;
  2478. end.}