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