Tang Cheng | 31b9525 | 2014-10-23 09:22:35 +0800 | [diff] [blame^] | 1 | /* Copyright (c) 1996, 2011, Oracle and/or its affiliates. |
| 2 | All rights reserved. */ |
| 3 | |
| 4 | /* |
| 5 | NAME |
| 6 | ociap.h |
| 7 | |
| 8 | DESCRIPTION |
| 9 | Oracle Call Interface - Ansi Prototypes |
| 10 | |
| 11 | RELATED DOCUMENTS |
| 12 | |
| 13 | INSPECTION STATUS |
| 14 | Inspection date: |
| 15 | Inspection status: |
| 16 | Estimated increasing cost defects per page: |
| 17 | Rule sets: |
| 18 | |
| 19 | ACCEPTANCE REVIEW STATUS |
| 20 | Review date: |
| 21 | Review status: |
| 22 | Reviewers: |
| 23 | |
| 24 | PUBLIC FUNCTION(S) |
| 25 | OCIAttrGet |
| 26 | OCIAttrSet |
| 27 | OCIBindArrayOfStruct |
| 28 | OCIBindByName |
| 29 | OCIBindByPos |
| 30 | OCIBindDynamic |
| 31 | OCIBindObject |
| 32 | OCIBreak |
| 33 | OCIConnectionPoolCreate |
| 34 | OCISessionPoolCreate |
| 35 | OCISessionGet |
| 36 | OCISessionRelease |
| 37 | OCIDateTimeAssign |
| 38 | OCIDateTimeCheck |
| 39 | OCIDateTimeCompare |
| 40 | OCIDateTimeConvert |
| 41 | OCIDateTimeFromText |
| 42 | OCIDateTimeGetDate |
| 43 | OCIDateTimeGetTime |
| 44 | OCIDateTimeGetTime |
| 45 | OCIDateTimeGetTimeZoneOffset |
| 46 | OCIDateTimeSysTimeStamp |
| 47 | OCIDateTimeIntervalAdd |
| 48 | OCIDateTimeIntervalSub |
| 49 | OCIDateTimeConstruct |
| 50 | OCIDateTimeSubtract |
| 51 | OCIDateTimeToText |
| 52 | OCIDateTimeGetTimeZoneName |
| 53 | OCIDateTimeToArray |
| 54 | OCIDateTimeFromArray |
| 55 | OCIRowidToChar |
| 56 | OCIDefineArrayOfStruct |
| 57 | OCIDefineByPos |
| 58 | OCIDefineDynamic |
| 59 | OCIDefineObject |
| 60 | OCIDescAlloc |
| 61 | OCIDescFree |
| 62 | OCIDescribeAny |
| 63 | OCIEnvCreate |
| 64 | OCIEnvNlsCreate |
| 65 | OCIEnvInit |
| 66 | OCIErrorGet |
| 67 | OCIExtractSetKey |
| 68 | OCIExtractFromFile |
| 69 | OCIIntervalSubtract |
| 70 | OCIIntervalMultiply |
| 71 | OCIIntervalToNumber |
| 72 | OCIIntervalToText |
| 73 | OCIIntervalFromTZ |
| 74 | OCIKerbAttrSet |
| 75 | OCILdaToSvcCtx |
| 76 | OCILobAppend |
| 77 | OCILobAssign |
| 78 | OCILobCharSetForm |
| 79 | OCILobCharSetId |
| 80 | OCILobCopy |
| 81 | OCILobCreateTemporary |
| 82 | OCILobDisableBuffering |
| 83 | OCILobEnableBuffering |
| 84 | OCILobErase |
| 85 | OCILobOpen |
| 86 | OCILobClose |
| 87 | OCILobFileClose |
| 88 | OCILobFileCLoseAll |
| 89 | OCILobFileExists |
| 90 | OCILobFileGetName |
| 91 | OCILobFileIsOpen |
| 92 | OCILobFileOpen |
| 93 | OCILobFileSetName |
| 94 | OCILobFlushBuffer |
| 95 | OCILobFreeTemporary |
| 96 | OCILobGetChunkSize |
| 97 | OCILobGetLength |
| 98 | OCILobIsEqual |
| 99 | OCILobIsTemporary |
| 100 | OCILobLoadFromFile |
| 101 | OCILobLocatorAssign |
| 102 | OCILobLocatorIsInit |
| 103 | OCILobRead |
| 104 | OCILobTrim |
| 105 | OCILobWrite |
| 106 | OCILobWriteAppend |
| 107 | OCILobGetStorageLimit |
| 108 | OCILobGetOptions |
| 109 | OCILobSetOptions |
| 110 | OCILobGetContentType |
| 111 | OCILobSetContentType |
| 112 | OCILogoff |
| 113 | OCILogon |
| 114 | OCILogon2 |
| 115 | OCIMemoryFree |
| 116 | OCIParamGet |
| 117 | OCIParamGet |
| 118 | OCIPasswordChange |
| 119 | OCIReset |
| 120 | OCIResultSetToStmt |
| 121 | OCIServerAttach |
| 122 | OCIServerDetach |
| 123 | OCIServerVersion |
| 124 | OCISessionBegin |
| 125 | OCISessionEnd |
| 126 | OCIStmtExecute |
| 127 | OCIStmtFetch |
| 128 | OCIStmtFetch2 |
| 129 | OCIStmtGetPieceInfo |
| 130 | OCIStmtPrepare |
| 131 | OCIStmtPrepare2 |
| 132 | OCIStmtRelease |
| 133 | OCIStmtSetPieceInfo |
| 134 | OCIFormatString |
| 135 | OCISvcCtxToLda |
| 136 | OCITransCommit |
| 137 | OCITransDetach |
| 138 | OCITransForget |
| 139 | OCITransMultiPrepare |
| 140 | OCITransPrepare |
| 141 | OCITransRollback |
| 142 | OCITransStart |
| 143 | OCIInitialize |
| 144 | OCIEnvCreate |
| 145 | OCIEnvNlsCreate |
| 146 | OCIFEnvCreate |
| 147 | OCIHandleAlloc |
| 148 | OCIDescriptorAlloc |
| 149 | OCIDescriptorFree |
| 150 | OCIArrayDescriptorAlloc |
| 151 | OCIArrayDescriptorFree |
| 152 | OCIEnvInit |
| 153 | OCIServerAttach |
| 154 | OCISessionBegin |
| 155 | OCISessionEnd |
| 156 | OCILogon |
| 157 | OCILogon2 |
| 158 | OCIPasswordChange |
| 159 | OCIStmtPrepare |
| 160 | OCIStmtPrepare2 |
| 161 | OCIStmtRelease |
| 162 | OCIBindByPos |
| 163 | OCIBindByName |
| 164 | OCIBindObject |
| 165 | OCIBindDynamic |
| 166 | OCIBindArrayOfStruct |
| 167 | OCIStmtGetPieceInfo |
| 168 | OCIStmtSetPieceInfo |
| 169 | OCIStmtExecute |
| 170 | OCIDefineByPos |
| 171 | OCIDefineObject |
| 172 | OCIDefineDynamic |
| 173 | OCIRowidToChar |
| 174 | OCIDefineArrayOfStruct |
| 175 | OCIStmtFetch |
| 176 | OCIStmtFetch2 |
| 177 | OCIStmtGetBindInfo |
| 178 | OCIDescribeAny |
| 179 | OCIParamGet |
| 180 | OCIParamSet |
| 181 | OCITransStart |
| 182 | OCITransMultiPrepare |
| 183 | OCIErrorGet |
| 184 | OCILobAppend |
| 185 | OCILobAssign |
| 186 | OCILobCharSetForm |
| 187 | OCILobCharSetId |
| 188 | OCILobCopy |
| 189 | OCILobCreateTemporary |
| 190 | OCILobClose |
| 191 | OCILobDisableBuffering |
| 192 | OCILobEnableBuffering |
| 193 | OCILobErase |
| 194 | OCILobFileClose |
| 195 | OCILobFileExists |
| 196 | OCILobFileGetName |
| 197 | OCILobFileIsOpen |
| 198 | OCILobFileOpen |
| 199 | OCILobFileSetName |
| 200 | OCILobFlushBuffer |
| 201 | OCILobFreeTemporary |
| 202 | OCILobGetChunkSize |
| 203 | OCILobGetLength |
| 204 | OCILobIsEqual |
| 205 | OCILobIsOpen |
| 206 | OCILobIsTemporary |
| 207 | OCILobLoadFromFile |
| 208 | OCILobLocatorAssign |
| 209 | OCILobLocatorIsInit |
| 210 | OCILobOpen |
| 211 | OCILobRead |
| 212 | OCILobTrim |
| 213 | OCILobWrite |
| 214 | OCILobWriteAppend |
| 215 | OCIServerVersion |
| 216 | OCIServerRelease |
| 217 | OCIAttrGet |
| 218 | OCIAttrSet |
| 219 | OCIUserCallbackRegister |
| 220 | OCIUserCallbackGet |
| 221 | OCISharedLibInit |
| 222 | OCIFileExists |
| 223 | OCIFileGetLength |
| 224 | OCIFileOpen |
| 225 | OCIFileRead |
| 226 | OCIFileSeek |
| 227 | OCIFileWrite |
| 228 | OCILobCopy2 |
| 229 | OCILobErase2 |
| 230 | OCILobGetLength2 |
| 231 | OCILobLoadFromFile2 |
| 232 | OCILobRead2 |
| 233 | OCILobArrayRead |
| 234 | OCILobTrim2 |
| 235 | OCILobWrite2 |
| 236 | OCILobArrayWrite |
| 237 | OCILobWriteAppend2 |
| 238 | OCILobGetStorageLimit |
| 239 | OCISecurityOpenWallet |
| 240 | OCISecurityCloseWallet |
| 241 | OCISecurityCreateWallet |
| 242 | OCISecurityDestroyWallet |
| 243 | OCISecurityStorePersona |
| 244 | OCISecurityOpenPersona |
| 245 | OCISecurityClosePersona |
| 246 | OCISecurityRemovePersona |
| 247 | OCISecurityCreatePersona |
| 248 | OCISecuritySetProtection |
| 249 | OCISecurityGetProtection |
| 250 | OCISecurityRemoveIdentity |
| 251 | OCISecurityCreateIdentity |
| 252 | OCISecurityAbortIdentity |
| 253 | OCISecurityFreeIdentity |
| 254 | OCISecurityStoreTrustedIdentity |
| 255 | OCISecuritySign |
| 256 | OCISecuritySignExpansion |
| 257 | OCISecurityVerify |
| 258 | OCISecurityValidate |
| 259 | OCISecuritySignDetached |
| 260 | OCISecuritySignDetExpansion |
| 261 | OCISecurityVerifyDetached |
| 262 | OCISecurity_PKEncrypt |
| 263 | OCISecurityPKEncryptExpansion |
| 264 | OCISecurityPKDecrypt |
| 265 | OCISecurityEncrypt |
| 266 | OCISecurityEncryptExpansion |
| 267 | OCISecurityDecrypt |
| 268 | OCISecurityEnvelope |
| 269 | OCISecurityDeEnvelope |
| 270 | OCISecurityKeyedHash |
| 271 | OCISecurityKeyedHashExpansion |
| 272 | OCISecurityHash |
| 273 | OCISecurityHashExpansion |
| 274 | OCISecuritySeedRandom |
| 275 | OCISecurityRandomBytes |
| 276 | OCISecurityRandomNumber |
| 277 | OCISecurityInitBlock |
| 278 | OCISecurityReuseBlock |
| 279 | OCISecurityPurgeBlock |
| 280 | OCISecuritySetBlock |
| 281 | OCISecurityGetIdentity |
| 282 | OCIAQEnq |
| 283 | OCIAQDeq |
| 284 | OCIAQEnqArray |
| 285 | OCIAQEnqStreaming |
| 286 | OCIAQDeqArray |
| 287 | OCIAQListen |
| 288 | OCIAQListen2 |
| 289 | OCIExtractSetKey |
| 290 | OCIExtractFromFile |
| 291 | OCIExtractToInt |
| 292 | OCIExtractToBool |
| 293 | OCIExtractToStr |
| 294 | OCIExtractToOCINum |
| 295 | OCIExtractFromList |
| 296 | OCIMemoryAlloc |
| 297 | OCIMemoryResize |
| 298 | OCIContextSetValue |
| 299 | OCIContextGetValue |
| 300 | OCIContextClearValue |
| 301 | OCIMemorySetCurrentIDs |
| 302 | OCIPicklerTdsCtxInit |
| 303 | OCIPicklerTdsInit |
| 304 | OCIPicklerTdsCreateElementNumber |
| 305 | OCIPicklerTdsCreateElementChar |
| 306 | OCIPicklerTdsCreateElementVarchar |
| 307 | OCIPicklerTdsCreateElementRaw |
| 308 | OCIPicklerTdsCreateElement |
| 309 | OCIPicklerTdsAddAttr |
| 310 | OCIPicklerTdsGenerate |
| 311 | OCIPicklerTdsGetAttr |
| 312 | OCIPicklerFdoInit |
| 313 | OCIPicklerFdoFree |
| 314 | OCIPicklerImageInit |
| 315 | OCIPicklerImageFree |
| 316 | OCIPicklerImageAddScalar |
| 317 | OCIPicklerImageAddNullScalar |
| 318 | OCIPicklerImageGenerate |
| 319 | OCIPicklerImageGetScalarSize |
| 320 | OCIPicklerImageGetScalar |
| 321 | OCIPicklerImageCollBegin |
| 322 | OCIPicklerImageCollAddScalar |
| 323 | OCIPicklerImageCollEnd |
| 324 | OCIPicklerImageCollBeginScan |
| 325 | OCIPicklerImageCollGetScalarSize |
| 326 | OCIPicklerImageCollGetScalar |
| 327 | OCIAnyDataGetType |
| 328 | OCIAnyDataIsNull |
| 329 | OCIAnyDataConvert |
| 330 | OCIAnyDataBeginCreate |
| 331 | OCIAnyDataAttrSet |
| 332 | OCIAnyDataCollAddElem |
| 333 | OCIAnyDataEndCreate |
| 334 | OCIAnyDataAccess |
| 335 | OCIAnyDataGetCurrAttrNum |
| 336 | OCIAnyDataAttrGet |
| 337 | OCIAnyDataCollGetElem |
| 338 | OCIPicklerTdsCtxInit |
| 339 | OCIPicklerTdsInit |
| 340 | OCIPicklerTdsCreateElementNumber |
| 341 | OCIPicklerTdsCreateElementChar |
| 342 | OCIPicklerTdsCreateElementVarchar |
| 343 | OCIPicklerTdsCreateElementRaw |
| 344 | OCIPicklerTdsCreateElement |
| 345 | OCIPicklerTdsAddAttr |
| 346 | OCIPicklerTdsGenerate |
| 347 | OCIPicklerTdsGetAttr |
| 348 | OCIPicklerFdoInit |
| 349 | OCIPicklerFdoFree |
| 350 | OCIPicklerImageInit |
| 351 | OCIPicklerImageFree |
| 352 | OCIPicklerImageAddScalar |
| 353 | OCIPicklerImageAddNullScalar |
| 354 | OCIPicklerImageGenerate |
| 355 | OCIPicklerImageGetScalarSize |
| 356 | OCIPicklerImageGetScalar |
| 357 | OCIPicklerImageCollBegin |
| 358 | OCIPicklerImageCollAddScalar |
| 359 | OCIPicklerImageCollEnd |
| 360 | OCIPicklerImageCollBeginScan |
| 361 | OCIPicklerImageCollGetScalarSize |
| 362 | OCIPicklerImageCollGetScalar |
| 363 | OCIAnyDataGetType |
| 364 | OCIAnyDataIsNull |
| 365 | OCIAnyDataConvert |
| 366 | OCIAnyDataBeginCreate |
| 367 | OCIAnyDataAttrSet |
| 368 | OCIAnyDataCollAddElem |
| 369 | OCIAnyDataEndCreate |
| 370 | OCIAnyDataAccess |
| 371 | OCIAnyDataGetCurrAttrNum |
| 372 | OCIAnyDataAttrGet |
| 373 | OCIAnyDataCollGetElem |
| 374 | OCIPicklerTdsCtxInit |
| 375 | OCIPicklerTdsInit |
| 376 | OCIPicklerTdsCreateElementNumber |
| 377 | OCIPicklerTdsCreateElementChar |
| 378 | OCIPicklerTdsCreateElementVarchar |
| 379 | OCIPicklerTdsCreateElementRaw |
| 380 | OCIPicklerTdsCreateElement |
| 381 | OCIPicklerTdsAddAttr |
| 382 | OCIPicklerTdsGenerate |
| 383 | OCIPicklerTdsGetAttr |
| 384 | OCIPicklerFdoInit |
| 385 | OCIPicklerFdoFree |
| 386 | OCIPicklerImageInit |
| 387 | OCIPicklerImageFree |
| 388 | OCIPicklerImageAddScalar |
| 389 | OCIPicklerImageAddNullScalar |
| 390 | OCIPicklerImageGenerate |
| 391 | OCIPicklerImageGetScalarSize |
| 392 | OCIPicklerImageGetScalar |
| 393 | OCIPicklerImageCollBegin |
| 394 | OCIPicklerImageCollAddScalar |
| 395 | OCIPicklerImageCollEnd |
| 396 | OCIPicklerImageCollBeginScan |
| 397 | OCIPicklerImageCollGetScalarSize |
| 398 | OCIPicklerImageCollGetScalar |
| 399 | OCIAnyDataGetType |
| 400 | OCIAnyDataIsNull |
| 401 | OCIAnyDataConvert |
| 402 | OCIAnyDataBeginCreate |
| 403 | OCIAnyDataAttrSet |
| 404 | OCIAnyDataCollAddElem |
| 405 | OCIAnyDataEndCreate |
| 406 | OCIAnyDataAccess |
| 407 | OCIAnyDataGetCurrAttrNum |
| 408 | OCIAnyDataAttrGet |
| 409 | OCIAnyDataCollGetElem |
| 410 | OCIAnyDataSetBeginCreate |
| 411 | OCIAnyDataSetDestroy |
| 412 | OCIAnyDataSetAddInstance |
| 413 | OCIAnyDataSetEndCreate |
| 414 | OCIAnyDataSetGetType |
| 415 | OCIAnyDataSetGetCount |
| 416 | OCIAnyDataSetGetInstance |
| 417 | OCIFormatString |
| 418 | OCINlsGetInfo |
| 419 | OCINlsNameMap |
| 420 | OCIMultiByteToWideChar |
| 421 | OCIMultiByteInSizeToWideChar |
| 422 | OCIWideCharToMultiByte |
| 423 | OCIWideCharInSizeToMultiByte |
| 424 | OCIWideCharStrcmp |
| 425 | OCIWideCharStrncmp |
| 426 | OCIWideCharStrcat |
| 427 | *OCIWideCharStrchr |
| 428 | OCIWideCharStrcpy |
| 429 | OCIWideCharStrncat |
| 430 | OCIWideCharStrncpy |
| 431 | *OCIWideCharStrrchr |
| 432 | OCIWideCharStrCaseConversion |
| 433 | OCIMultiByteStrcmp |
| 434 | OCIMultiByteStrncmp |
| 435 | OCIMultiByteStrcat |
| 436 | OCIMultiByteStrcpy |
| 437 | OCIMultiByteStrncat |
| 438 | OCIMultiByteStrncpy |
| 439 | OCIMultiByteStrnDisplayLength |
| 440 | OCIMultiByteStrCaseConversion |
| 441 | OCICharSetToUnicode |
| 442 | OCIUnicodeToCharSet |
| 443 | OCINlsCharSetConvert |
| 444 | OCINlsEnvironmentVariableGet |
| 445 | OCIMessageOpen |
| 446 | OCIMessageGet |
| 447 | OCIThreadMutexInit |
| 448 | OCIThreadMutexDestroy |
| 449 | OCIThreadMutexAcquire |
| 450 | OCIThreadMutexRelease |
| 451 | OCIThreadKeyInit |
| 452 | OCIThreadKeyDestroy |
| 453 | OCIThreadKeyGet |
| 454 | OCIThreadKeySet |
| 455 | OCIThreadIdSet |
| 456 | OCIThreadIdSetNull |
| 457 | OCIThreadIdGet |
| 458 | OCIThreadIdSame |
| 459 | OCIThreadIdNull |
| 460 | OCIThreadHndInit |
| 461 | OCIThreadHndDestroy |
| 462 | OCIThreadCreate |
| 463 | OCIThreadHandleGet |
| 464 | OCIThreadMutexInit |
| 465 | OCIThreadMutexDestroy |
| 466 | OCIThreadMutexAcquire |
| 467 | OCIThreadMutexRelease |
| 468 | OCIThreadKeyInit |
| 469 | OCIThreadKeyDestroy |
| 470 | OCIThreadKeyGet |
| 471 | OCIThreadKeySet |
| 472 | OCIThreadIdSet |
| 473 | OCIThreadIdSame |
| 474 | OCIThreadIdNull |
| 475 | OCIThreadCreate |
| 476 | OCISubscriptionRegister |
| 477 | OCISubscriptionPost |
| 478 | OCISubscriptionUnRegister |
| 479 | OCISubscriptionDisable |
| 480 | OCISubscriptionEnable |
| 481 | OCIDateTimeGetTime |
| 482 | OCIDateTimeGetDate |
| 483 | OCIDateTimeGetTimeZoneOffset |
| 484 | OCIDateTimeConstruct |
| 485 | OCIDateTimeSysTimeStamp |
| 486 | OCIDateTimeAssign |
| 487 | OCIDateTimeToText |
| 488 | OCIDateTimeFromText |
| 489 | OCIDateTimeCompare |
| 490 | OCIDateTimeCheck |
| 491 | OCIDateTimeConvert |
| 492 | OCIDateTimeSubtract |
| 493 | OCIDateTimeIntervalAdd |
| 494 | OCIDateTimeIntervalSub |
| 495 | OCIIntervalSubtract |
| 496 | OCIIntervalAdd |
| 497 | OCIIntervalMultiply |
| 498 | OCIIntervalDivide |
| 499 | OCIIntervalCompare |
| 500 | OCIIntervalFromNumber |
| 501 | OCIIntervalFromText |
| 502 | OCIIntervalToText |
| 503 | OCIIntervalToNumber |
| 504 | OCIIntervalCheck |
| 505 | OCIIntervalAssign |
| 506 | OCIIntervalSetYearMonth |
| 507 | OCIIntervalGetYearMonth |
| 508 | OCIIntervalSetDaySecond |
| 509 | OCIIntervalGetDaySecond |
| 510 | OCIDateTimeToArray |
| 511 | OCIDateTimeFromArray |
| 512 | OCIDateTimeGetTimeZoneName |
| 513 | OCIIntervalFromTZ |
| 514 | OCIConnectionPoolCreate |
| 515 | OCIConnectionPoolDestroy |
| 516 | OCISessionPoolCreate |
| 517 | OCISessionPoolDestroy |
| 518 | OCISessionGet |
| 519 | OCISessionRelease |
| 520 | OCIAppCtxSet |
| 521 | OCIAppCtxClearAll |
| 522 | OCIMemStats |
| 523 | OCIKerbAttrSet |
| 524 | OCIDBStartup |
| 525 | OCIDBShutdown |
| 526 | OCIClientVersion |
| 527 | OCIInitEventHandle |
| 528 | OCIStmtBindByPos |
| 529 | OCIStmtBindByName |
| 530 | |
| 531 | PRIVATE FUNCTION(S) |
| 532 | |
| 533 | EXAMPLES |
| 534 | |
| 535 | NOTES |
| 536 | |
| 537 | MODIFIED (MM/DD/YY) |
| 538 | slari 03/24/11 - OCIRoundTripCallback |
| 539 | slynn 03/18/08 - OCILobSet/SetContenttype->OCILobGet/SetContentType |
| 540 | amullick 02/11/08 - add OCILobGet/SetContenttype APIs |
| 541 | schoi 02/27/07 - OCILobGet/SetOptions API change |
| 542 | slynn 07/28/06 - Migrate to new 11g LOB terminology |
| 543 | hqian 05/22/06 - add OCI_SYSASM |
| 544 | slynn 06/21/06 - Add Lob Get Shared Regions Functionality |
| 545 | slynn 05/25/06 - New NG Lob Functionality. |
| 546 | jawilson 05/22/06 - add TDO out parameter for streaming enq callback |
| 547 | aramappa 01/19/06 - Added OCIArrayDescriptorAlloc, |
| 548 | OCIArrayDescriptorFree |
| 549 | jawilson 02/09/06 - add OCIAQEnqStreaming |
| 550 | mxu 03/08/06 - Fix bug 5037807 |
| 551 | srseshad 09/12/05 - stmtcache: callback |
| 552 | mbastawa 09/16/05 - dbhygiene |
| 553 | dmukhin 06/29/05 - ANSI prototypes; miscellaneous cleanup |
| 554 | nbhatt 06/17/04 - merge conflicts |
| 555 | nbhatt 05/24/04 - merge conflicts |
| 556 | weiwang 05/06/04 - add OCIAQListen2 |
| 557 | rvissapr 06/21/04 - add OCIAppCtx API |
| 558 | debanerj 05/17/04 - 13064: LOB array Read and Write |
| 559 | aahluwal 06/02/04 - [OCI Events]: add OCIInitEventHandle |
| 560 | nikeda 05/28/04 - grabtrans 'nikeda_oci_events_copy' |
| 561 | nikeda 05/13/04 - [OCI Events] Rename HACBK->EVTCBK, HACTX->EVTCTX |
| 562 | nikeda 05/10/04 - [OCI Events] code review changes |
| 563 | aahluwal 04/09/04 - [OCI Events]: add OCIHAServerHandleGet |
| 564 | nikeda 03/18/04 - [OCI Events] New Server Handle Callback |
| 565 | dfrumkin 12/04/03 - Add OCIDBStartup, OCIDBShutdown |
| 566 | jciminsk 12/12/03 - merge from RDBMS_MAIN_SOLARIS_031209 |
| 567 | sgollapu 06/26/03 - Change OCIPing prototype |
| 568 | sgollapu 05/05/03 - Add OCIPing |
| 569 | debanerj 01/16/03 - Bug 2753018: Lob Locator parameter for |
| 570 | OCILobGetStorageLimit |
| 571 | rpingte 05/06/04 - add OCIClientVersion |
| 572 | debanerj 08/26/03 - 6003: Lob interface changes |
| 573 | sgollapu 06/23/03 - Add OCIPing |
| 574 | debanerj 01/16/03 - Bug 2753018: Lob Locator parameter for |
| 575 | OCILobGetStorageLimit |
| 576 | tkeefe 02/17/03 - bug-2773794: Add new interface for setting Kerb attrs |
| 577 | ataracha 01/03/03 - Move OCIXMLType functions to ocixml.h |
| 578 | akatti 11/28/02 - [2521361]:add OCIRowidToChar prototype |
| 579 | chliang 10/23/02 - add OCIFetchRowCallback |
| 580 | cparampa 10/13/02 - Fix the prototype of OCIAQListen(ansi prototype) |
| 581 | chliang 10/12/02 - add OCIBindRowCallback |
| 582 | debanerj 09/30/02 - Unlimited size LOB 6003 |
| 583 | thoang 09/25/02 - Add csid to XMLType create functions |
| 584 | thoang 04/19/02 - Add OCIXMLTypeGetNS |
| 585 | aahluwal 08/09/02 - adding OCIAQDeqArray |
| 586 | aahluwal 06/03/02 - bug 2360115 |
| 587 | skabraha 04/16/02 - fix compiler warnings |
| 588 | sichandr 02/12/02 - fix OCIXMLTypeExists |
| 589 | gayyappa 02/01/02 - fix 2210776 : change Dom to DOM |
| 590 | sichandr 10/24/01 - OCISvcCtx for XMLType create routines |
| 591 | schandir 09/14/01 - Add prototypes for Stmt Caching |
| 592 | abande 09/04/01 - Add Prototypes for Session Pooling Methods |
| 593 | stakeda 09/12/01 - add OCINlsCharSetConvert |
| 594 | whe 08/28/01 - add OCIEnvNlsCreate |
| 595 | wzhang 08/22/01 - Add OCINlsCharSetNameToId. |
| 596 | whe 10/05/01 - add prototype for OCIXMLType functions |
| 597 | mdmehta 04/06/01 - Bug 1683763, OCIDateTimeToText: buf_size to ub4* |
| 598 | schandir 12/12/00 - modify the ociconnectionpoolcreate() interface. |
| 599 | porangas 12/04/00 - Forward merge bug#974710 to 9i |
| 600 | rpingte 11/29/00 - Fix bug# 1485795. |
| 601 | gtarora 11/30/00 - fix comment for OCILobIsTemporary |
| 602 | akatti 11/07/00 - [1198379]:add OCIRowidToChar |
| 603 | bpalaval 10/15/00 - Forward merge 892654. |
| 604 | kmohan 09/18/00 - add OCILogon2 |
| 605 | etucker 07/28/00 - add OCIIntervalFromTZ |
| 606 | vjayaram 07/18/00 - add connection pooling changes |
| 607 | etucker 07/13/00 - add dls apis for oci |
| 608 | hmasaki 07/05/00 - fix 1230846: forward merge into 8.2 |
| 609 | mbastawa 06/05/00 - add OCIStmtFetch2 |
| 610 | rxgovind 06/07/00 - update OCIAnyData interfaces |
| 611 | rxgovind 05/04/00 - add OCIAnyDataSet interfaces |
| 612 | rkasamse 05/01/00 - remove attrno from OCIAnyDataAttrGet |
| 613 | rkasamse 03/13/00 - add prototype s for OCCIAnyData |
| 614 | slari 09/01/99 - remove OCIEnvCallback |
| 615 | slari 08/23/99 - add OCIUcb in user callback functions |
| 616 | dsaha 07/07/99 - Add OCIFEnvCreate for forms |
| 617 | vyanaman 06/21/99 - Change OCI DateTime/Interval APIs. |
| 618 | esoyleme 07/01/99 - expose MTS performance enhancements |
| 619 | whe 06/14/99 - bug727872:add CONST to match definitions |
| 620 | kkarun 02/23/99 - Fix OCIDateTime APIs |
| 621 | jiyang 12/07/98 - Add comments for OCI_NLS_DUAL_CURRENCY |
| 622 | aroy 12/01/98 - add OCIEnvCreate |
| 623 | slari 11/23/98 - use ORASTDARG |
| 624 | slari 11/21/98 - replace ellipsis by arglist in OCIUserCallback |
| 625 | thchang 10/20/98 - correct comment on OCILobCreateTemporary |
| 626 | slari 09/08/98 - allow envh to receive error info also in CallbackReg/ |
| 627 | kkarun 09/02/98 - Change const to CONST |
| 628 | aroy 08/04/98 - add OCITerminate calls |
| 629 | nramakri 06/25/98 - remove CONST from some OCIPickler APIs |
| 630 | jiyang 06/22/98 - Fix a lint error |
| 631 | nmallava 06/08/98 - ociistemporary -> envhp |
| 632 | jhasenbe 05/27/98 - Remove definitions for U-Calls (Unicode) |
| 633 | nmallava 05/18/98 - add comments |
| 634 | sgollapu 05/19/98 - Change text to OraText |
| 635 | aroy 04/20/98 - merge forward 8.0.5 -> 8.1.3 |
| 636 | nbhatt 05/14/98 - aq listen call |
| 637 | lchidamb 03/02/98 - Client Notification prototypes |
| 638 | vyanaman 04/19/98 - System Timestamp |
| 639 | kkarun 04/17/98 - Add more Interval functions |
| 640 | vyanaman 04/17/98 - Fix min (proc error) |
| 641 | vyanaman 04/16/98 - Add get/set TZ |
| 642 | kkarun 04/13/98 - Add Datetime prototypes |
| 643 | rkasamse 04/13/98 - change OCIEnv* to dvoid* for context/memory cart serv |
| 644 | rkasamse 04/15/98 - chage pickler cart interface |
| 645 | slari 03/20/98 - change proto of OCIUserCallback |
| 646 | slari 02/17/98 - add OCIUserCallback |
| 647 | jiyang 04/02/98 - Accept both env and user handles for NLS |
| 648 | rkasamse 03/20/98 - remove prototypes for OCIMemoryDuration* functions. |
| 649 | tsaulys 03/20/98 - use environment or session handle |
| 650 | nmallava 04/09/98 - OCILobLocatorAssign |
| 651 | nmallava 04/07/98 - lobgetchunksize and writeappend apis |
| 652 | jhasenbe 04/06/98 - Add new interfaces for Unicode support |
| 653 | nmallava 03/17/98 - add interfaces |
| 654 | nmallava 03/16/98 - add open/close apis |
| 655 | nmallava 03/10/98 - add temporary lobs apis |
| 656 | sgollapu 07/10/97 - Add OCIReset |
| 657 | sgollapu 02/09/98 - OCI non-blocking |
| 658 | nramakri 01/16/98 - remove #ifdef NEVER clause for OCIExtract |
| 659 | rmurthy 01/08/98 - OCIContextGenerateKey: change ub1 to ub4 |
| 660 | ewaugh 12/18/97 - Turn type wrappers into functions. |
| 661 | skabraha 12/02/97 - adding OCIFile functions |
| 662 | rhwu 12/02/97 - add OCI Thread |
| 663 | nramakri 12/15/97 - move to core4 |
| 664 | nramakri 12/11/97 - modify OCIExtract prototype |
| 665 | ewaugh 12/10/97 - add OCIFormat prototypes |
| 666 | nmallava 12/17/97 - Add ilob open and close apis |
| 667 | rkasamse 12/03/97 - Change some of the function names for pickler cartrid |
| 668 | nramakri 11/12/97 - add OCIExtract prototypes |
| 669 | rkasamse 11/21/97 - add prototypes for memory cartridge services and cont |
| 670 | rkasamse 11/03/97 - Add pickler cartridge interfaces. |
| 671 | jiyang 11/11/97 - Add NLS service for cartridge |
| 672 | tanguyen 08/19/97 - |
| 673 | cxcheng 07/30/97 - replace OCISvcCtx with OCISvcCtx |
| 674 | schandra 06/25/97 - AQ OCI interface |
| 675 | bnainani 07/21/97 - add prototypes for Oracle XA extensions |
| 676 | esoyleme 05/13/97 - move failover callback prototype |
| 677 | skmishra 05/06/97 - stdc compiler fixes |
| 678 | skmishra 04/24/97 - C++ Compatibility changes |
| 679 | skotsovo 04/21/97 - make lob parameter names consistent |
| 680 | rwhitman 04/16/97 - Fix LOB prototypes - Olint OCI 8.0.3 |
| 681 | ramkrish 04/15/97 - Add free flag to OCILobFlushBuffer |
| 682 | dchatter 04/10/97 - add nzt.h inclusion |
| 683 | cxcheng 04/09/97 - change objnamp from CONST text* to dvoid* |
| 684 | cxcheng 04/08/97 - fix prototype of OCIDescribeAny() |
| 685 | skotsovo 03/31/97 - remove OCILobLocatorSize |
| 686 | skotsovo 03/27/97 - add OCILobLoadFromFile |
| 687 | bcchang 02/18/97 - Fix syntax error |
| 688 | dchatter 01/13/97 - fix comments on LOB calls |
| 689 | aroy 01/10/97 - remove ocilobfilecreate delete |
| 690 | sgollapu 12/27/96 - Correct OCILogon prototype |
| 691 | dchatter 01/04/97 - comments to describe the functions |
| 692 | sgollapu 11/25/96 - Change OCILobFileIsExistent |
| 693 | schandra 11/18/96 - Remove xa.h include |
| 694 | sgollapu 11/09/96 - Change prototype of OCIDescribeAny |
| 695 | dchatter 10/31/96 - delete CONST from lob write cb fn |
| 696 | dchatter 10/30/96 - more changes |
| 697 | dchatter 10/26/96 - lob/file long name corrections |
| 698 | slari 10/16/96 - delete unused calls |
| 699 | rwessman 10/29/96 - Fixed OCISecurityGetIdentity prototype |
| 700 | bcchang 10/25/96 - Fix syntax error |
| 701 | sgollapu 10/22/96 - Add OCILogon and OCILogoff |
| 702 | rwessman 10/16/96 - Added cryptographic and digital signature functions |
| 703 | sgollapu 10/10/96 - Add ocibdp and ocibdn |
| 704 | rxgovind 10/07/96 - add oci file calls |
| 705 | skotsovo 10/01/96 - move orl lob fnts to oci |
| 706 | skotsovo 09/20/96 - in OCILobGetLength(), remove the 'isnull' parameter. |
| 707 | aroy 08/29/96 - change prototype for Nchar Lob support |
| 708 | dchatter 08/21/96 - OCIResultSetToStmt prototype change |
| 709 | sthakur 08/14/96 - add OCIParamSet |
| 710 | schandra 07/26/96 - TX OCI return values - sb4->sword |
| 711 | aroy 07/17/96 - terminology change: OCILobLocator => OCILobLocator |
| 712 | dchatter 07/01/96 - create ANSI prototypes |
| 713 | dchatter 07/01/96 - Creation |
| 714 | |
| 715 | */ |
| 716 | |
| 717 | |
| 718 | #ifndef OCIAP_ORACLE |
| 719 | # define OCIAP_ORACLE |
| 720 | |
| 721 | # ifndef ORATYPES |
| 722 | # include <oratypes.h> |
| 723 | # endif |
| 724 | |
| 725 | #ifndef ORASTDARG |
| 726 | #include <stdarg.h> |
| 727 | #define ORASTDARG |
| 728 | #endif |
| 729 | |
| 730 | #ifndef OCIDFN |
| 731 | #include <ocidfn.h> |
| 732 | #endif |
| 733 | |
| 734 | #ifndef NZT_ORACLE |
| 735 | #include <nzt.h> |
| 736 | #endif /* NZT_ORACLE */ |
| 737 | |
| 738 | #ifndef OCI_ORACLE |
| 739 | #include <oci.h> |
| 740 | #endif |
| 741 | |
| 742 | #ifndef ORT_ORACLE |
| 743 | #include <ort.h> |
| 744 | #endif |
| 745 | |
| 746 | |
| 747 | |
| 748 | /*--------------------------------------------------------------------------- |
| 749 | PUBLIC TYPES AND CONSTANTS |
| 750 | ---------------------------------------------------------------------------*/ |
| 751 | |
| 752 | |
| 753 | /*--------------------------------------------------------------------------- |
| 754 | PRIVATE TYPES AND CONSTANTS |
| 755 | ---------------------------------------------------------------------------*/ |
| 756 | |
| 757 | |
| 758 | /*--------------------------------------------------------------------------- |
| 759 | PUBLIC FUNCTIONS |
| 760 | ---------------------------------------------------------------------------*/ |
| 761 | |
| 762 | /***************************************************************************** |
| 763 | DESCRIPTION |
| 764 | ****************************************************************************** |
| 765 | Note: the descriptions of the functions are alphabetically arranged. Please |
| 766 | maintain the arrangement when adding a new function description. The actual |
| 767 | prototypes are below this comment section and donot follow any alphabetical |
| 768 | ordering. |
| 769 | |
| 770 | |
| 771 | --------------------------------OCIAttrGet------------------------------------ |
| 772 | |
| 773 | OCIAttrGet() |
| 774 | Name |
| 775 | OCI Attribute Get |
| 776 | Purpose |
| 777 | This call is used to get a particular attribute of a handle. |
| 778 | Syntax |
| 779 | sword OCIAttrGet ( const void *trgthndlp, |
| 780 | ub4 trghndltyp, |
| 781 | void *attributep, |
| 782 | ub4 *sizep, |
| 783 | ub4 attrtype, |
| 784 | OCIError *errhp ); |
| 785 | Comments |
| 786 | This call is used to get a particular attribute of a handle. |
| 787 | See Appendix B, "Handle Attributes", for a list of handle types and their |
| 788 | readable attributes. |
| 789 | Parameters |
| 790 | trgthndlp (IN) - is the pointer to a handle type. |
| 791 | trghndltyp (IN) - is the handle type. |
| 792 | attributep (OUT) - is a pointer to the storage for an attribute value. The |
| 793 | attribute value is filled in. |
| 794 | sizep (OUT) - is the size of the attribute value. |
| 795 | This can be passed in as NULL for most parameters as the size is well known. |
| 796 | For text* parameters, a pointer to a ub4 must be passed in to get the length |
| 797 | of the string. |
| 798 | attrtype (IN) - is the type of attribute. |
| 799 | errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for |
| 800 | diagnostic information in the event of an error. |
| 801 | Related Functions |
| 802 | OCIAttrSet() |
| 803 | |
| 804 | --------------------------------OCIAttrSet------------------------------------ |
| 805 | |
| 806 | |
| 807 | OCIAttrSet() |
| 808 | Name |
| 809 | OCI Attribute Set |
| 810 | Purpose |
| 811 | This call is used to set a particular attribute of a handle or a descriptor. |
| 812 | Syntax |
| 813 | sword OCIAttrSet ( void *trgthndlp, |
| 814 | ub4 trghndltyp, |
| 815 | void *attributep, |
| 816 | ub4 size, |
| 817 | ub4 attrtype, |
| 818 | OCIError *errhp ); |
| 819 | Comments |
| 820 | This call is used to set a particular attribute of a handle or a descriptor. |
| 821 | See Appendix B for a list of handle types and their writeable attributes. |
| 822 | Parameters |
| 823 | trghndlp (IN/OUT) - the pointer to a handle type whose attribute gets |
| 824 | modified. |
| 825 | trghndltyp (IN/OUT) - is the handle type. |
| 826 | attributep (IN) - a pointer to an attribute value. |
| 827 | The attribute value is copied into the target handle. If the attribute value |
| 828 | is a pointer, then only the pointer is copied, not the contents of the pointer. |
| 829 | size (IN) - is the size of an attribute value. This can be passed in as 0 for |
| 830 | most attributes as the size is already known by the OCI library. For text* |
| 831 | attributes, a ub4 must be passed in set to the length of the string. |
| 832 | attrtype (IN) - the type of attribute being set. |
| 833 | errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for |
| 834 | diagnostic information in the event of an error. |
| 835 | Related Functions |
| 836 | OCIAttrGet() |
| 837 | |
| 838 | |
| 839 | |
| 840 | --------------------------------OCIBindArrayOfStruct-------------------------- |
| 841 | |
| 842 | |
| 843 | |
| 844 | OCIBindArrayOfStruct() |
| 845 | Name |
| 846 | OCI Bind for Array of Structures |
| 847 | Purpose |
| 848 | This call sets up the skip parameters for a static array bind. |
| 849 | Syntax |
| 850 | sword OCIBindArrayOfStruct ( OCIBind *bindp, |
| 851 | OCIError *errhp, |
| 852 | ub4 pvskip, |
| 853 | ub4 indskip, |
| 854 | ub4 alskip, |
| 855 | ub4 rcskip ); |
| 856 | Comments |
| 857 | This call sets up the skip parameters necessary for a static array bind. |
| 858 | This call follows a call to OCIBindByName() or OCIBindByPos(). The bind |
| 859 | handle returned by that initial bind call is used as a parameter for the |
| 860 | OCIBindArrayOfStruct() call. |
| 861 | For information about skip parameters, see the section "Arrays of Structures" |
| 862 | on page 4-16. |
| 863 | Parameters |
| 864 | bindp (IN) - the handle to a bind structure. |
| 865 | errhp (IN) - an error handle which can be passed to OCIErrorGet() for |
| 866 | diagnostic information in the event of an error. |
| 867 | pvskip (IN) - skip parameter for the next data value. |
| 868 | indskip (IN) - skip parameter for the next indicator value or structure. |
| 869 | alskip (IN) - skip parameter for the next actual length value. |
| 870 | rcskip (IN) - skip parameter for the next column-level return code value. |
| 871 | Related Functions |
| 872 | OCIAttrGet() |
| 873 | |
| 874 | |
| 875 | --------------------------------OCIBindByName--------------------------------- |
| 876 | |
| 877 | OCIBindByName() |
| 878 | Name |
| 879 | OCI Bind by Name |
| 880 | Purpose |
| 881 | Creates an association between a program variable and a placeholder in a SQL |
| 882 | statement or PL/SQL block. |
| 883 | Syntax |
| 884 | sword OCIBindByName ( |
| 885 | OCIStmt *stmtp, |
| 886 | OCIBind **bindp, |
| 887 | OCIError *errhp, |
| 888 | const OraText *placeholder, |
| 889 | sb4 placeh_len, |
| 890 | void *valuep, |
| 891 | sb4 value_sz, |
| 892 | ub2 dty, |
| 893 | void *indp, |
| 894 | ub2 *alenp, |
| 895 | ub2 *rcodep, |
| 896 | ub4 maxarr_len, |
| 897 | ub4 *curelep, |
| 898 | ub4 mode ); |
| 899 | Description |
| 900 | This call is used to perform a basic bind operation. The bind creates an |
| 901 | association between the address of a program variable and a placeholder in a |
| 902 | SQL statement or PL/SQL block. The bind call also specifies the type of data |
| 903 | which is being bound, and may also indicate the method by which data will be |
| 904 | provided at runtime. |
| 905 | This function also implicitly allocates the bind handle indicated by the bindp |
| 906 | parameter. |
| 907 | Data in an OCI application can be bound to placeholders statically or |
| 908 | dynamically. Binding is static when all the IN bind data and the OUT bind |
| 909 | buffers are well-defined just before the execute. Binding is dynamic when the |
| 910 | IN bind data and the OUT bind buffers are provided by the application on |
| 911 | demand at execute time to the client library. Dynamic binding is indicated by |
| 912 | setting the mode parameter of this call to OCI_DATA_AT_EXEC. |
| 913 | Related Functions: For more information about dynamic binding, see |
| 914 | the section "Runtime Data Allocation and Piecewise Operations" on |
| 915 | page 5-16. |
| 916 | Both OCIBindByName() and OCIBindByPos() take as a parameter a bind handle, |
| 917 | which is implicitly allocated by the bind call A separate bind handle is |
| 918 | allocated for each placeholder the application is binding. |
| 919 | Additional bind calls may be required to specify particular attributes |
| 920 | necessary when binding certain data types or handling input data in certain |
| 921 | ways: |
| 922 | If arrays of structures are being utilized, OCIBindArrayOfStruct() must |
| 923 | be called to set up the necessary skip parameters. |
| 924 | If data is being provided dynamically at runtime, and the application |
| 925 | will be using user-defined callback functions, OCIBindDynamic() must |
| 926 | be called to register the callbacks. |
| 927 | If a named data type is being bound, OCIBindObject() must be called to |
| 928 | specify additional necessary information. |
| 929 | Parameters |
| 930 | stmth (IN/OUT) - the statement handle to the SQL or PL/SQL statement |
| 931 | being processed. |
| 932 | bindp (IN/OUT) - a pointer to a pointer to a bind handle which is implicitly |
| 933 | allocated by this call. The bind handle maintains all the bind information |
| 934 | for this particular input value. The handle is feed implicitly when the |
| 935 | statement handle is deallocated. |
| 936 | errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for |
| 937 | diagnostic information in the event of an error. |
| 938 | placeholder (IN) - the placeholder attributes are specified by name if |
| 939 | ocibindn() is being called. |
| 940 | placeh_len (IN) - the length of the placeholder name specified in placeholder. |
| 941 | valuep (IN/OUT) - a pointer to a data value or an array of data values of the |
| 942 | type specified in the dty parameter. An array of data values can be specified |
| 943 | for mapping into a PL/SQL table or for providing data for SQL multiple-row |
| 944 | operations. When an array of bind values is provided, this is called an array |
| 945 | bind in OCI terms. Additional attributes of the array bind (not bind to a |
| 946 | column of ARRAY type) are set up in OCIBindArrayOfStruct() call. |
| 947 | For a REF, named data type bind, the valuep parameter is used only for IN |
| 948 | bind data. The pointers to OUT buffers are set in the pgvpp parameter |
| 949 | initialized by OCIBindObject(). For named data type and REF binds, the bind |
| 950 | values are unpickled into the Object Cache. The OCI object navigational calls |
| 951 | can then be used to navigate the objects and the refs in the Object Cache. |
| 952 | If the OCI_DATA_AT_EXEC mode is specified in the mode parameter, valuep |
| 953 | is ignored for all data types. OCIBindArrayOfStruct() cannot be used and |
| 954 | OCIBindDynamic() must be invoked to provide callback functions if desired. |
| 955 | value_sz (IN) - the size of a data value. In the case of an array bind, this is |
| 956 | the maximum size of any element possible with the actual sizes being specified |
| 957 | in the alenp parameter. |
| 958 | If the OCI_DATA_AT_EXEC mode is specified, valuesz defines the maximum |
| 959 | size of the data that can be ever provided at runtime for data types other than |
| 960 | named data types or REFs. |
| 961 | dty (IN) - the data type of the value(s) being bound. Named data types |
| 962 | (SQLT_NTY) and REFs (SQLT_REF) are valid only if the application has been |
| 963 | initialized in object mode. For named data types, or REFs, additional calls |
| 964 | must be made with the bind handle to set up the datatype-specific attributes. |
| 965 | indp (IN/OUT) - pointer to an indicator variable or array. For scalar data |
| 966 | types, this is a pointer to sb2 or an array of sb2s. For named data types, |
| 967 | this pointer is ignored and the actual pointer to the indicator structure or |
| 968 | an array of indicator structures is initialized by OCIBindObject(). |
| 969 | Ignored for dynamic binds. |
| 970 | See the section "Indicator Variables" on page 2-43 for more information about |
| 971 | indicator variables. |
| 972 | alenp (IN/OUT) - pointer to array of actual lengths of array elements. Each |
| 973 | element in alenp is the length of the data in the corresponding element in the |
| 974 | bind value array before and after the execute. This parameter is ignored for |
| 975 | dynamic binds. |
| 976 | rcodep (OUT) - pointer to array of column level return codes. This parameter |
| 977 | is ignored for dynamic binds. |
| 978 | maxarr_len (IN) - the maximum possible number of elements of type dty in a |
| 979 | PL/SQL binds. This parameter is not required for non-PL/SQL binds. If |
| 980 | maxarr_len is non-zero, then either OCIBindDynamic() or |
| 981 | OCIBindArrayOfStruct() can be invoked to set up additional bind attributes. |
| 982 | curelep(IN/OUT) - a pointer to the actual number of elements. This parameter |
| 983 | is only required for PL/SQL binds. |
| 984 | mode (IN) - the valid modes for this parameter are: |
| 985 | OCI_DEFAULT. This is default mode. |
| 986 | OCI_DATA_AT_EXEC. When this mode is selected, the value_sz |
| 987 | parameter defines the maximum size of the data that can be ever |
| 988 | provided at runtime. The application must be ready to provide the OCI |
| 989 | library runtime IN data buffers at any time and any number of times. |
| 990 | Runtime data is provided in one of the two ways: |
| 991 | callbacks using a user-defined function which must be registered |
| 992 | with a subsequent call to OCIBindDynamic(). |
| 993 | a polling mechanism using calls supplied by the OCI. This mode |
| 994 | is assumed if no callbacks are defined. |
| 995 | For more information about using the OCI_DATA_AT_EXEC mode, see |
| 996 | the section "Runtime Data Allocation and Piecewise Operations" on |
| 997 | page 5-16. |
| 998 | When the allocated buffers are not required any more, they should be |
| 999 | freed by the client. |
| 1000 | Related Functions |
| 1001 | OCIBindDynamic(), OCIBindObject(), OCIBindArrayOfStruct(), OCIAttrGet() |
| 1002 | |
| 1003 | |
| 1004 | |
| 1005 | -------------------------------OCIBindByPos----------------------------------- |
| 1006 | |
| 1007 | |
| 1008 | OCIBindByPos() |
| 1009 | Name |
| 1010 | OCI Bind by Position |
| 1011 | Purpose |
| 1012 | Creates an association between a program variable and a placeholder in a SQL |
| 1013 | statement or PL/SQL block. |
| 1014 | Syntax |
| 1015 | sword OCIBindByPos ( |
| 1016 | OCIStmt *stmtp, |
| 1017 | OCIBind **bindp, |
| 1018 | OCIError *errhp, |
| 1019 | ub4 position, |
| 1020 | void *valuep, |
| 1021 | sb4 value_sz, |
| 1022 | ub2 dty, |
| 1023 | void *indp, |
| 1024 | ub2 *alenp, |
| 1025 | ub2 *rcodep, |
| 1026 | ub4 maxarr_len, |
| 1027 | ub4 *curelep, |
| 1028 | ub4 mode); |
| 1029 | |
| 1030 | Description |
| 1031 | This call is used to perform a basic bind operation. The bind creates an |
| 1032 | association between the address of a program variable and a placeholder in a |
| 1033 | SQL statement or PL/SQL block. The bind call also specifies the type of data |
| 1034 | which is being bound, and may also indicate the method by which data will be |
| 1035 | provided at runtime. |
| 1036 | This function also implicitly allocates the bind handle indicated by the bindp |
| 1037 | parameter. |
| 1038 | Data in an OCI application can be bound to placeholders statically or |
| 1039 | dynamically. Binding is static when all the IN bind data and the OUT bind |
| 1040 | buffers are well-defined just before the execute. Binding is dynamic when the |
| 1041 | IN bind data and the OUT bind buffers are provided by the application on |
| 1042 | demand at execute time to the client library. Dynamic binding is indicated by |
| 1043 | setting the mode parameter of this call to OCI_DATA_AT_EXEC. |
| 1044 | Related Functions: For more information about dynamic binding, see |
| 1045 | the section "Runtime Data Allocation and Piecewise Operations" on |
| 1046 | page 5-16 |
| 1047 | Both OCIBindByName() and OCIBindByPos() take as a parameter a bind handle, |
| 1048 | which is implicitly allocated by the bind call A separate bind handle is |
| 1049 | allocated for each placeholder the application is binding. |
| 1050 | Additional bind calls may be required to specify particular attributes |
| 1051 | necessary when binding certain data types or handling input data in certain |
| 1052 | ways: |
| 1053 | If arrays of structures are being utilized, OCIBindArrayOfStruct() must |
| 1054 | be called to set up the necessary skip parameters. |
| 1055 | If data is being provided dynamically at runtime, and the application |
| 1056 | will be using user-defined callback functions, OCIBindDynamic() must |
| 1057 | be called to register the callbacks. |
| 1058 | If a named data type is being bound, OCIBindObject() must be called to |
| 1059 | specify additional necessary information. |
| 1060 | Parameters |
| 1061 | stmth (IN/OUT) - the statement handle to the SQL or PL/SQL statement |
| 1062 | being processed. |
| 1063 | bindp (IN/OUT) - a pointer to a pointer to a bind handle which is implicitly |
| 1064 | allocated by this call. The bind handle maintains all the bind information |
| 1065 | for this particular input value. The handle is feed implicitly when the |
| 1066 | statement handle is deallocated. |
| 1067 | errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for |
| 1068 | diagnostic information in the event of an error. |
| 1069 | position (IN) - the placeholder attributes are specified by position if |
| 1070 | ocibindp() is being called. |
| 1071 | valuep (IN/OUT) - a pointer to a data value or an array of data values of the |
| 1072 | type specified in the dty parameter. An array of data values can be specified |
| 1073 | for mapping into a PL/SQL table or for providing data for SQL multiple-row |
| 1074 | operations. When an array of bind values is provided, this is called an array |
| 1075 | bind in OCI terms. Additional attributes of the array bind (not bind to a |
| 1076 | column of ARRAY type) are set up in OCIBindArrayOfStruct() call. |
| 1077 | For a REF, named data type bind, the valuep parameter is used only for IN |
| 1078 | bind data. The pointers to OUT buffers are set in the pgvpp parameter |
| 1079 | initialized by OCIBindObject(). For named data type and REF binds, the bind |
| 1080 | values are unpickled into the Object Cache. The OCI object navigational calls |
| 1081 | can then be used to navigate the objects and the refs in the Object Cache. |
| 1082 | If the OCI_DATA_AT_EXEC mode is specified in the mode parameter, valuep |
| 1083 | is ignored for all data types. OCIBindArrayOfStruct() cannot be used and |
| 1084 | OCIBindDynamic() must be invoked to provide callback functions if desired. |
| 1085 | value_sz (IN) - the size of a data value. In the case of an array bind, this is |
| 1086 | the maximum size of any element possible with the actual sizes being specified |
| 1087 | in the alenp parameter. |
| 1088 | If the OCI_DATA_AT_EXEC mode is specified, valuesz defines the maximum |
| 1089 | size of the data that can be ever provided at runtime for data types other than |
| 1090 | named data types or REFs. |
| 1091 | dty (IN) - the data type of the value(s) being bound. Named data types |
| 1092 | (SQLT_NTY) and REFs (SQLT_REF) are valid only if the application has been |
| 1093 | initialized in object mode. For named data types, or REFs, additional calls |
| 1094 | must be made with the bind handle to set up the datatype-specific attributes. |
| 1095 | indp (IN/OUT) - pointer to an indicator variable or array. For scalar data |
| 1096 | types, this is a pointer to sb2 or an array of sb2s. For named data types, |
| 1097 | this pointer is ignored and the actual pointer to the indicator structure or |
| 1098 | an array of indicator structures is initialized by OCIBindObject(). Ignored |
| 1099 | for dynamic binds. |
| 1100 | See the section "Indicator Variables" on page 2-43 for more information about |
| 1101 | indicator variables. |
| 1102 | alenp (IN/OUT) - pointer to array of actual lengths of array elements. Each |
| 1103 | element in alenp is the length of the data in the corresponding element in the |
| 1104 | bind value array before and after the execute. This parameter is ignored for |
| 1105 | dynamic binds. |
| 1106 | rcodep (OUT) - pointer to array of column level return codes. This parameter |
| 1107 | is ignored for dynamic binds. |
| 1108 | maxarr_len (IN) - the maximum possible number of elements of type dty in a |
| 1109 | PL/SQL binds. This parameter is not required for non-PL/SQL binds. If |
| 1110 | maxarr_len is non-zero, then either OCIBindDynamic() or |
| 1111 | OCIBindArrayOfStruct() can be invoked to set up additional bind attributes. |
| 1112 | curelep(IN/OUT) - a pointer to the actual number of elements. This parameter |
| 1113 | is only required for PL/SQL binds. |
| 1114 | mode (IN) - the valid modes for this parameter are: |
| 1115 | OCI_DEFAULT. This is default mode. |
| 1116 | OCI_DATA_AT_EXEC. When this mode is selected, the value_sz |
| 1117 | parameter defines the maximum size of the data that can be ever |
| 1118 | provided at runtime. The application must be ready to provide the OCI |
| 1119 | library runtime IN data buffers at any time and any number of times. |
| 1120 | Runtime data is provided in one of the two ways: |
| 1121 | callbacks using a user-defined function which must be registered |
| 1122 | with a subsequent call to OCIBindDynamic() . |
| 1123 | a polling mechanism using calls supplied by the OCI. This mode |
| 1124 | is assumed if no callbacks are defined. |
| 1125 | For more information about using the OCI_DATA_AT_EXEC mode, see |
| 1126 | the section "Runtime Data Allocation and Piecewise Operations" on |
| 1127 | page 5-16. |
| 1128 | When the allocated buffers are not required any more, they should be |
| 1129 | freed by the client. |
| 1130 | Related Functions |
| 1131 | OCIBindDynamic(), OCIBindObject(), OCIBindArrayOfStruct(), OCIAttrGet() |
| 1132 | |
| 1133 | |
| 1134 | |
| 1135 | -------------------------------OCIBindDynamic--------------------------------- |
| 1136 | |
| 1137 | OCIBindDynamic() |
| 1138 | Name |
| 1139 | OCI Bind Dynamic Attributes |
| 1140 | Purpose |
| 1141 | This call is used to register user callbacks for dynamic data allocation. |
| 1142 | Syntax |
| 1143 | sword OCIBindDynamic( OCIBind *bindp, |
| 1144 | OCIError *errhp, |
| 1145 | void *ictxp, |
| 1146 | OCICallbackInBind (icbfp)( |
| 1147 | void *ictxp, |
| 1148 | OCIBind *bindp, |
| 1149 | ub4 iter, |
| 1150 | ub4 index, |
| 1151 | void **bufpp, |
| 1152 | ub4 *alenp, |
| 1153 | ub1 *piecep, |
| 1154 | void **indp ), |
| 1155 | void *octxp, |
| 1156 | OCICallbackOutBind (ocbfp)( |
| 1157 | void *octxp, |
| 1158 | OCIBind *bindp, |
| 1159 | ub4 iter, |
| 1160 | ub4 index, |
| 1161 | void **bufp, |
| 1162 | ub4 **alenpp, |
| 1163 | ub1 *piecep, |
| 1164 | void **indpp, |
| 1165 | ub2 **rcodepp) ); |
| 1166 | Comments |
| 1167 | This call is used to register user-defined callback functions for providing |
| 1168 | data for an UPDATE or INSERT if OCI_DATA_AT_EXEC mode was specified in a |
| 1169 | previous call to OCIBindByName() or OCIBindByPos(). |
| 1170 | The callback function pointers must return OCI_CONTINUE if it the call is |
| 1171 | successful. Any return code other than OCI_CONTINUE signals that the client |
| 1172 | wishes to abort processing immediately. |
| 1173 | For more information about the OCI_DATA_AT_EXEC mode, see the section |
| 1174 | "Runtime Data Allocation and Piecewise Operations" on page 5-16. |
| 1175 | Parameters |
| 1176 | bindp (IN/OUT) - a bind handle returned by a call to OCIBindByName() or |
| 1177 | OCIBindByPos(). |
| 1178 | errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for |
| 1179 | diagnostic information in the event of an error. |
| 1180 | ictxp (IN) - the context pointer required by the call back function icbfp. |
| 1181 | icbfp (IN) - the callback function which returns a pointer to the IN bind |
| 1182 | value or piece at run time. The callback takes in the following parameters. |
| 1183 | ictxp (IN/OUT) - the context pointer for this callback function. |
| 1184 | bindp (IN) - the bind handle passed in to uniquely identify this bind |
| 1185 | variable. |
| 1186 | iter (IN) - 1-based execute iteration value. |
| 1187 | index (IN) - index of the current array, for an array bind. 1 based not |
| 1188 | greater than curele parameter of the bind call. |
| 1189 | index (IN) - index of the current array, for an array bind. This parameter |
| 1190 | is 1-based, and may not be greater than curele parameter of the bind call. |
| 1191 | bufpp (OUT) - the pointer to the buffer. |
| 1192 | piecep (OUT) - which piece of the bind value. This can be one of the |
| 1193 | following values - OCI_ONE_PIECE, OCI_FIRST_PIECE, |
| 1194 | OCI_NEXT_PIECE and OCI_LAST_PIECE. |
| 1195 | indp (OUT) - contains the indicator value. This is apointer to either an |
| 1196 | sb2 value or a pointer to an indicator structure for binding named data |
| 1197 | types. |
| 1198 | indszp (OUT) - contains the indicator value size. A pointer containing |
| 1199 | the size of either an sb2 or an indicator structure pointer. |
| 1200 | octxp (IN) - the context pointer required by the callback function ocbfp. |
| 1201 | ocbfp (IN) - the callback function which returns a pointer to the OUT bind |
| 1202 | value or piece at run time. The callback takes in the following parameters. |
| 1203 | octxp (IN/OUT) - the context pointer for this call back function. |
| 1204 | bindp (IN) - the bind handle passed in to uniquely identify this bind |
| 1205 | variable. |
| 1206 | iter (IN) - 1-based execute iteration value. |
| 1207 | index (IN) - index of the current array, for an array bind. This parameter |
| 1208 | is 1-based, and must not be greater than curele parameter of the bind call. |
| 1209 | bufpp (OUT) - a pointer to a buffer to write the bind value/piece. |
| 1210 | buflp (OUT) - returns the buffer size. |
| 1211 | alenpp (OUT) - a pointer to a storage for OCI to fill in the size of the bind |
| 1212 | value/piece after it has been read. |
| 1213 | piecep (IN/OUT) - which piece of the bind value. It will be set by the |
| 1214 | library to be one of the following values - OCI_ONE_PIECE or |
| 1215 | OCI_NEXT_PIECE. The callback function can leave it unchanged or set |
| 1216 | it to OCI_FIRST_PIECE or OCI_LAST_PIECE. By default - |
| 1217 | OCI_ONE_PIECE. |
| 1218 | indpp (OUT) - returns a pointer to contain the indicator value which |
| 1219 | either an sb2 value or a pointer to an indicator structure for named data |
| 1220 | types. |
| 1221 | indszpp (OUT) - returns a pointer to return the size of the indicator |
| 1222 | value which is either size of an sb2 or size of an indicator structure. |
| 1223 | rcodepp (OUT) - returns a pointer to contains the return code. |
| 1224 | Related Functions |
| 1225 | OCIAttrGet() |
| 1226 | |
| 1227 | |
| 1228 | ---------------------------------OCIBindObject-------------------------------- |
| 1229 | |
| 1230 | |
| 1231 | OCIBindObject() |
| 1232 | Name |
| 1233 | OCI Bind Object |
| 1234 | Purpose |
| 1235 | This function sets up additional attributes which are required for a named |
| 1236 | data type (object) bind. |
| 1237 | Syntax |
| 1238 | sword OCIBindObject ( OCIBind *bindp, |
| 1239 | OCIError *errhp, |
| 1240 | const OCIType *type, |
| 1241 | void **pgvpp, |
| 1242 | ub4 *pvszsp, |
| 1243 | void **indpp, |
| 1244 | ub4 *indszp, ); |
| 1245 | Comments |
| 1246 | This function sets up additional attributes which binding a named data type |
| 1247 | or a REF. An error will be returned if this function is called when the OCI |
| 1248 | environment has been initialized in non-object mode. |
| 1249 | This call takes as a paramter a type descriptor object (TDO) of datatype |
| 1250 | OCIType for the named data type being defined. The TDO can be retrieved |
| 1251 | with a call to OCITypeByName(). |
| 1252 | If the OCI_DATA_AT_EXEC mode was specified in ocibindn() or ocibindp(), the |
| 1253 | pointers to the IN buffers are obtained either using the callback icbfp |
| 1254 | registered in the OCIBindDynamic() call or by the OCIStmtSetPieceInfo() call. |
| 1255 | The buffers are dynamically allocated for the OUT data and the pointers to |
| 1256 | these buffers are returned either by calling ocbfp() registered by the |
| 1257 | OCIBindDynamic() or by setting the pointer to the buffer in the buffer passed |
| 1258 | in by OCIStmtSetPieceInfo() called when OCIStmtExecute() returned |
| 1259 | OCI_NEED_DATA. The memory of these client library- allocated buffers must be |
| 1260 | freed when not in use anymore by using the OCIObjectFreee() call. |
| 1261 | Parameters |
| 1262 | bindp ( IN/OUT) - the bind handle returned by the call to OCIBindByName() |
| 1263 | or OCIBindByPos(). |
| 1264 | errhp ( IN/OUT) - an error handle which can be passed to OCIErrorGet() for |
| 1265 | diagnostic information in the event of an error. |
| 1266 | type ( IN) - points to the TDO which describes the type of the program |
| 1267 | variable being bound. Retrieved by calling OCITypeByName(). |
| 1268 | pgvpp ( IN/OUT) - points to a pointer to the program variable buffer. For an |
| 1269 | array, pgvpp points to an array of pointers. When the bind variable is also an |
| 1270 | OUT variable, the OUT Named Data Type value or REF is allocated |
| 1271 | (unpickled) in the Object Cache, and a pointer to the value or REF is returned, |
| 1272 | At the end of execute, when all OUT values have been received, pgvpp points |
| 1273 | to an array of pointer(s) to these newly allocated named data types in the |
| 1274 | object cache. |
| 1275 | pgvpp is ignored if the OCI_DATA_AT_EXEC mode is set. Then the Named |
| 1276 | Data Type buffers are requested at runtime. For static array binds, skip |
| 1277 | factors may be specified using the OCIBindArrayOfStruct() call. The skip |
| 1278 | factors are used to compute the address of the next pointer to the value, the |
| 1279 | indicator structure and their sizes. |
| 1280 | pvszsp ( IN/OUT) - points to the size of the program variable. The size of the |
| 1281 | named data type is not required on input. For an array, pvszsp is an array of |
| 1282 | ub4s. On return, for OUT bind variables, this points to size(s) of the Named |
| 1283 | Data Types and REFs received. pvszsp is ignored if the OCI_DATA_AT_EXEC |
| 1284 | mode is set. Then the size of the buffer is taken at runtime. |
| 1285 | indpp ( IN/OUT) - points to a pointer to the program variable buffer |
| 1286 | containing the parallel indicator structure. For an array, points to an array |
| 1287 | of pointers. When the bind variable is also an OUT bind variable, memory is |
| 1288 | allocated in the object cache, to store the unpickled OUT indicator values. At |
| 1289 | the end of the execute when all OUT values have been received, indpp points |
| 1290 | to the pointer(s) to these newly allocated indicator structure(s). |
| 1291 | indpp is ignored if the OCI_DATA_AT_EXEC mode is set. Then the indicator |
| 1292 | is requested at runtime. |
| 1293 | indszp ( IN/OUT) - points to the size of the IN indicator structure program |
| 1294 | variable. For an array, it is an array of sb2s. On return for OUT bind |
| 1295 | variables, this points to size(s) of the received OUT indicator structures. |
| 1296 | indszp is ignored if the OCI_DATA_AT_EXEC mode is set. Then the indicator |
| 1297 | size is requested at runtime. |
| 1298 | Related Functions |
| 1299 | OCIAttrGet() |
| 1300 | |
| 1301 | |
| 1302 | |
| 1303 | ----------------------------------OCIBreak------------------------------------ |
| 1304 | |
| 1305 | |
| 1306 | OCIBreak() |
| 1307 | Name |
| 1308 | OCI Break |
| 1309 | Purpose |
| 1310 | This call performs an immediate (asynchronous) abort of any currently |
| 1311 | executing OCI function that is associated with a server . |
| 1312 | Syntax |
| 1313 | sword OCIBreak ( void *hndlp, |
| 1314 | OCIError *errhp); |
| 1315 | Comments |
| 1316 | This call performs an immediate (asynchronous) abort of any currently |
| 1317 | executing OCI function that is associated with a server. It is normally used |
| 1318 | to stop a long-running OCI call being processed on the server. |
| 1319 | This call can take either the service context handle or the server context |
| 1320 | handle as a parameter to identify the function to be aborted. |
| 1321 | Parameters |
| 1322 | hndlp (IN) - the service context handle or the server context handle. |
| 1323 | errhp (IN) - an error handle which can be passed to OCIErrorGet() for |
| 1324 | diagnostic information in the event of an error. |
| 1325 | Related Functions |
| 1326 | |
| 1327 | -----------------------------OCIConnectionPoolCreate -------------------------- |
| 1328 | Name: |
| 1329 | OCIConnectionPoolCreate |
| 1330 | |
| 1331 | Purpose: |
| 1332 | Creates the connections in the pool |
| 1333 | |
| 1334 | Syntax: |
| 1335 | OCIConnectionPoolCreate (OCIEnv *envhp, OCIError *errhp, OCICPool *poolhp, |
| 1336 | OraText **poolName, sb4 *poolNameLen, |
| 1337 | const Oratext *dblink, sb4 dblinkLen, |
| 1338 | ub4 connMin, ub4 connMax, ub4 connIncr, |
| 1339 | const OraText *poolUsername, sb4 poolUserLen, |
| 1340 | const OraText *poolPassword, sb4 poolPassLen, |
| 1341 | ub4 mode) |
| 1342 | Comments: |
| 1343 | This call is used to create a connection pool. conn_min connections |
| 1344 | to the database are started on calling OCIConnectionPoolCreate. |
| 1345 | |
| 1346 | Parameters: |
| 1347 | envhp (IN/OUT) - A pointer to the environment where the Conencton Pool |
| 1348 | is to be created |
| 1349 | errhp (IN/OUT) - An error handle which can be passed to OCIErrorGet(). |
| 1350 | poolhp (IN/OUT) - An uninitialiazed pool handle. |
| 1351 | poolName (OUT) - The connection pool name. |
| 1352 | poolNameLen (OUT) - The length of the connection pool name |
| 1353 | dblink (IN/OUT) - Specifies the database(server) to connect. This will also |
| 1354 | be used as the default pool name. |
| 1355 | dblinkLen (IN) - The length of the string pointed to by dblink. |
| 1356 | connMin (IN) - Specifies the minimum number of connections in the |
| 1357 | Connection Pool at any instant. |
| 1358 | connMin number of connections are started when |
| 1359 | OCIConnectionPoolCreate() is called. |
| 1360 | connMax (IN) - Specifies the maximum number of connections that can be |
| 1361 | opened to the database. Once this value is reached, no |
| 1362 | more connections are opened. |
| 1363 | connIncr (IN) - Allows application to set the next increment for |
| 1364 | connections to be opened to the database if the current |
| 1365 | number of connections are less than conn_max. |
| 1366 | poolUsername (IN/OUT) - Connection pooling requires an implicit proxy |
| 1367 | session and this attribute provides a username |
| 1368 | for that session. |
| 1369 | poolUserLen (IN) - This represents the length of pool_username. |
| 1370 | poolPassword (IN/OUT) - The password for the parameter pool_username passed |
| 1371 | above. |
| 1372 | poolPassLen (IN) - This represents the length of pool_password. |
| 1373 | |
| 1374 | mode (IN) - The modes supported are OCI_DEFAULT and |
| 1375 | OCI_CPOOL_REINITIALIZE |
| 1376 | |
| 1377 | Related Functions |
| 1378 | OCIConnectionPoolDestroy() |
| 1379 | |
| 1380 | --------------------------------------------------------------------------- |
| 1381 | |
| 1382 | ----------------------------OCIConnectionPoolDestroy------------------------- |
| 1383 | Name: |
| 1384 | OCIConnectionPoolDestroy |
| 1385 | |
| 1386 | Purpose: |
| 1387 | Terminates the connections in the pool |
| 1388 | |
| 1389 | Syntax: |
| 1390 | OCIConnectionPoolDestroy (OCICPool *poolhp, OCIError *errhp, ub4 mode) |
| 1391 | |
| 1392 | Comments: |
| 1393 | On calling OCIConnectionPoolDestroy, all the open connections in the pool |
| 1394 | are closed and the pool is destroyed. |
| 1395 | |
| 1396 | Parameters: |
| 1397 | poolhp (IN/OUT) - An initialiazed pool handle. |
| 1398 | errhp (IN/OUT) - An error handle which can be passed to OCIErrorGet(). |
| 1399 | mode (IN) - Currently, OCIConnectionPoolDestroy() will support only |
| 1400 | the OCI_DEFAULT mode. |
| 1401 | |
| 1402 | Related Functions: |
| 1403 | OCIConnectionPoolCreate() |
| 1404 | |
| 1405 | ----------------------------------------------------------------------------- |
| 1406 | ----------------------------OCISessionPoolCreate----------------------------- |
| 1407 | Name: |
| 1408 | OCISessionPoolCreate |
| 1409 | |
| 1410 | Purpose: |
| 1411 | Creates the sessions in the session pool. |
| 1412 | |
| 1413 | Syntax: |
| 1414 | sword OCISessionPoolCreate (OCIEnv *envhp, OCIError *errhp, OCISpool *spoolhp, |
| 1415 | OraText **poolName, ub4 *poolNameLen, |
| 1416 | const OraText *connStr, ub4 connStrLen, |
| 1417 | ub4 sessMin, ub4 sessMax, ub4 sessIncr, |
| 1418 | OraText *userid, ub4 useridLen, |
| 1419 | OraText *password, ub4 passwordLen, |
| 1420 | ub4 mode) |
| 1421 | |
| 1422 | Comments: |
| 1423 | When OCISessionPoolCreate is called, a session pool is initialized for |
| 1424 | the associated environment and the database specified by the |
| 1425 | connStr parameter. This pool is named uniquely and the name |
| 1426 | is returned to the user in the poolname parameter. |
| 1427 | |
| 1428 | Parameters: |
| 1429 | envhp (IN/OUT) - A pointer to the environment handle in which the session |
| 1430 | pool needs to be created. |
| 1431 | errhp (IN/OUT) - An error handle which can be passed to OCIErrorGet(). |
| 1432 | spoolhp (IN/OUT) - A pointer to the session pool handle that is created. |
| 1433 | poolName (OUT) - Session pool name returned to the user. |
| 1434 | poolNameLen (OUT) - Length of the PoolName |
| 1435 | connStr (IN) - The TNS alias of the database to connect to. |
| 1436 | connStrLen (IN) - Length of the connStr. |
| 1437 | sessMin (IN) - Specifies the minimum number of sessions in the Session Pool. |
| 1438 | These are the number of sessions opened in the beginning, if |
| 1439 | in Homogeneous mode. Else, the parameter is ignored. |
| 1440 | sessMax (IN) - Specifies the maximum number of sessions in the Session Pool. |
| 1441 | Once this value is reached, no more sessions are opened, |
| 1442 | unless the OCI_ATTR_SPOOL_FORCEGET is set. |
| 1443 | userid (IN) - Specifies the userid with which to start up the sessions. |
| 1444 | useridLen (IN) - Length of userid. |
| 1445 | password (IN) - Specifies the password for the corresponding userid. |
| 1446 | passwordLen (IN) - Specifies the length of the password |
| 1447 | mode(IN) - May be OCI_DEFAULT, OCI_SPC_SPOOL_REINITIALIZE, or |
| 1448 | OCI_SPC_SPOOL_HOMOGENEOUS. |
| 1449 | |
| 1450 | Returns: |
| 1451 | SUCCESS - If pool could be allocated and created successfully. |
| 1452 | ERROR - If above conditions could not be met. |
| 1453 | |
| 1454 | Related Functions: |
| 1455 | OCISessionPoolDestroy() |
| 1456 | ----------------------------------------------------------------------------- |
| 1457 | -----------------------------OCISessionPoolDestroy--------------------------- |
| 1458 | Name: |
| 1459 | OCISessionPoolDestroy |
| 1460 | |
| 1461 | Purpose: |
| 1462 | Terminates all the sessions in the session pool. |
| 1463 | |
| 1464 | Syntax: |
| 1465 | sword OCISessionPoolDestroy (OCISPool *spoolhp, OCIError *errhp, ub4 mode) |
| 1466 | |
| 1467 | Comments: |
| 1468 | spoolhp (IN/OUT) - The pool handle of the session pool to be destroyed. |
| 1469 | errhp (IN/OUT) - An error handle which can be passed to OCIErrorGet(). |
| 1470 | mode (IN) - Currently only OCI_DEFAULT mode is supported. |
| 1471 | |
| 1472 | Returns: |
| 1473 | SUCCESS - All the sessions could be closed. |
| 1474 | ERROR - If the above condition is not met. |
| 1475 | |
| 1476 | Related Functions: |
| 1477 | OCISessionPoolCreate() |
| 1478 | ----------------------------------------------------------------------------- |
| 1479 | -------------------------------OCISessionGet--------------------------------- |
| 1480 | Name: |
| 1481 | OCISessionGet |
| 1482 | |
| 1483 | Purpose: |
| 1484 | Get a session. This could be from a session pool, connection pool or |
| 1485 | a new standalone session. |
| 1486 | |
| 1487 | Syntax: |
| 1488 | sword OCISessionGet(OCIenv *envhp, OCIError *errhp, OCISvcCtx **svchp, |
| 1489 | OCIAuthInfo *authhp, |
| 1490 | OraText *poolName, ub4 poolName_len, |
| 1491 | const OraText *tagInfo, ub4 tagInfo_len, |
| 1492 | OraText **retTagInfo, ub4 *retTagInfo_len, |
| 1493 | boolean *found, |
| 1494 | ub4 mode) |
| 1495 | |
| 1496 | Comments: |
| 1497 | envhp (IN/OUT) - OCI environment handle. |
| 1498 | errhp (IN/OUT) - OCI error handle to be passed to OCIErrorGet(). |
| 1499 | svchp (IN/OUT) - Address of an OCI service context pointer. This will be |
| 1500 | filled with a server and session handle, attached to the |
| 1501 | pool. |
| 1502 | authhp (IN/OUT) - OCI Authentication Information handle. |
| 1503 | poolName (IN) - This indicates the session/connection pool to get the |
| 1504 | session/connection from in the OCI_SPOOL/OCI_CPOOL mode. |
| 1505 | In the OCI_DEFAULT mode it refers to the connect string. |
| 1506 | poolName_len (IN) - length of poolName. |
| 1507 | tagInfo (IN) - indicates the tag of the session that the user wants. If the |
| 1508 | user wants a default session, he must specify a NULL here. |
| 1509 | Only used for Session Pooling. |
| 1510 | tagInfo_len (IN) - the length of tagInfo. |
| 1511 | retTagInfo (OUT) - This indicates the type of session that is returned to |
| 1512 | the user. Only used for Session Pooling. |
| 1513 | retTagInfo_len (OUT) - the length of retTagInfo. |
| 1514 | found (OUT) - set to true if the user gets a session he had requested, else |
| 1515 | set to false. Only used for Session Pooling. |
| 1516 | mode (IN) - The supported modes are OCI_DEFAULT, OCI_CRED_PROXY and |
| 1517 | OCI_GET_SPOOL_MATCHANY, OCI_SPOOL and OCI_CPOOL. OCI_SPOOL and |
| 1518 | OCI_CPOOL are mutually exclusive. |
| 1519 | |
| 1520 | Returns: |
| 1521 | SUCCESS - if a session was successfully returned into svchp. |
| 1522 | SUCCESS_WITH_INFO - if a session was successfully returned into svchp and the |
| 1523 | total number of sessions > maxsessions. Only valid for |
| 1524 | Session Pooling. |
| 1525 | ERROR - If a session could not be retrieved. |
| 1526 | |
| 1527 | Related Functions: |
| 1528 | OCISessionRelease() |
| 1529 | ----------------------------------------------------------------------------- |
| 1530 | ---------------------------OCISessionRelease--------------------------------- |
| 1531 | Name: |
| 1532 | OCISessionRelease |
| 1533 | |
| 1534 | Purpose: |
| 1535 | Release the session. |
| 1536 | |
| 1537 | Syntax: |
| 1538 | sword OCISessionRelease ( OCISvcCtx *svchp, OCIError *errhp, |
| 1539 | OraText *tag, ub4 tag_len, |
| 1540 | ub4 mode); |
| 1541 | |
| 1542 | Comments: |
| 1543 | svchp (IN/OUT) - The service context associated with the session/connection. |
| 1544 | errhp (IN/OUT) - OCI error handle to be passed to OCIErrorGet(). |
| 1545 | tag (IN) - Only used for Session Pooling. |
| 1546 | This parameter will be ignored unless mode OCI_RLS_SPOOL_RETAG is |
| 1547 | specified. In this case, the session is labelled with this tag and |
| 1548 | returned to the pool. If this is NULL, then the session is untagged. |
| 1549 | tag_len (IN) - Length of the tag. This is ignored unless mode |
| 1550 | OCI_RLS_SPOOL_RETAG is set. |
| 1551 | mode (IN) - The supported modes are OCI_DEFAULT, OCI_RLS_SPOOL_DROPSESS, |
| 1552 | OCI_RLS_SPOOL_RETAG. The last 2 are only valid for Session Pooling. |
| 1553 | When OCI_RLS_SPOOL_DROPSESS is specified, the session |
| 1554 | will be removed from the session pool. If OCI_RLS_SPOOL_RETAG |
| 1555 | is set, the tag on the session will be altered. If this mode is |
| 1556 | not set, the tag and tag_len parameters will be ignored. |
| 1557 | |
| 1558 | Returns: |
| 1559 | ERROR - If the session could not be released successfully. |
| 1560 | SUCCESS - In all other cases. |
| 1561 | |
| 1562 | Related Functions: |
| 1563 | OCISessionGet(). |
| 1564 | ----------------------------------------------------------------------------- |
| 1565 | ------------------------------OCIDateTimeAssign -------------------------- |
| 1566 | sword OCIDateTimeAssign(void *hndl, OCIError *err, const OCIDateTime *from, |
| 1567 | OCIDateTime *to); |
| 1568 | NAME: OCIDateTimeAssign - OCIDateTime Assignment |
| 1569 | PARAMETERS: |
| 1570 | hndl (IN) - Session/Env handle. |
| 1571 | err (IN/OUT) - error handle. If there is an error, it is |
| 1572 | recorded in 'err' and this function returns OCI_ERROR. |
| 1573 | The error recorded in 'err' can be retrieved by calling |
| 1574 | OCIErrorGet(). |
| 1575 | from (IN) - datetime to be assigned |
| 1576 | to (OUT) - lhs of assignment |
| 1577 | DESCRIPTION: |
| 1578 | Performs date assignment. The type of the output will be same as that |
| 1579 | of input |
| 1580 | |
| 1581 | ------------------------------OCIDateTimeCheck---------------------------- |
| 1582 | sword OCIDateTimeCheck(void *hndl, OCIError *err, const OCIDateTime *date, |
| 1583 | ub4 *valid ); |
| 1584 | NAME: OCIDateTimeCheck - OCIDateTime CHecK if the given date is valid |
| 1585 | PARAMETERS: |
| 1586 | hndl (IN) - Session/Env handle. |
| 1587 | err (IN/OUT) - error handle. If there is an error, it is |
| 1588 | recorded in 'err' and this function returns OCI_ERROR. |
| 1589 | The error recorded in 'err' can be retrieved by calling |
| 1590 | OCIErrorGet(). |
| 1591 | date (IN) - date to be checked |
| 1592 | valid (OUT) - returns zero for a valid date, otherwise |
| 1593 | the ORed combination of all error bits specified below: |
| 1594 | Macro name Bit number Error |
| 1595 | ---------- ---------- ----- |
| 1596 | OCI_DATE_INVALID_DAY 0x1 Bad day |
| 1597 | OCI_DATE_DAY_BELOW_VALID 0x2 Bad DAy Low/high bit (1=low) |
| 1598 | OCI_DATE_INVALID_MONTH 0x4 Bad MOnth |
| 1599 | OCI_DATE_MONTH_BELOW_VALID 0x8 Bad MOnth Low/high bit (1=low) |
| 1600 | OCI_DATE_INVALID_YEAR 0x10 Bad YeaR |
| 1601 | OCI_DATE_YEAR_BELOW_VALID 0x20 Bad YeaR Low/high bit (1=low) |
| 1602 | OCI_DATE_INVALID_HOUR 0x40 Bad HouR |
| 1603 | OCI_DATE_HOUR_BELOW_VALID 0x80 Bad HouR Low/high bit (1=low) |
| 1604 | OCI_DATE_INVALID_MINUTE 0x100 Bad MiNute |
| 1605 | OCI_DATE_MINUTE_BELOW_VALID 0x200 Bad MiNute Low/high bit (1=low) |
| 1606 | OCI_DATE_INVALID_SECOND 0x400 Bad SeCond |
| 1607 | OCI_DATE_SECOND_BELOW_VALID 0x800 bad second Low/high bit (1=low) |
| 1608 | OCI_DATE_DAY_MISSING_FROM_1582 0x1000 Day is one of those "missing" |
| 1609 | from 1582 |
| 1610 | OCI_DATE_YEAR_ZERO 0x2000 Year may not equal zero |
| 1611 | OCI_DATE_INVALID_TIMEZONE 0x4000 Bad Timezone |
| 1612 | OCI_DATE_INVALID_FORMAT 0x8000 Bad date format input |
| 1613 | |
| 1614 | So, for example, if the date passed in was 2/0/1990 25:61:10 in |
| 1615 | (month/day/year hours:minutes:seconds format), the error returned |
| 1616 | would be OCI_DATE_INVALID_DAY | OCI_DATE_DAY_BELOW_VALID | |
| 1617 | OCI_DATE_INVALID_HOUR | OCI_DATE_INVALID_MINUTE |
| 1618 | |
| 1619 | DESCRIPTION: |
| 1620 | Check if the given date is valid. |
| 1621 | RETURNS: |
| 1622 | OCI_SUCCESS if the function completes successfully. |
| 1623 | OCI_INVALID_HANDLE if 'err' is NULL. |
| 1624 | OCI_ERROR if |
| 1625 | 'date' and 'valid' pointers are NULL pointers |
| 1626 | |
| 1627 | ------------------------------- OCIDateTimeCompare---------------------------- |
| 1628 | sword OCIDateTimeCompare(void *hndl, OCIError *err, const OCIDateTime *date1, |
| 1629 | const OCIDateTime *date2, sword *result ); |
| 1630 | NAME: OCIDateTimeCompare - OCIDateTime CoMPare dates |
| 1631 | PARAMETERS: |
| 1632 | hndl (IN) - Session/Env handle. |
| 1633 | err (IN/OUT) - error handle. If there is an error, it is |
| 1634 | recorded in 'err' and this function returns OCI_ERROR. |
| 1635 | The error recorded in 'err' can be retrieved by calling |
| 1636 | OCIErrorGet(). |
| 1637 | date1, date2 (IN) - dates to be compared |
| 1638 | result (OUT) - comparison result, 0 if equal, -1 if date1 < date2, |
| 1639 | 1 if date1 > date2 |
| 1640 | DESCRIPTION: |
| 1641 | The function OCIDateCompare compares two dates. It returns -1 if |
| 1642 | date1 is smaller than date2, 0 if they are equal, and 1 if date1 is |
| 1643 | greater than date2. |
| 1644 | RETURNS: |
| 1645 | OCI_SUCCESS if the function completes successfully. |
| 1646 | OCI_INVALID_HANDLE if 'err' is NULL. |
| 1647 | OCI_ERROR if |
| 1648 | invalid date |
| 1649 | input dates are not mutually comparable |
| 1650 | |
| 1651 | ------------------------------OCIDateTimeConvert---------------------- |
| 1652 | sword OCIDateTimeConvert(void *hndl, OCIError *err, OCIDateTime *indate, |
| 1653 | OCIDateTime *outdate); |
| 1654 | NAME: OCIDateTimeConvert - Conversion between different DATETIME types |
| 1655 | PARAMETERS: |
| 1656 | hndl (IN) - Session/Env handle. |
| 1657 | err (IN/OUT) - error handle. If there is an error, it is |
| 1658 | recorded in 'err' and this function returns OCI_ERROR. |
| 1659 | The error recorded in 'err' can be retrieved by calling |
| 1660 | OCIErrorGet(). |
| 1661 | indate (IN) - pointer to input date |
| 1662 | outdate (OUT) - pointer to output datetime |
| 1663 | DESCRIPTION: Converts one datetime type to another. The result type is |
| 1664 | the type of the 'outdate' descriptor. |
| 1665 | RETURNS: |
| 1666 | OCI_SUCCESS if the function completes successfully. |
| 1667 | OCI_INVALID_HANDLE if 'err' is NULL. |
| 1668 | OCI_ERROR if |
| 1669 | conversion not possible. |
| 1670 | |
| 1671 | ---------------------------- OCIDateTimeFromText----------------------- |
| 1672 | sword OCIDateTimeFromText(void *hndl, OCIError *err, const OraText *date_str, |
| 1673 | size_t d_str_length, const OraText *fmt, ub1 fmt_length, |
| 1674 | const OraText *lang_name, size_t lang_length, OCIDateTime *date ); |
| 1675 | NAME: OCIDateTimeFromText - OCIDateTime convert String FROM Date |
| 1676 | PARAMETERS: |
| 1677 | hndl (IN) - Session/Env handle. If Session Handle is passed, the |
| 1678 | conversion takes place in session NLS_LANGUAGE and |
| 1679 | session NLS_CALENDAR, otherwise the default is used. |
| 1680 | err (IN/OUT) - error handle. If there is an error, it is |
| 1681 | recorded in 'err' and this function returns OCI_ERROR. |
| 1682 | The error recorded in 'err' can be retrieved by calling |
| 1683 | OCIErrorGet(). |
| 1684 | date_str (IN) - input string to be converted to Oracle date |
| 1685 | d_str_length (IN) - size of the input string, if the length is -1 |
| 1686 | then 'date_str' is treated as a null terminated string |
| 1687 | fmt (IN) - conversion format; if 'fmt' is a null pointer, then |
| 1688 | the string is expected to be in the default format for |
| 1689 | the datetime type. |
| 1690 | fmt_length (IN) - length of the 'fmt' parameter |
| 1691 | lang_name (IN) - language in which the names and abbreviations of |
| 1692 | days and months are specified, if null i.e. (OraText *)0, |
| 1693 | the default language of session is used, |
| 1694 | lang_length (IN) - length of the 'lang_name' parameter |
| 1695 | date (OUT) - given string converted to date |
| 1696 | DESCRIPTION: |
| 1697 | Converts the given string to Oracle datetime type set in the |
| 1698 | OCIDateTime descriptor according to the specified format. Refer to |
| 1699 | "TO_DATE" conversion function described in "Oracle SQL Language |
| 1700 | Reference Manual" for a description of format. |
| 1701 | RETURNS: |
| 1702 | OCI_SUCCESS if the function completes successfully. |
| 1703 | OCI_INVALID_HANDLE if 'err' is NULL. |
| 1704 | OCI_ERROR if |
| 1705 | invalid format |
| 1706 | unknown language |
| 1707 | invalid input string |
| 1708 | |
| 1709 | --------------------------- OCIDateTimeGetDate------------------------- |
| 1710 | sword OCIDateTimeGetDate(void *hndl, OCIError *err, const OCIDateTime *date, |
| 1711 | sb2 *year, ub1 *month, ub1 *day ); |
| 1712 | NAME: OCIDateTimeGetDate - OCIDateTime Get Date (year, month, day) |
| 1713 | portion of DATETIME. |
| 1714 | PARAMETERS: |
| 1715 | hndl (IN) - Session/Env handle. |
| 1716 | err (IN/OUT) - error handle. If there is an error, it is |
| 1717 | recorded in 'err' and this function returns OCI_ERROR. |
| 1718 | The error recorded in 'err' can be retrieved by calling |
| 1719 | OCIErrorGet(). |
| 1720 | datetime (IN) - Pointer to OCIDateTime |
| 1721 | year (OUT) - year value |
| 1722 | month (OUT) - month value |
| 1723 | day (OUT) - day value |
| 1724 | |
| 1725 | --------------------------- OCIDateTimeGetTime ------------------------ |
| 1726 | sword OCIDateTimeGetTime(void *hndl, OCIError *err, OCIDateTime *datetime, |
| 1727 | ub1 *hour, ub1 *minute, ub1 *sec, ub4 *fsec); |
| 1728 | NAME: OCIDateTimeGetTime - OCIDateTime Get Time (hour, min, second, |
| 1729 | fractional second) of DATETIME. |
| 1730 | PARAMETERS: |
| 1731 | hndl (IN) - Session/Env handle. |
| 1732 | err (IN/OUT) - error handle. If there is an error, it is |
| 1733 | recorded in 'err' and this function returns OCI_ERROR. |
| 1734 | The error recorded in 'err' can be retrieved by calling |
| 1735 | OCIErrorGet(). |
| 1736 | datetime (IN) - Pointer to OCIDateTime |
| 1737 | hour (OUT) - hour value |
| 1738 | minute (OUT) - minute value |
| 1739 | sec (OUT) - second value |
| 1740 | fsec (OUT) - Fractional Second value |
| 1741 | |
| 1742 | --------------------------- OCIDateTimeGetTimeZoneOffset ---------------------- |
| 1743 | sword OCIDateTimeGetTimeZoneOffset(void *hndl,OCIError *err,const |
| 1744 | OCIDateTime *datetime,sb1 *hour,sb1 *minute); |
| 1745 | |
| 1746 | NAME: OCIDateTimeGetTimeZoneOffset - OCIDateTime Get TimeZone (hour, minute) |
| 1747 | portion of DATETIME. |
| 1748 | PARAMETERS: |
| 1749 | hndl (IN) - Session/Env handle. |
| 1750 | err (IN/OUT) - error handle. If there is an error, it is |
| 1751 | recorded in 'err' and this function returns OCI_ERROR. |
| 1752 | The error recorded in 'err' can be retrieved by calling |
| 1753 | OCIErrorGet(). |
| 1754 | datetime (IN) - Pointer to OCIDateTime |
| 1755 | hour (OUT) - TimeZone Hour value |
| 1756 | minute (OUT) - TimeZone Minute value |
| 1757 | |
| 1758 | --------------------------- OCIDateTimeSysTimeStamp--------------------- |
| 1759 | sword OCIDateTimeSysTimeStamp(void *hndl, OCIError *err, |
| 1760 | OCIDateTime *sys_date ); |
| 1761 | |
| 1762 | NAME: OCIDateTimeSysTimeStamp - Returns system date/time as a TimeStamp with |
| 1763 | timezone |
| 1764 | PARAMETERS: |
| 1765 | hndl (IN) - Session/Env handle. |
| 1766 | err (IN/OUT) - error handle. If there is an error, it is |
| 1767 | recorded in 'err' and this function returns OCI_ERROR. |
| 1768 | The error recorded in 'err' can be retrieved by calling |
| 1769 | OCIErrorGet(). |
| 1770 | sys_date (OUT) - Pointer to output timestamp |
| 1771 | |
| 1772 | DESCRIPTION: |
| 1773 | Gets the system current date and time as a timestamp with timezone |
| 1774 | RETURNS: |
| 1775 | OCI_SUCCESS if the function completes successfully. |
| 1776 | OCI_INVALID_HANDLE if 'err' is NULL. |
| 1777 | |
| 1778 | |
| 1779 | ------------------------------OCIDateTimeIntervalAdd---------------------- |
| 1780 | sword OCIDateTimeIntervalAdd(void *hndl, OCIError *err, OCIDateTime *datetime, |
| 1781 | OCIInterval *inter, OCIDateTime *outdatetime); |
| 1782 | NAME: OCIDateTimeIntervalAdd - Adds an interval to datetime |
| 1783 | PARAMETERS: |
| 1784 | hndl (IN) - Session/Env handle. |
| 1785 | err (IN/OUT) - error handle. If there is an error, it is |
| 1786 | recorded in 'err' and this function returns OCI_ERROR. |
| 1787 | The error recorded in 'err' can be retrieved by calling |
| 1788 | OCIErrorGet(). |
| 1789 | datetime (IN) - pointer to input datetime |
| 1790 | inter (IN) - pointer to interval |
| 1791 | outdatetime (IN) - pointer to output datetime. The output datetime |
| 1792 | will be of same type as input datetime |
| 1793 | DESCRIPTION: |
| 1794 | Adds an interval to a datetime to produce a resulting datetime |
| 1795 | RETURNS: |
| 1796 | OCI_SUCCESS if the function completes successfully. |
| 1797 | OCI_INVALID_HANDLE if 'err' is NULL. |
| 1798 | OCI_ERROR if: |
| 1799 | resulting date is before Jan 1, -4713 |
| 1800 | resulting date is after Dec 31, 9999 |
| 1801 | |
| 1802 | ------------------------------OCIDateTimeIntervalSub---------------------- |
| 1803 | sword OCIDateTimeIntervalSub(void *hndl, OCIError *err, OCIDateTime *datetime, |
| 1804 | OCIInterval *inter, OCIDateTime *outdatetime); |
| 1805 | NAME: OCIDateTimeIntervalSub - Subtracts an interval from a datetime |
| 1806 | PARAMETERS: |
| 1807 | hndl (IN) - Session/Env handle. |
| 1808 | err (IN/OUT) - error handle. If there is an error, it is |
| 1809 | recorded in 'err' and this function returns OCI_ERROR. |
| 1810 | The error recorded in 'err' can be retrieved by calling |
| 1811 | OCIErrorGet(). |
| 1812 | datetime (IN) - pointer to input datetime |
| 1813 | inter (IN) - pointer to interval |
| 1814 | outdatetime (IN) - pointer to output datetime. The output datetime |
| 1815 | will be of same type as input datetime |
| 1816 | DESCRIPTION: |
| 1817 | Subtracts an interval from a datetime and stores the result in a |
| 1818 | datetime |
| 1819 | RETURNS: |
| 1820 | OCI_SUCCESS if the function completes successfully. |
| 1821 | OCI_INVALID_HANDLE if 'err' is NULL. |
| 1822 | OCI_ERROR if: |
| 1823 | resulting date is before Jan 1, -4713 |
| 1824 | resulting date is after Dec 31, 9999 |
| 1825 | |
| 1826 | --------------------------- OCIDateTimeConstruct------------------------- |
| 1827 | sword OCIDateTimeConstruct(void *hndl,OCIError *err,OCIDateTime *datetime, |
| 1828 | sb2 year,ub1 month,ub1 day,ub1 hour,ub1 min,ub1 sec,ub4 fsec, |
| 1829 | OraText *timezone,size_t timezone_length); |
| 1830 | |
| 1831 | NAME: OCIDateTimeConstruct - Construct an OCIDateTime. Only the relevant |
| 1832 | fields for the OCIDateTime descriptor types are used. |
| 1833 | PARAMETERS: |
| 1834 | hndl (IN) - Session/Env handle. |
| 1835 | err (IN/OUT) - error handle. If there is an error, it is |
| 1836 | recorded in 'err' and this function returns OCI_ERROR. |
| 1837 | The error recorded in 'err' can be retrieved by calling |
| 1838 | OCIErrorGet(). |
| 1839 | datetime (IN) - Pointer to OCIDateTime |
| 1840 | year (IN) - year value |
| 1841 | month (IN) - month value |
| 1842 | day (IN) - day value |
| 1843 | hour (IN) - hour value |
| 1844 | min (IN) - minute value |
| 1845 | sec (IN) - second value |
| 1846 | fsec (IN) - Fractional Second value |
| 1847 | timezone (IN) - Timezone string |
| 1848 | timezone_length(IN) - Length of timezone string |
| 1849 | |
| 1850 | DESCRIPTION: |
| 1851 | Constructs a DateTime descriptor. The type of the datetime is the |
| 1852 | type of the OCIDateTime descriptor. Only the relevant fields based |
| 1853 | on the type are used. For Types with timezone, the date and time |
| 1854 | fields are assumed to be in the local time of the specified timezone. |
| 1855 | If timezone is not specified, then session default timezone is |
| 1856 | assumed. |
| 1857 | RETURNS: |
| 1858 | OCI_SUCCESS if the function completes successfully. |
| 1859 | OCI_ERROR if datetime is not valid. |
| 1860 | |
| 1861 | ------------------------------OCIDateTimeSubtract----------------------- |
| 1862 | sword OCIDateTimeSubtract(void *hndl, OCIError *err, OCIDateTime *indate1, |
| 1863 | OCIDateTime *indate2, OCIInterval *inter); |
| 1864 | NAME: OCIDateTimeSubtract - subtracts two datetimes to return an interval |
| 1865 | PARAMETERS: |
| 1866 | hndl (IN) - Session/Env handle. |
| 1867 | err (IN/OUT) - error handle. If there is an error, it is |
| 1868 | recorded in 'err' and this function returns OCI_ERROR. |
| 1869 | The error recorded in 'err' can be retrieved by calling |
| 1870 | OCIErrorGet(). |
| 1871 | indate1(IN) - pointer to subtrahend |
| 1872 | indate2(IN) - pointer to minuend |
| 1873 | inter (OUT) - pointer to output interval |
| 1874 | DESCRIPTION: |
| 1875 | Takes two datetimes as input and stores their difference in an |
| 1876 | interval. The type of the interval is the type of the 'inter' |
| 1877 | descriptor. |
| 1878 | RETURNS: |
| 1879 | OCI_SUCCESS if the function completes successfully. |
| 1880 | OCI_INVALID_HANDLE if 'err' is NULL. |
| 1881 | OCI_ERROR if |
| 1882 | datetimes are not comparable. |
| 1883 | |
| 1884 | --------------------------- OCIDateTimeToText-------------------------- |
| 1885 | sword OCIDateTimeToText(void *hndl, OCIError *err, const OCIDateTime *date, |
| 1886 | const OraText *fmt, ub1 fmt_length, ub1 fsprec, |
| 1887 | const OraText *lang_name, size_t lang_length, |
| 1888 | ub4 *buf_size, OraText *buf ); |
| 1889 | NAME: OCIDateTimeToText - OCIDateTime convert date TO String |
| 1890 | PARAMETERS: |
| 1891 | hndl (IN) - Session/Env handle. If Session Handle is passed, the |
| 1892 | conversion takes place in session NLS_LANGUAGE and |
| 1893 | session NLS_CALENDAR, otherwise the default is used. |
| 1894 | err (IN/OUT) - error handle. If there is an error, it is |
| 1895 | recorded in 'err' and this function returns OCI_ERROR. |
| 1896 | The error recorded in 'err' can be retrieved by calling |
| 1897 | OCIErrorGet(). |
| 1898 | date (IN) - Oracle datetime to be converted |
| 1899 | fmt (IN) - conversion format, if null string pointer (OraText*)0, then |
| 1900 | the date is converted to a character string in the |
| 1901 | default format for that type. |
| 1902 | fmt_length (IN) - length of the 'fmt' parameter |
| 1903 | fsprec (IN) - specifies the fractional second precision in which the |
| 1904 | fractional seconds is returned. |
| 1905 | lang_name (IN) - specifies the language in which the names and |
| 1906 | abbreviations of months and days are returned; |
| 1907 | default language of session is used if 'lang_name' |
| 1908 | is null i.e. (OraText *)0 |
| 1909 | lang_length (IN) - length of the 'nls_params' parameter |
| 1910 | buf_size (IN/OUT) - size of the buffer; size of the resulting string |
| 1911 | is returned via this parameter |
| 1912 | buf (OUT) - buffer into which the converted string is placed |
| 1913 | DESCRIPTION: |
| 1914 | Converts the given date to a string according to the specified format. |
| 1915 | Refer to "TO_DATE" conversion function described in |
| 1916 | "Oracle SQL Language Reference Manual" for a description of format |
| 1917 | and NLS arguments. The converted null-terminated date string is |
| 1918 | stored in the buffer 'buf'. |
| 1919 | RETURNS: |
| 1920 | OCI_SUCCESS if the function completes successfully. |
| 1921 | OCI_INVALID_HANDLE if 'err' is NULL. |
| 1922 | OCI_ERROR if |
| 1923 | buffer too small |
| 1924 | invalid format |
| 1925 | unknown language |
| 1926 | overflow error |
| 1927 | |
| 1928 | ----------------------------OCIDateTimeGetTimeZoneName------------------------ |
| 1929 | sword OCIDateTimeGetTimeZoneName(void *hndl, |
| 1930 | OCIError *err, |
| 1931 | const OCIDateTime *datetime, |
| 1932 | ub1 *buf, |
| 1933 | ub4 *buflen); |
| 1934 | NAME OCIDateTimeGetTimeZoneName - OCI DateTime Get the Time Zone Name |
| 1935 | PARAMETERS: |
| 1936 | hndl (IN) - Session/Env handle. |
| 1937 | err (IN/OUT) - error handle. If there is an error, it is |
| 1938 | recorded in 'err' and this function returns OCI_ERROR. |
| 1939 | The error recorded in 'err' can be retrieved by calling |
| 1940 | OCIErrorGet(). |
| 1941 | datetime (IN) - Pointer to an OCIDateTime. |
| 1942 | buf (OUT) - User allocated storage for name string. |
| 1943 | buflen (IN/OUT) - length of buf on input, length of name on out |
| 1944 | DESCRIPTION: |
| 1945 | Returns either the timezone region name or the absolute hour and minute |
| 1946 | offset. If the DateTime was created with a region id then the region |
| 1947 | name will be returned in the buf. If the region id is zero, then the |
| 1948 | hour and minute offset is returned as "[-]HH:MM". |
| 1949 | RETURNS: |
| 1950 | OCI_SUCCESS if the function completes successfully. |
| 1951 | OCI_INVALID_HANDLE if 'err' is NULL. |
| 1952 | OCI_ERROR if |
| 1953 | buffer too small |
| 1954 | error retrieving timezone data |
| 1955 | invalid region |
| 1956 | invalid LdiDateTime type |
| 1957 | |
| 1958 | ---------------------------------OCIDateTimeToArray---------------------------- |
| 1959 | sword OCIDateTimeToArray(void *hndl, |
| 1960 | OCIError *err, |
| 1961 | const OCIDateTime *datetime, |
| 1962 | const OCIInterval *reftz, |
| 1963 | ub1 *outarray, |
| 1964 | ub4 *len |
| 1965 | ub1 *fsprec); |
| 1966 | NAME OCIDateTimeToArray - OCI DateTime convert To Array format |
| 1967 | PARAMETERS: |
| 1968 | hndl (IN) - Session/Env handle. |
| 1969 | err (IN/OUT) - error handle. If there is an error, it is |
| 1970 | recorded in 'err' and this function returns OCI_ERROR. |
| 1971 | The error recorded in 'err' can be retrieved by calling |
| 1972 | OCIErrorGet(). |
| 1973 | datetime (IN) - Pointer to OCIDateTime to be converted. |
| 1974 | outarray (OUT) - Result array storage |
| 1975 | len (OUT) - pointer to length of outarray. |
| 1976 | fsprec (IN) - Number of fractional seconds digits. |
| 1977 | DESCRIPTION: |
| 1978 | Returns an array representing the input DateTime descriptor. |
| 1979 | RETURNS: |
| 1980 | OCI_SUCCESS if the function completes successfully. |
| 1981 | OCI_INVALID_HANDLE if 'err' is NULL. |
| 1982 | OCI_ERROR if |
| 1983 | buffer too small |
| 1984 | error retrieving timezone data |
| 1985 | invalid region |
| 1986 | invalid LdiDateTime type |
| 1987 | |
| 1988 | --------------------------------OCIDateTimeFromArray--------------------------- |
| 1989 | sword OCIDateTimeFromArray(void *hndl, |
| 1990 | OCIError *err, |
| 1991 | ub1 *inarray, |
| 1992 | ub4 len |
| 1993 | ub1 type |
| 1994 | OCIDateTime *datetime, |
| 1995 | OCIInterval *reftz, |
| 1996 | ub1 fsprec); |
| 1997 | NAME OCIDateTimeFromArray - OCI DateTime convert From Array format |
| 1998 | PARAMETERS: |
| 1999 | hndl (IN) - Session/Env handle. |
| 2000 | err (IN/OUT) - error handle. If there is an error, it is |
| 2001 | recorded in 'err' and this function returns OCI_ERROR. |
| 2002 | The error recorded in 'err' can be retrieved by calling |
| 2003 | OCIErrorGet(). |
| 2004 | inarray (IN) - Pointer to input array representtion of DateTime |
| 2005 | len (IN) - len of inarray. |
| 2006 | type (IN) - One of SQLT_DATE, SQLT_TIME, SQLT_TIME_TZ, SQLT_TIMESTAMP, |
| 2007 | SQLT_TIMESTAMP_TZ, or SQLT_TIMESTAMP_LTZ. |
| 2008 | datetime (OUT) - Pointer to the result OCIDateTime. |
| 2009 | reftz (IN) - timezone interval used with SQLT_TIMESTAMP_LTZ. |
| 2010 | fsprec (IN) - fractionl seconds digits of precision (0-9). |
| 2011 | DESCRIPTION: |
| 2012 | Returns a pointer to an OCIDateTime of type type converted from |
| 2013 | the inarray. |
| 2014 | RETURNS: |
| 2015 | OCI_SUCCESS if the function completes successfully. |
| 2016 | OCI_INVALID_HANDLE if 'err' is NULL. |
| 2017 | OCI_ERROR if |
| 2018 | buffer too small |
| 2019 | error retrieving timezone data |
| 2020 | invalid region |
| 2021 | invalid LdiDateTime type |
| 2022 | |
| 2023 | ----------------------------------OCIRowidToChar----------------------------- |
| 2024 | Name |
| 2025 | OCIRowidToChar |
| 2026 | |
| 2027 | Purpose |
| 2028 | Converts physical/logical (universal) ROWID to chracter extended (Base 64) |
| 2029 | representation into user provided buffer outbfp of length outbflp. After |
| 2030 | execution outbflp contains amount of bytes converted.In case of truncation |
| 2031 | error, outbflp contains required size to make this conversion successful |
| 2032 | and returns ORA-1405. |
| 2033 | |
| 2034 | Syntax |
| 2035 | sword OCIRowidToChar( OCIRowid *rowidDesc, |
| 2036 | OraText *outbfp, |
| 2037 | ub2 *outbflp, |
| 2038 | OCIError *errhp) |
| 2039 | |
| 2040 | Comments |
| 2041 | After this conversion, ROWID in character format can be bound using |
| 2042 | OCIBindByPos or OCIBindByName call and used to query a row at a |
| 2043 | desired ROWID. |
| 2044 | |
| 2045 | Parameters |
| 2046 | rowidDesc (IN) - rowid DESCriptor which is allocated from OCIDescritorAlloc |
| 2047 | and populated by a prior SQL statement execution |
| 2048 | outbfp (OUT) - pointer to the buffer where converted rowid in character |
| 2049 | representation is stored after successful execution. |
| 2050 | outbflp (IN/OUT) - pointer to output buffer length variable. |
| 2051 | Before execution (IN mode) *outbflp contains the size of |
| 2052 | outbfp, after execution (OUT mode) *outbflp contains amount |
| 2053 | of bytes converted. In an event of truncation during |
| 2054 | conversion *outbflp contains the required length to make |
| 2055 | conversion successful. |
| 2056 | errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for |
| 2057 | diagnostic information in the event of an error. |
| 2058 | |
| 2059 | ------------------------------OCIDefineArrayOfStruct-------------------------- |
| 2060 | |
| 2061 | |
| 2062 | OCIDefineArrayOfStruct() |
| 2063 | Name |
| 2064 | OCI Define for Array of Structures |
| 2065 | Purpose |
| 2066 | This call specifies additional attributes necessary for a static array define. |
| 2067 | Syntax |
| 2068 | sword OCIDefineArrayOfStruct ( OCIDefine *defnp, |
| 2069 | OCIError *errhp, |
| 2070 | ub4 pvskip, |
| 2071 | ub4 indskip, |
| 2072 | ub4 rlskip, |
| 2073 | ub4 rcskip ); |
| 2074 | Comments |
| 2075 | This call specifies additional attributes necessary for an array define, |
| 2076 | used in an array of structures (multi-row, multi-column) fetch. |
| 2077 | For more information about skip parameters, see the section "Skip Parameters" |
| 2078 | on page 4-17. |
| 2079 | Parameters |
| 2080 | defnp (IN) - the handle to the define structure which was returned by a call |
| 2081 | to OCIDefineByPos(). |
| 2082 | errhp (IN) - an error handle which can be passed to OCIErrorGet() for |
| 2083 | diagnostic information in the event of an error. |
| 2084 | pvskip (IN) - skip parameter for the next data value. |
| 2085 | indskip (IN) - skip parameter for the next indicator location. |
| 2086 | rlskip (IN) - skip parameter for the next return length value. |
| 2087 | rcskip (IN) - skip parameter for the next return code. |
| 2088 | Related Functions |
| 2089 | OCIAttrGet() |
| 2090 | |
| 2091 | |
| 2092 | |
| 2093 | |
| 2094 | |
| 2095 | OCIDefineByPos() |
| 2096 | Name |
| 2097 | OCI Define By Position |
| 2098 | Purpose |
| 2099 | Associates an item in a select-list with the type and output data buffer. |
| 2100 | Syntax |
| 2101 | sb4 OCIDefineByPos ( |
| 2102 | OCIStmt *stmtp, |
| 2103 | OCIDefine **defnp, |
| 2104 | OCIError *errhp, |
| 2105 | ub4 position, |
| 2106 | void *valuep, |
| 2107 | sb4 value_sz, |
| 2108 | ub2 dty, |
| 2109 | void *indp, |
| 2110 | ub2 *rlenp, |
| 2111 | ub2 *rcodep, |
| 2112 | ub4 mode ); |
| 2113 | Comments |
| 2114 | This call defines an output buffer which will receive data retreived from |
| 2115 | Oracle. The define is a local step which is necessary when a SELECT statement |
| 2116 | returns data to your OCI application. |
| 2117 | This call also implicitly allocates the define handle for the select-list item. |
| 2118 | Defining attributes of a column for a fetch is done in one or more calls. The |
| 2119 | first call is to OCIDefineByPos(), which defines the minimal attributes |
| 2120 | required to specify the fetch. |
| 2121 | This call takes as a parameter a define handle, which must have been |
| 2122 | previously allocated with a call to OCIHandleAlloc(). |
| 2123 | Following the call to OCIDefineByPos() additional define calls may be |
| 2124 | necessary for certain data types or fetch modes: |
| 2125 | A call to OCIDefineArrayOfStruct() is necessary to set up skip parameters |
| 2126 | for an array fetch of multiple columns. |
| 2127 | A call to OCIDefineObject() is necessary to set up the appropriate |
| 2128 | attributes of a named data type fetch. In this case the data buffer pointer |
| 2129 | in ocidefn() is ignored. |
| 2130 | Both OCIDefineArrayOfStruct() and OCIDefineObject() must be called |
| 2131 | after ocidefn() in order to fetch multiple rows with a column of named |
| 2132 | data types. |
| 2133 | For a LOB define, the buffer pointer must be a lob locator of type |
| 2134 | OCILobLocator , allocated by the OCIDescAlloc() call. LOB locators, and not |
| 2135 | LOB values, are always returned for a LOB column. LOB values can then be |
| 2136 | fetched using OCI LOB calls on the fetched locator. |
| 2137 | For NCHAR (fixed and varying length), the buffer pointer must point to an |
| 2138 | array of bytes sufficient for holding the required NCHAR characters. |
| 2139 | Nested table columns are defined and fetched like any other named data type. |
| 2140 | If the mode parameter is this call is set to OCI_DYNAMIC_FETCH, the client |
| 2141 | application can fetch data dynamically at runtime. |
| 2142 | Runtime data can be provided in one of two ways: |
| 2143 | callbacks using a user-defined function which must be registered with a |
| 2144 | subsequent call to OCIDefineDynamic(). When the client library needs a |
| 2145 | buffer to return the fetched data, the callback will be invoked and the |
| 2146 | runtime buffers provided will return a piece or the whole data. |
| 2147 | a polling mechanism using calls supplied by the OCI. This mode is |
| 2148 | assumed if no callbacks are defined. In this case, the fetch call returns the |
| 2149 | OCI_NEED_DATA error code, and a piecewise polling method is used |
| 2150 | to provide the data. |
| 2151 | Related Functions: For more information about using the |
| 2152 | OCI_DYNAMIC_FETCH mode, see the section "Runtime Data |
| 2153 | Allocation and Piecewise Operations" on page 5-16 of Volume 1.. |
| 2154 | For more information about the define step, see the section "Defining" |
| 2155 | on page 2-30. |
| 2156 | Parameters |
| 2157 | stmtp (IN) - a handle to the requested SQL query operation. |
| 2158 | defnp (IN/OUT) - a pointer to a pointer to a define handle which is implicitly |
| 2159 | allocated by this call. This handle is used to store the define information |
| 2160 | for this column. |
| 2161 | errhp (IN) - an error handle which can be passed to OCIErrorGet() for |
| 2162 | diagnostic information in the event of an error. |
| 2163 | position (IN) - the position of this value in the select list. Positions are |
| 2164 | 1-based and are numbered from left to right. For example, in the SELECT |
| 2165 | statement |
| 2166 | SELECT empno, ssn, mgrno FROM employees; |
| 2167 | empno is at position 1, ssn is at position 2, and mgrno is at position 3. |
| 2168 | valuep (IN/OUT) - a pointer to a buffer or an array of buffers of the type |
| 2169 | specified in the dty parameter. A number of buffers can be specified when |
| 2170 | results for more than one row are desired in a single fetch call. |
| 2171 | value_sz (IN) - the size of each valuep buffer in bytes. If the data is stored |
| 2172 | internally in VARCHAR2 format, the number of characters desired, if different |
| 2173 | from the buffer size in bytes, may be additionally specified by the using |
| 2174 | OCIAttrSet(). |
| 2175 | In an NLS conversion environment, a truncation error will be generated if the |
| 2176 | number of bytes specified is insufficient to handle the number of characters |
| 2177 | desired. |
| 2178 | dty (IN) - the data type. Named data type (SQLT_NTY) and REF (SQLT_REF) |
| 2179 | are valid only if the environment has been intialized with in object mode. |
| 2180 | indp - pointer to an indicator variable or array. For scalar data types, |
| 2181 | pointer to sb2 or an array of sb2s. Ignored for named data types. For named |
| 2182 | data types, a pointer to a named data type indicator structure or an array of |
| 2183 | named data type indicator structures is associated by a subsequent |
| 2184 | OCIDefineObject() call. |
| 2185 | See the section "Indicator Variables" on page 2-43 for more information about |
| 2186 | indicator variables. |
| 2187 | rlenp (IN/OUT) - pointer to array of length of data fetched. Each element in |
| 2188 | rlenp is the length of the data in the corresponding element in the row after |
| 2189 | the fetch. |
| 2190 | rcodep (OUT) - pointer to array of column-level return codes |
| 2191 | mode (IN) - the valid modes are: |
| 2192 | OCI_DEFAULT. This is the default mode. |
| 2193 | OCI_DYNAMIC_FETCH. For applications requiring dynamically |
| 2194 | allocated data at the time of fetch, this mode must be used. The user may |
| 2195 | additionally call OCIDefineDynamic() to set up a callback function that |
| 2196 | will be invoked to receive the dynamically allocated buffers and to set |
| 2197 | up the memory allocate/free callbacks and the context for the callbacks. |
| 2198 | valuep and value_sz are ignored in this mode. |
| 2199 | Related Functions |
| 2200 | OCIDefineArrayOfStruct(), OCIDefineDynamic(), OCIDefineObject() |
| 2201 | |
| 2202 | |
| 2203 | |
| 2204 | |
| 2205 | OCIDefineDynamic() |
| 2206 | Name |
| 2207 | OCI Define Dynamic Fetch Attributes |
| 2208 | Purpose |
| 2209 | This call is used to set the additional attributes required if the |
| 2210 | OCI_DYNAMIC_FETCH mode was selected in OCIDefineByPos(). |
| 2211 | Syntax |
| 2212 | sword OCIDefineDynamic( OCIDefine *defnp, |
| 2213 | OCIError *errhp, |
| 2214 | void *octxp, |
| 2215 | OCICallbackDefine (ocbfp)( |
| 2216 | void *octxp, |
| 2217 | OCIDefine *defnp, |
| 2218 | ub4 iter, |
| 2219 | void **bufpp, |
| 2220 | ub4 **alenpp, |
| 2221 | ub1 *piecep, |
| 2222 | void **indpp, |
| 2223 | ub2 **rcodep) ); |
| 2224 | Comments |
| 2225 | This call is used to set the additional attributes required if the |
| 2226 | OCI_DYNAMIC_FETCH mode has been selected in a call to |
| 2227 | OCIDefineByPos(). |
| 2228 | When the OCI_DYNAMIC_FETCH mode is selected, buffers will be |
| 2229 | dynamically allocated for REF, and named data type, values to receive the |
| 2230 | data. The pointers to these buffers will be returned. |
| 2231 | If OCI_DYNAMIC_FETCH mode was selected, and the call to |
| 2232 | OCIDefineDynamic() is skipped, then the application can fetch data piecewise |
| 2233 | using OCI calls. |
| 2234 | For more information about OCI_DYNAMIC_FETCH mode, see the section |
| 2235 | "Runtime Data Allocation and Piecewise Operations" on page 5-16. |
| 2236 | Parameters |
| 2237 | defnp (IN/OUT) - the handle to a define structure returned by a call to |
| 2238 | OCIDefineByPos(). |
| 2239 | errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for |
| 2240 | diagnostic information in the event of an error. |
| 2241 | octxp (IN) - points to a context for the callback function. |
| 2242 | ocbfp (IN) - points to a callback function. This is invoked at runtime to get |
| 2243 | a pointer to the buffer into which the fetched data or a piece of it will be |
| 2244 | retreived. The callback also specifies the indicator, the return code and the |
| 2245 | lengths of the data piece and indicator. The callback has the following |
| 2246 | parameters: |
| 2247 | octxp (IN) - a context pointer passed as an argument to all the callback |
| 2248 | functions. |
| 2249 | defnp (IN) - the define handle. |
| 2250 | iter (IN) - which row of this current fetch. |
| 2251 | bufpp (OUT) - returns a pointer to a buffer to store the column value, ie. |
| 2252 | *bufp points to some appropriate storage for the column value. |
| 2253 | alenpp (OUT) - returns a pointer to the length of the buffer. *alenpp |
| 2254 | contains the size of the buffer after return from callback. Gets set to |
| 2255 | actual data size after fetch. |
| 2256 | piecep (IN/OUT) - returns a piece value, as follows: |
| 2257 | The IN value can be OCI_ONE_PIECE, OCI_FIRST_PIECE or |
| 2258 | OCI_NEXT_PIECE. |
| 2259 | The OUT value can be OCI_ONE_PIECE if the IN value was |
| 2260 | OCI_ONE_PIECE. |
| 2261 | The OUT value can be OCI_ONE_PIECE or OCI_FIRST_PIECE if |
| 2262 | the IN value was OCI_FIRST_PIECE. |
| 2263 | The OUT value can only be OCI_NEXT_PIECE or |
| 2264 | OCI_LAST_PIECE if the IN value was OCI_NEXT_PIECE. |
| 2265 | indpp (IN) - indicator variable pointer |
| 2266 | rcodep (IN) - return code variable pointer |
| 2267 | Related Functions |
| 2268 | OCIAttrGet() |
| 2269 | OCIDefineObject() |
| 2270 | |
| 2271 | |
| 2272 | |
| 2273 | |
| 2274 | OCIDefineObject() |
| 2275 | Name |
| 2276 | OCI Define Named Data Type attributes |
| 2277 | Purpose |
| 2278 | Sets up additional attributes necessary for a Named Data Type define. |
| 2279 | Syntax |
| 2280 | sword OCIDefineObject ( OCIDefine *defnp, |
| 2281 | OCIError *errhp, |
| 2282 | const OCIType *type, |
| 2283 | void **pgvpp, |
| 2284 | ub4 *pvszsp, |
| 2285 | void **indpp, |
| 2286 | ub4 *indszp ); |
| 2287 | Comments |
| 2288 | This call sets up additional attributes necessary for a Named Data Type define. |
| 2289 | An error will be returned if this function is called when the OCI environment |
| 2290 | has been initialized in non-Object mode. |
| 2291 | This call takes as a paramter a type descriptor object (TDO) of datatype |
| 2292 | OCIType for the named data type being defined. The TDO can be retrieved |
| 2293 | with a call to OCITypeByName(). |
| 2294 | See the description of OCIInitialize() on page 13 - 43 for more information |
| 2295 | about initializing the OCI process environment. |
| 2296 | Parameters |
| 2297 | defnp (IN/OUT) - a define handle previously allocated in a call to |
| 2298 | OCIDefineByPos(). |
| 2299 | errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for |
| 2300 | diagnostic information in the event of an error. |
| 2301 | type (IN, optional) - points to the Type Descriptor Object (TDO) which |
| 2302 | describes the type of the program variable. Only used for program variables |
| 2303 | of type SQLT_NTY. This parameter is optional, and may be passed as NULL |
| 2304 | if it is not being used. |
| 2305 | pgvpp (IN/OUT) - points to a pointer to a program variable buffer. For an |
| 2306 | array, pgvpp points to an array of pointers. Memory for the fetched named data |
| 2307 | type instance(s) is dynamically allocated in the object cache. At the end of |
| 2308 | the fetch when all the values have been received, pgvpp points to the |
| 2309 | pointer(s) to these newly allocated named data type instance(s). The |
| 2310 | application must call OCIObjectMarkDel() to deallocate the named data type |
| 2311 | instance(s) when they are no longer needed. |
| 2312 | pvszsp (IN/OUT) - points to the size of the program variable. For an array, it |
| 2313 | is an array of ub4s. On return points to the size(s) of unpickled fetched |
| 2314 | values. |
| 2315 | indpp (IN/OUT) - points to a pointer to the program variable buffer |
| 2316 | containing the parallel indicator structure. For an array, points to an array |
| 2317 | of pointers. Memory is allocated to store the indicator structures in the |
| 2318 | object cache. At the end of the fetch when all values have been received, |
| 2319 | indpp points to the pointer(s) to these newly allocated indicator structure(s). |
| 2320 | indszp (IN/OUT) - points to the size(s) of the indicator structure program |
| 2321 | variable. For an array, it is an array of ub4s. On return points to the size(s) |
| 2322 | of the unpickled fetched indicator values. |
| 2323 | Related Functions |
| 2324 | OCIAttrGet() |
| 2325 | |
| 2326 | |
| 2327 | |
| 2328 | OCIDescAlloc() |
| 2329 | Name |
| 2330 | OCI Get DESCriptor or lob locator |
| 2331 | Purpose |
| 2332 | Allocates storage to hold certain data types. The descriptors can be used as |
| 2333 | bind or define variables. |
| 2334 | Syntax |
| 2335 | sword OCIDescAlloc ( const void *parenth, |
| 2336 | void **descpp, |
| 2337 | ub4 type, |
| 2338 | size_t xtramem_sz, |
| 2339 | void **usrmempp); |
| 2340 | Comments |
| 2341 | Returns a pointer to an allocated and initialized structure, corresponding to |
| 2342 | the type specified in type. A non-NULL descriptor or LOB locator is returned |
| 2343 | on success. No diagnostics are available on error. |
| 2344 | This call returns OCI_SUCCESS if successful, or OCI_INVALID_HANDLE if |
| 2345 | an out-of-memory error occurs. |
| 2346 | Parameters |
| 2347 | parenth (IN) - an environment handle. |
| 2348 | descpp (OUT) - returns a descriptor or LOB locator of desired type. |
| 2349 | type (IN) - specifies the type of descriptor or LOB locator to be allocated. |
| 2350 | The specific types are: |
| 2351 | OCI_DTYPE_SNAP - specifies generation of snapshot descriptor of C |
| 2352 | type - OCISnapshot |
| 2353 | OCI_DTYPE_LOB - specifies generation of a LOB data type locator of C |
| 2354 | type - OCILobLocator |
| 2355 | OCI_DTYPE_RSET - specifies generation of a descriptor of C type |
| 2356 | OCIResult that references a result set (a number of rows as a result of a |
| 2357 | query). This descriptor is bound to a bind variable of data type |
| 2358 | SQLT_RSET (result set). The descriptor has to be converted into a |
| 2359 | statement handle using a function - OCIResultSetToStmt() - which can |
| 2360 | then be passed to OCIDefineByPos() and OCIStmtFetch() to retrieve the |
| 2361 | rows of the result set. |
| 2362 | OCI_DTYPE_ROWID - specifies generation of a ROWID descriptor of C |
| 2363 | type OCIRowid. |
| 2364 | OCI_DTYPE_COMPLEXOBJECTCOMP - specifies generation of a |
| 2365 | complex object retrieval descriptor of C type |
| 2366 | OCIComplexObjectComp. |
| 2367 | xtramemsz (IN) - specifies an amount of user memory to be allocated for use |
| 2368 | by the application. |
| 2369 | usrmempp (OUT) - returns a pointer to the user memory of size xtramemsz |
| 2370 | allocated by the call for the user. |
| 2371 | Related Functions |
| 2372 | OCIDescFree() |
| 2373 | |
| 2374 | |
| 2375 | |
| 2376 | |
| 2377 | OCIDescFree() |
| 2378 | Name |
| 2379 | OCI Free DESCriptor |
| 2380 | Purpose |
| 2381 | Deallocates a previously allocated descriptor. |
| 2382 | Syntax |
| 2383 | sword OCIDescFree ( void *descp, |
| 2384 | ub4 type); |
| 2385 | Comments |
| 2386 | This call frees up storage associated with the descriptor, corresponding to the |
| 2387 | type specified in type. Returns OCI_SUCCESS or OCI_INVALID_HANDLE. |
| 2388 | All descriptors must be explicitly deallocated. OCI will not deallocate a |
| 2389 | descriptor if the environment handle is deallocated. |
| 2390 | Parameters |
| 2391 | descp (IN) - an allocated descriptor. |
| 2392 | type (IN) - specifies the type of storage to be freed. The specific types are: |
| 2393 | OCI_DTYPE_SNAP - snapshot descriptor |
| 2394 | OCI_DTYPE_LOB - a LOB data type descriptor |
| 2395 | OCI_DTYPE_RSET - a descriptor that references a result set (a number |
| 2396 | of rows as a result of a query). |
| 2397 | OCI_DTYPE_ROWID - a ROWID descriptor |
| 2398 | OCI_DTYPE_COMPLEXOBJECTCOMP - a complex object retrieval |
| 2399 | descriptor |
| 2400 | Related Functions |
| 2401 | OCIDescAlloc() |
| 2402 | |
| 2403 | |
| 2404 | |
| 2405 | OCIDescribeAny() |
| 2406 | Name |
| 2407 | OCI DeSCribe Any |
| 2408 | Purpose |
| 2409 | Describes existing schema objects. |
| 2410 | Syntax |
| 2411 | sword OCIDescribeAny ( OCISvcCtx *svchp, |
| 2412 | OCIError *errhp, |
| 2413 | void *objptr, |
| 2414 | ub4 objnm_len, |
| 2415 | ub1 objptr_typ, |
| 2416 | ub1 info_level, |
| 2417 | ub1 objtype, |
| 2418 | OCIDesc *dschp ); |
| 2419 | Comments |
| 2420 | This is a generic describe call that describes existing schema objects: tables, |
| 2421 | views, synonyms, procedures, functions, packages, sequences, and types. As a |
| 2422 | result of this call, the describe handle is populated with the object-specific |
| 2423 | attributes which can be obtained through an OCIAttrGet() call. |
| 2424 | An OCIParamGet() on the describe handle returns a parameter descriptor for a |
| 2425 | specified position. Parameter positions begin with 1. Calling OCIAttrGet() on |
| 2426 | the parameter descriptor returns the specific attributes of a stored procedure |
| 2427 | or function parameter or a table column descriptor as the case may be. |
| 2428 | These subsequent calls do not need an extra round trip to the server because |
| 2429 | the entire schema object description cached on the client side by |
| 2430 | OCIDescribeAny(). Calling OCIAttrGet() on the describe handle can also return |
| 2431 | the total number of positions. |
| 2432 | See the section "Describing" on page 2-33 for more information about describe |
| 2433 | operations. |
| 2434 | Parameters |
| 2435 | TO BE UPDATED |
| 2436 | svchp (IN/OUT) - a service context handle. |
| 2437 | errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for |
| 2438 | diagnostic information in the event of an error. |
| 2439 | objptr (IN) - the name of the object (a null-terminated string) to be |
| 2440 | described. Only procedure or function names are valid when connected to an |
| 2441 | Oracle7 Server. |
| 2442 | objptr_len (IN) - the length of the string. Must be non-zero. |
| 2443 | objptr_typ (IN) - Must be OCI_OTYPE_NAME, OCI_OTYPE_REF, or OCI_OTYPE_PTR. |
| 2444 | info_level (IN) - reserved for future extensions. Pass OCI_DEFAULT. |
| 2445 | objtype (IN/OUT) - object type. |
| 2446 | dschp (IN/OUT) - a describe handle that is populated with describe |
| 2447 | information about the object after the call. |
| 2448 | Related Functions |
| 2449 | OCIAttrGet() |
| 2450 | |
| 2451 | |
| 2452 | |
| 2453 | OCIEnvCreate() |
| 2454 | Name |
| 2455 | OCI ENVironment CREATE |
| 2456 | Purpose |
| 2457 | This function creates and initializes an environment for the rest of |
| 2458 | the OCI functions to work under. This call is a replacement for both |
| 2459 | the OCIInitialize and OCIEnvInit calls. |
| 2460 | Syntax |
| 2461 | sword OCIEnvCreate ( OCIEnv **envhpp, |
| 2462 | ub4 mode, |
| 2463 | const void *ctxp, |
| 2464 | const void *(*malocfp) |
| 2465 | (void *ctxp, |
| 2466 | size_t size), |
| 2467 | const void *(*ralocfp) |
| 2468 | (void *ctxp, |
| 2469 | void *memptr, |
| 2470 | size_t newsize), |
| 2471 | const void (*mfreefp) |
| 2472 | ( void *ctxp, |
| 2473 | void *memptr)) |
| 2474 | size_t xtramemsz, |
| 2475 | void **usrmempp ); |
| 2476 | |
| 2477 | Comments |
| 2478 | This call creates an environment for all the OCI calls using the modes |
| 2479 | specified by the user. This call can be used instead of the two calls |
| 2480 | OCIInitialize and OCIEnvInit. This function returns an environment handle |
| 2481 | which is then used by the remaining OCI functions. There can be multiple |
| 2482 | environments in OCI each with its own environment modes. This function |
| 2483 | also performs any process level initialization if required by any mode. |
| 2484 | For example if the user wants to initialize an environment as OCI_THREADED, |
| 2485 | then all libraries that are used by OCI are also initialized in the |
| 2486 | threaded mode. |
| 2487 | |
| 2488 | This call should be invoked before anny other OCI call and should be used |
| 2489 | instead of the OCIInitialize and OCIEnvInit calls. This is the recommended |
| 2490 | call, although OCIInitialize and OCIEnvInit calls will still be supported |
| 2491 | for backward compatibility. |
| 2492 | |
| 2493 | envpp (OUT) - a pointer to a handle to the environment. |
| 2494 | mode (IN) - specifies initialization of the mode. The valid modes are: |
| 2495 | OCI_DEFAULT - default mode. |
| 2496 | OCI_THREADED - threaded environment. In this mode, internal data |
| 2497 | structures are protected from concurrent accesses by multiple threads. |
| 2498 | OCI_OBJECT - will use navigational object interface. |
| 2499 | ctxp (IN) - user defined context for the memory call back routines. |
| 2500 | malocfp (IN) - user-defined memory allocation function. If mode is |
| 2501 | OCI_THREADED, this memory allocation routine must be thread safe. |
| 2502 | ctxp - context pointer for the user-defined memory allocation function. |
| 2503 | size - size of memory to be allocated by the user-defined memory |
| 2504 | allocation function |
| 2505 | ralocfp (IN) - user-defined memory re-allocation function. If mode is |
| 2506 | OCI_THREADED, this memory allocation routine must be thread safe. |
| 2507 | ctxp - context pointer for the user-defined memory reallocation |
| 2508 | function. |
| 2509 | memp - pointer to memory block |
| 2510 | newsize - new size of memory to be allocated |
| 2511 | mfreefp (IN) - user-defined memory free function. If mode is |
| 2512 | OCI_THREADED, this memory free routine must be thread safe. |
| 2513 | ctxp - context pointer for the user-defined memory free function. |
| 2514 | memptr - pointer to memory to be freed |
| 2515 | xtramemsz (IN) - specifies the amount of user memory to be allocated. |
| 2516 | usrmempp (OUT) - returns a pointer to the user memory of size xtramemsz |
| 2517 | allocated by the call for the user. |
| 2518 | |
| 2519 | Example |
| 2520 | |
| 2521 | Related Functions |
| 2522 | OCIInitialize, OCIEnvInit |
| 2523 | |
| 2524 | OCIEnvNlsCreate() |
| 2525 | Name |
| 2526 | OCI ENVironment CREATE with NLS info |
| 2527 | Purpose |
| 2528 | This function does almost everything OCIEnvCreate does, plus enabling setting |
| 2529 | of charset and ncharset programmatically, except OCI_UTF16 mode. |
| 2530 | Syntax |
| 2531 | sword OCIEnvNlsCreate(OCIEnv **envhpp, |
| 2532 | ub4 mode, |
| 2533 | void *ctxp, |
| 2534 | void *(*malocfp) |
| 2535 | (void *ctxp, |
| 2536 | size_t size), |
| 2537 | void *(*ralocfp) |
| 2538 | (void *ctxp, |
| 2539 | void *memptr, |
| 2540 | size_t newsize), |
| 2541 | void (*mfreefp) |
| 2542 | (void *ctxp, |
| 2543 | void *memptr), |
| 2544 | size_t xtramemsz, |
| 2545 | void **usrmempp, |
| 2546 | ub2 charset, |
| 2547 | ub2 ncharset) |
| 2548 | Comments |
| 2549 | The charset and ncharset must be both zero or non-zero. |
| 2550 | The parameters have the same meaning as the ones in OCIEnvCreate(). |
| 2551 | When charset or ncharset is non-zero, the corresponding character set will |
| 2552 | be used to replace the ones specified in NLS_LANG or NLS_NCHAR. Moreover, |
| 2553 | OCI_UTF16ID is allowed to be set as charset and ncharset. |
| 2554 | On the other hand, OCI_UTF16 mode is deprecated with this function. |
| 2555 | Applications can achieve the same effects by setting |
| 2556 | both charset and ncharset as OCI_UTF16ID. |
| 2557 | |
| 2558 | |
| 2559 | OCIEnvInit() |
| 2560 | Name |
| 2561 | OCI INITialize environment |
| 2562 | Purpose |
| 2563 | This call initializes the OCI environment handle. |
| 2564 | Syntax |
| 2565 | sword OCIEnvInit ( OCIEnv **envp, |
| 2566 | ub4 mode, |
| 2567 | size_t xtramemsz, |
| 2568 | void **usrmempp ); |
| 2569 | Comments |
| 2570 | Initializes the OCI environment handle. No changes are done on an initialized |
| 2571 | handle. If OCI_ERROR or OCI_SUCCESS_WITH_INFO is returned, the |
| 2572 | environment handle can be used to obtain ORACLE specific errors and |
| 2573 | diagnostics. |
| 2574 | This call is processed locally, without a server round-trip. |
| 2575 | Parameters |
| 2576 | envpp (OUT) - a pointer to a handle to the environment. |
| 2577 | mode (IN) - specifies initialization of an environment mode. The only valid |
| 2578 | mode is OCI_DEFAULT for default mode |
| 2579 | xtramemsz (IN) - specifies the amount of user memory to be allocated. |
| 2580 | usrmempp (OUT) - returns a pointer to the user memory of size xtramemsz |
| 2581 | allocated by the call for the user. |
| 2582 | Example |
| 2583 | See the description of OCISessionBegin() on page 13-84 for an example showing |
| 2584 | the use of OCIEnvInit(). |
| 2585 | Related Functions |
| 2586 | |
| 2587 | |
| 2588 | |
| 2589 | |
| 2590 | OCIErrorGet() |
| 2591 | Name |
| 2592 | OCI Get Diagnostic Record |
| 2593 | Purpose |
| 2594 | Returns an error message in the buffer provided and an ORACLE error. |
| 2595 | Syntax |
| 2596 | sword OCIErrorGet ( void *hndlp, |
| 2597 | ub4 recordno, |
| 2598 | OraText *sqlstate, |
| 2599 | ub4 *errcodep, |
| 2600 | OraText *bufp, |
| 2601 | ub4 bufsiz, |
| 2602 | ub4 type ); |
| 2603 | Comments |
| 2604 | Returns an error message in the buffer provided and an ORACLE error. |
| 2605 | Currently does not support SQL state. This call can be called a multiple |
| 2606 | number of times if there are more than one diagnostic record for an error. |
| 2607 | The error handle is originally allocated with a call to OCIHandleAlloc(). |
| 2608 | Parameters |
| 2609 | hndlp (IN) - the error handle, in most cases, or the environment handle (for |
| 2610 | errors on OCIEnvInit(), OCIHandleAlloc()). |
| 2611 | recordno (IN) - indicates the status record from which the application seeks |
| 2612 | info. Starts from 1. |
| 2613 | sqlstate (OUT) - Not supported in Version 8.0. |
| 2614 | errcodep (OUT) - an ORACLE Error is returned. |
| 2615 | bufp (OUT) - the error message text is returned. |
| 2616 | bufsiz (IN) - the size of the buffer provide to get the error message. |
| 2617 | type (IN) - the type of the handle. |
| 2618 | Related Functions |
| 2619 | OCIHandleAlloc() |
| 2620 | |
| 2621 | OCIExtractInit |
| 2622 | Name |
| 2623 | OCI Extract Initialize |
| 2624 | Purpose |
| 2625 | This function initializes the parameter manager. |
| 2626 | Syntax |
| 2627 | sword OCIExtractInit(void *hndl, OCIError *err); |
| 2628 | Comments |
| 2629 | It must be called before calling any other parameter manager routine. The NLS |
| 2630 | information is stored inside the parameter manager context and used in |
| 2631 | subsequent calls to OCIExtract routines. |
| 2632 | Returns OCI_SUCCESS, OCI_INVALID_HANDLE, or OCI_ERROR |
| 2633 | Parameters |
| 2634 | hndl (IN/OUT) - The OCI environment or session handle. |
| 2635 | err (IN/OUT) - The OCI error handle. If there is an error, it is recorded in |
| 2636 | err and this function returns OCI_ERROR. Diagnostic information |
| 2637 | can be obtained by calling OCIErrorGet(). |
| 2638 | Related Functions |
| 2639 | OCIExtractTerm() |
| 2640 | |
| 2641 | OCIExtractTerm |
| 2642 | Name |
| 2643 | OCI Extract Terminate |
| 2644 | Purpose |
| 2645 | This function releases all dynamically allocated storage and may perform |
| 2646 | other internal bookkeeping functions. |
| 2647 | Syntax |
| 2648 | sword OCIExtractTerm(void *hndl, OCIError *err); |
| 2649 | Comments |
| 2650 | It must be called when the parameter manager is no longer being used. |
| 2651 | Returns OCI_SUCCESS, OCI_INVALID_HANDLE, or OCI_ERROR |
| 2652 | Parameters |
| 2653 | hndl (IN/OUT) - The OCI environment or session handle. |
| 2654 | err (IN/OUT) - The OCI error handle. If there is an error, it is recorded in |
| 2655 | err and this function returns OCI_ERROR. Diagnostic information |
| 2656 | can be obtained by calling OCIErrorGet(). |
| 2657 | Related Functions |
| 2658 | OCIExtractInit() |
| 2659 | |
| 2660 | OCIExtractReset |
| 2661 | Name |
| 2662 | OCI Extract Reset |
| 2663 | Purpose |
| 2664 | The memory currently used for parameter storage, key definition storage, and |
| 2665 | parameter value lists is freed and the structure is reinitialized. |
| 2666 | Syntax |
| 2667 | sword OCIExtractReset(void *hndl, OCIError *err); |
| 2668 | Comments |
| 2669 | Returns OCI_SUCCESS, OCI_INVALID_HANDLE, or OCI_ERROR |
| 2670 | Parameters |
| 2671 | hndl (IN/OUT) - The OCI environment or session handle. |
| 2672 | err (IN/OUT) - The OCI error handle. If there is an error, it is recorded in |
| 2673 | err and this function returns OCI_ERROR. Diagnostic information |
| 2674 | can be obtained by calling OCIErrorGet(). |
| 2675 | Related Functions |
| 2676 | |
| 2677 | OCIExtractSetNumKeys |
| 2678 | Name |
| 2679 | OCI Extract Set Number of Keys |
| 2680 | Purpose |
| 2681 | Informs the parameter manager of the number of keys that will be registered. |
| 2682 | Syntax |
| 2683 | sword OCIExtractSetNumKeys(void *hndl, OCIError *err, uword numkeys); |
| 2684 | Comments |
| 2685 | This routine must be called prior to the first call of OCIExtractSetKey(). |
| 2686 | Returns OCI_SUCCESS, OCI_INVALID_HANDLE, or OCI_ERROR |
| 2687 | Parameters |
| 2688 | hndl (IN/OUT) - The OCI environment or session handle. |
| 2689 | err (IN/OUT) - The OCI error handle. If there is an error, it is recorded in |
| 2690 | err and this function returns OCI_ERROR. Diagnostic information |
| 2691 | can be obtained by calling OCIErrorGet(). |
| 2692 | numkeys (IN) - The number of keys that will be registered with |
| 2693 | OCIExtractSetKey(). |
| 2694 | Related Functions |
| 2695 | OCIExtractSetKey() |
| 2696 | |
| 2697 | OCIExtractSetKey |
| 2698 | Name |
| 2699 | OCI Extract Set Key definition |
| 2700 | Purpose |
| 2701 | Registers information about a key with the parameter manager. |
| 2702 | Syntax |
| 2703 | sword OCIExtractSetKey(void *hndl, OCIError *err, const OraText *name, |
| 2704 | ub1 type, ub4 flag, const void *defval, |
| 2705 | const sb4 *intrange, const OraText *const *strlist); |
| 2706 | Comments |
| 2707 | This routine must be called after calling OCIExtractSetKey() and before |
| 2708 | calling OCIExtractFromFile() or OCIExtractFromStr(). |
| 2709 | Returns OCI_SUCCESS, OCI_INVALID_HANDLE, or OCI_ERROR |
| 2710 | Parameters |
| 2711 | hndl (IN/OUT) - The OCI environment or session handle. |
| 2712 | err (IN/OUT) - The OCI error handle. If there is an error, it is recorded in |
| 2713 | err and this function returns OCI_ERROR. Diagnostic information |
| 2714 | can be obtained by calling OCIErrorGet(). |
| 2715 | name (IN) - The name of the key. |
| 2716 | type (IN) - The type of the key (OCI_EXTRACT_TYPE_INTEGER, |
| 2717 | OCI_EXTRACT_TYPE_OCINUM, OCI_EXTRACT_TYPE_STRING, or |
| 2718 | OCI_EXTRACT_TYPE_BOOLEAN). |
| 2719 | flag (IN) - Set to OCI_EXTRACT_MULTIPLE if the key can take multiple values |
| 2720 | or 0 otherwise. |
| 2721 | defval (IN) - Set to the default value for the key. May be NULL if there is |
| 2722 | no default. A string default must be a (text*) type, an |
| 2723 | integer default must be an (sb4*) type, and a boolean default |
| 2724 | must be a (ub1*) type. |
| 2725 | intrange (IN) - Starting and ending values for the allowable range of integer |
| 2726 | values. May be NULL if the key is not an integer type or if |
| 2727 | all integer values are acceptable. |
| 2728 | strlist (IN) - List of all acceptable text strings for the key. May be NULL |
| 2729 | if the key is not a string type or if all text values are |
| 2730 | acceptable. |
| 2731 | Related Functions |
| 2732 | OCIExtractSetNumKeys() |
| 2733 | |
| 2734 | OCIExtractFromFile |
| 2735 | Name |
| 2736 | OCI Extract parameters From File |
| 2737 | Purpose |
| 2738 | The keys and their values in the given file are processed. |
| 2739 | Syntax |
| 2740 | sword OCIExtractFromFile(void *hndl, OCIError *err, ub4 flag, |
| 2741 | OraText *filename); |
| 2742 | Comments |
| 2743 | Returns OCI_SUCCESS, OCI_INVALID_HANDLE, or OCI_ERROR |
| 2744 | Parameters |
| 2745 | hndl (IN/OUT) - The OCI environment or session handle. |
| 2746 | err (IN/OUT) - The OCI error handle. If there is an error, it is recorded in |
| 2747 | err and this function returns OCI_ERROR. Diagnostic information |
| 2748 | can be obtained by calling OCIErrorGet(). |
| 2749 | flag (IN) - Zero or has one or more of the following bits set: |
| 2750 | OCI_EXTRACT_CASE_SENSITIVE, OCI_EXTRACT_UNIQUE_ABBREVS, or |
| 2751 | OCI_EXTRACT_APPEND_VALUES. |
| 2752 | filename (IN) - Null-terminated filename string. |
| 2753 | Related Functions |
| 2754 | |
| 2755 | OCIExtractFromStr |
| 2756 | Name |
| 2757 | OCI Extract parameters From String |
| 2758 | Purpose |
| 2759 | The keys and their values in the given string are processed. |
| 2760 | Syntax |
| 2761 | sword OCIExtractFromStr(void *hndl, OCIError *err, ub4 flag, OraText *input); |
| 2762 | Comments |
| 2763 | Returns OCI_SUCCESS, OCI_INVALID_HANDLE, or OCI_ERROR |
| 2764 | Parameters |
| 2765 | hndl (IN/OUT) - The OCI environment or session handle. |
| 2766 | err (IN/OUT) - The OCI error handle. If there is an error, it is recorded in |
| 2767 | err and this function returns OCI_ERROR. Diagnostic information |
| 2768 | can be obtained by calling OCIErrorGet(). |
| 2769 | flag (IN) - Zero or has one or more of the following bits set: |
| 2770 | OCI_EXTRACT_CASE_SENSITIVE, OCI_EXTRACT_UNIQUE_ABBREVS, or |
| 2771 | OCI_EXTRACT_APPEND_VALUES. |
| 2772 | input (IN) - Null-terminated input string. |
| 2773 | Related Functions |
| 2774 | |
| 2775 | OCIExtractToInt |
| 2776 | Name |
| 2777 | OCI Extract To Integer |
| 2778 | Purpose |
| 2779 | Gets the integer value for the specified key. |
| 2780 | Syntax |
| 2781 | sword OCIExtractToInt(void *hndl, OCIError *err, OraText *keyname, |
| 2782 | uword valno, sb4 *retval); |
| 2783 | Comments |
| 2784 | The valno'th value (starting with 0) is returned. |
| 2785 | Returns OCI_SUCCESS, OCI_INVALID_HANDLE, OCI_NO_DATA, or OCI_ERROR. |
| 2786 | OCI_NO_DATA means that there is no valno'th value for this key. |
| 2787 | Parameters |
| 2788 | hndl (IN) - The OCI environment or session handle. |
| 2789 | err (IN/OUT) - The OCI error handle. If there is an error, it is recorded in |
| 2790 | err and this function returns OCI_ERROR. Diagnostic information |
| 2791 | can be obtained by calling OCIErrorGet(). |
| 2792 | keyname (IN) - Key name. |
| 2793 | valno (IN) - Which value to get for this key. |
| 2794 | retval (OUT) - The actual integer value. |
| 2795 | Related Functions |
| 2796 | |
| 2797 | OCIExtractToBool |
| 2798 | Name |
| 2799 | OCI Extract To Boolean |
| 2800 | Purpose |
| 2801 | Gets the boolean value for the specified key. |
| 2802 | Syntax |
| 2803 | sword OCIExtractToBool(void *hndl, OCIError *err, OraText *keyname, |
| 2804 | uword valno, ub1 *retval); |
| 2805 | Comments |
| 2806 | The valno'th value (starting with 0) is returned. |
| 2807 | Returns OCI_SUCCESS, OCI_INVALID_HANDLE, OCI_NO_DATA, or OCI_ERROR. |
| 2808 | OCI_NO_DATA means that there is no valno'th value for this key. |
| 2809 | Parameters |
| 2810 | hndl (IN) - The OCI environment or session handle. |
| 2811 | err (IN/OUT) - The OCI error handle. If there is an error, it is recorded in |
| 2812 | err and this function returns OCI_ERROR. Diagnostic information |
| 2813 | can be obtained by calling OCIErrorGet(). |
| 2814 | keyname (IN) - Key name. |
| 2815 | valno (IN) - Which value to get for this key. |
| 2816 | retval (OUT) - The actual boolean value. |
| 2817 | Related Functions |
| 2818 | |
| 2819 | OCIExtractToStr |
| 2820 | Name |
| 2821 | OCI Extract To String |
| 2822 | Purpose |
| 2823 | Gets the string value for the specified key. |
| 2824 | Syntax |
| 2825 | sword OCIExtractToStr(void *hndl, OCIError *err, OraText *keyname, |
| 2826 | uword valno, OraText *retval, uword buflen); |
| 2827 | Comments |
| 2828 | The valno'th value (starting with 0) is returned. |
| 2829 | Returns OCI_SUCCESS, OCI_INVALID_HANDLE, OCI_NO_DATA, or OCI_ERROR. |
| 2830 | OCI_NO_DATA means that there is no valno'th value for this key. |
| 2831 | Parameters |
| 2832 | hndl (IN) - The OCI environment or session handle. |
| 2833 | err (IN/OUT) - The OCI error handle. If there is an error, it is recorded in |
| 2834 | err and this function returns OCI_ERROR. Diagnostic information |
| 2835 | can be obtained by calling OCIErrorGet(). |
| 2836 | keyname (IN) - Key name. |
| 2837 | valno (IN) - Which value to get for this key. |
| 2838 | retval (OUT) - The actual null-terminated string value. |
| 2839 | buflen (IN) - The length of the buffer for retval. |
| 2840 | Related Functions |
| 2841 | |
| 2842 | Note: The following OCIExtract functions are unavailable in this release |
| 2843 | |
| 2844 | OCIExtractToOCINum |
| 2845 | Name |
| 2846 | OCI Extract To OCI Number |
| 2847 | Purpose |
| 2848 | Gets the OCINumber value for the specified key. |
| 2849 | Syntax |
| 2850 | sword OCIExtractToOCINum(void *hndl, OCIError *err, OraText *keyname, |
| 2851 | uword valno, OCINumber *retval); |
| 2852 | Comments |
| 2853 | The valno'th value (starting with 0) is returned. |
| 2854 | Returns OCI_SUCCESS, OCI_INVALID_HANDLE, OCI_NO_DATA, or OCI_ERROR. |
| 2855 | OCI_NO_DATA means that there is no valno'th value for this key. |
| 2856 | Parameters |
| 2857 | hndl (IN) - The OCI environment or session handle. |
| 2858 | err (IN/OUT) - The OCI error handle. If there is an error, it is recorded in |
| 2859 | err and this function returns OCI_ERROR. Diagnostic information |
| 2860 | can be obtained by calling OCIErrorGet(). |
| 2861 | keyname (IN) - Key name. |
| 2862 | valno (IN) - Which value to get for this key. |
| 2863 | retval (OUT) - The actual OCINumber value. |
| 2864 | Related Functions |
| 2865 | |
| 2866 | OCIExtractToList |
| 2867 | Name |
| 2868 | OCI Extract To parameter List |
| 2869 | Purpose |
| 2870 | Generates a list of parameters from the parameter structures that are stored |
| 2871 | in memory. |
| 2872 | Syntax |
| 2873 | sword OCIExtractToList(void *hndl, OCIError *err, uword *numkeys); |
| 2874 | Comments |
| 2875 | Must be called before OCIExtractValues() is called. |
| 2876 | Returns OCI_SUCCESS, OCI_INVALID_HANDLE, or OCI_ERROR |
| 2877 | Parameters |
| 2878 | hndl (IN) - The OCI environment or session handle. |
| 2879 | err (IN/OUT) - The OCI error handle. If there is an error, it is recorded in |
| 2880 | err and this function returns OCI_ERROR. Diagnostic information |
| 2881 | can be obtained by calling OCIErrorGet(). |
| 2882 | numkeys (OUT) - Number of distinct keys stored in memory. |
| 2883 | Related Functions |
| 2884 | OCIExtractFromList() |
| 2885 | |
| 2886 | OCIExtractFromList |
| 2887 | Name |
| 2888 | OCI Extract From parameter List |
| 2889 | Purpose |
| 2890 | Generates a list of values for the a parameter in the parameter list. |
| 2891 | Syntax |
| 2892 | sword OCIExtractFromList(void *hndl, OCIError *err, uword index, |
| 2893 | OraText *name, ub1 *type, uword *numvals, |
| 2894 | void ***values); |
| 2895 | Comments |
| 2896 | Parameters are specified by an index. OCIExtractToList() must be called prior |
| 2897 | to calling this routine to generate the parameter list from the parameter |
| 2898 | structures that are stored in memory. |
| 2899 | Returns OCI_SUCCESS, OCI_INVALID_HANDLE, or OCI_ERROR |
| 2900 | Parameters |
| 2901 | hndl (IN) - The OCI environment or session handle. |
| 2902 | err (IN/OUT) - The OCI error handle. If there is an error, it is recorded in |
| 2903 | err and this function returns OCI_ERROR. Diagnostic information |
| 2904 | can be obtained by calling OCIErrorGet(). |
| 2905 | name (OUT) - Name of the key for the current parameter. |
| 2906 | type (OUT) - Type of the current parameter (OCI_EXTRACT_TYPE_STRING, |
| 2907 | OCI_EXTRACT_TYPE_INTEGER, OCI_EXTRACT_TYPE_OCINUM, or |
| 2908 | OCI_EXTRACT_TYPE_BOOLEAN) |
| 2909 | numvals (OUT) - Number of values for this parameter. |
| 2910 | values (OUT) - The values for this parameter. |
| 2911 | Related Functions |
| 2912 | OCIExtractToList() |
| 2913 | |
| 2914 | |
| 2915 | ************************ OCIFileClose() *********************************** |
| 2916 | |
| 2917 | Name |
| 2918 | OCIFileClose - Oracle Call Interface FILE i/o CLOSE |
| 2919 | |
| 2920 | Purpose |
| 2921 | Close a previously opened file. |
| 2922 | |
| 2923 | Syntax |
| 2924 | sword OCIFileClose ( void *hndl, |
| 2925 | OCIError *err, |
| 2926 | OCIFileObject *filep ) |
| 2927 | |
| 2928 | Comments |
| 2929 | This function will close a previously opened file. If the function succeeds |
| 2930 | then OCI_SUCCESS will be returned, else OCI_ERROR. |
| 2931 | |
| 2932 | Parameters |
| 2933 | hndl (IN) - the OCI environment or session handle. |
| 2934 | err (OUT) - the OCI error handle |
| 2935 | filep (IN) - the OCIFile file object |
| 2936 | |
| 2937 | Related Functions |
| 2938 | OCIFileOpen. |
| 2939 | |
| 2940 | |
| 2941 | |
| 2942 | ********************* OCIFileExists() ************************************** |
| 2943 | |
| 2944 | Name |
| 2945 | OCIFileExists - Oracle Call Interface FILE i/o EXIST |
| 2946 | |
| 2947 | Purpose |
| 2948 | Check to see if the file exists. |
| 2949 | |
| 2950 | Syntax |
| 2951 | sword OCIFileExists ( void *hndl, |
| 2952 | OCIError *err, |
| 2953 | OraText *filename, |
| 2954 | OraText *path, |
| 2955 | ub1 *flag ) |
| 2956 | |
| 2957 | Comments |
| 2958 | This function will set the flag to TRUE if the file exists else it will |
| 2959 | be set to FALSE. |
| 2960 | The function will return OCI_ERROR if any error is encountered, else |
| 2961 | it will return OCI_ERROR. |
| 2962 | |
| 2963 | Parameters |
| 2964 | hndl(IN) - OCI environment or session handle |
| 2965 | err(OUT) - OCI error handle |
| 2966 | filename(IN) - filename |
| 2967 | path(IN) - path of the file |
| 2968 | flag(OUT) - whether the file exists or not |
| 2969 | |
| 2970 | Related Functions. |
| 2971 | None. |
| 2972 | |
| 2973 | |
| 2974 | **************************** OCIFileFlush() ****************************** |
| 2975 | |
| 2976 | |
| 2977 | Name |
| 2978 | OCIFileFlush - Oracle Call Interface File i/o FLUSH |
| 2979 | |
| 2980 | Purpose |
| 2981 | Flush the buffers associated with the file to the disk. |
| 2982 | |
| 2983 | Syntax |
| 2984 | sword OCIFileFlush ( void *hndl, |
| 2985 | OCIError *err, |
| 2986 | OCIFileObject *filep ) |
| 2987 | |
| 2988 | Comments |
| 2989 | The function will return OCI_ERROR if any error is encountered, else |
| 2990 | it will return OCI_ERROR. |
| 2991 | |
| 2992 | Parameters |
| 2993 | hndl (IN) - the OCI environment or session handle. |
| 2994 | err (OUT) - the OCI error handle |
| 2995 | filep (IN) - the OCIFile file object |
| 2996 | |
| 2997 | Related Functions |
| 2998 | OCIFileOpen, OCIFileWrite |
| 2999 | |
| 3000 | |
| 3001 | |
| 3002 | *************************** OCIFileGetLength() **************************** |
| 3003 | |
| 3004 | Name |
| 3005 | OCIFileGetLength - Oracle Call Interface FILE i/o GET file LENGTH |
| 3006 | |
| 3007 | Purpose |
| 3008 | Get the length of a file. |
| 3009 | |
| 3010 | Syntax |
| 3011 | OCIFileGetLength(void *hndl, |
| 3012 | OCIError *err, |
| 3013 | OraText *filename, |
| 3014 | OraText *path, |
| 3015 | ubig_ora *lenp ) |
| 3016 | |
| 3017 | Comments |
| 3018 | The length of the file will be returned in lenp. |
| 3019 | The function will return OCI_ERROR if any error is encountered, else |
| 3020 | it will return OCI_ERROR. |
| 3021 | |
| 3022 | Parameters |
| 3023 | hndl (IN) - the OCI environment or session handle. |
| 3024 | err (OUT) - the OCI error handle. If there is an error, it is recorded |
| 3025 | in err and this function returns OCI_ERROR. Diagnostic information can be |
| 3026 | obtained by calling OCIErrorGet(). |
| 3027 | filename (IN) - file name. |
| 3028 | path (IN) - path of the file. |
| 3029 | lenp (OUT) - On output, it is the length of the file in bytes. |
| 3030 | is the number of bytes in the file. |
| 3031 | |
| 3032 | Related Functions |
| 3033 | None. |
| 3034 | |
| 3035 | |
| 3036 | |
| 3037 | ******************************** OCIFileInit() ***************************** |
| 3038 | |
| 3039 | Name |
| 3040 | OCIFileInit - Oracle Call Interface FILE i/o INITialize |
| 3041 | |
| 3042 | Purpose |
| 3043 | Initialize the OCI File I/O package and create the OCIFile context. |
| 3044 | |
| 3045 | Syntax |
| 3046 | sword OCIFileInit ( void *hndl, |
| 3047 | OCIError *err) |
| 3048 | |
| 3049 | Comments |
| 3050 | This function should be called before any of the OCIFile functions are |
| 3051 | used. |
| 3052 | The function will return OCI_ERROR if any error is encountered, else |
| 3053 | it will return OCI_ERROR. |
| 3054 | |
| 3055 | Parameters |
| 3056 | hndl(IN) - OCI environment or session handle. |
| 3057 | err(OUT) - OCI error structure. |
| 3058 | |
| 3059 | Related Functions |
| 3060 | OCIFileTerm |
| 3061 | |
| 3062 | |
| 3063 | |
| 3064 | ********************************* OCIFileOpen() ***************************** |
| 3065 | |
| 3066 | Name |
| 3067 | OCIFileOpen - Oracle Call Interface File i/o OPEN |
| 3068 | |
| 3069 | Purpose |
| 3070 | Open a file. |
| 3071 | |
| 3072 | Syntax |
| 3073 | sword OCIFileOpen ( void *hndl, |
| 3074 | OCIError *err, |
| 3075 | OCIFileObject **filep, |
| 3076 | OraText *filename, |
| 3077 | OraText *path, |
| 3078 | ub4 mode, |
| 3079 | ub4 create, |
| 3080 | ub4 type ) |
| 3081 | |
| 3082 | Comments |
| 3083 | OCIFileOpen returns a handle to the open file in filep if the file is |
| 3084 | successfully opened. |
| 3085 | If one wants to use the standard file objects (stdin, stdout & stderr) |
| 3086 | then OCIFileOpen whould be called with the type filed containing the |
| 3087 | appropriate type (see the parameter type). If any of the standard files |
| 3088 | are specified then filename, path, mode and create are ignored. |
| 3089 | The function will return OCI_ERROR if any error is encountered, else |
| 3090 | it will return OCI_ERROR. |
| 3091 | |
| 3092 | Parameters |
| 3093 | hndl (OUT) - the OCI environment or session handle. |
| 3094 | err (OUT) - the OCI error handle. If there is an error, it is recorded |
| 3095 | in err and this function returns OCI_ERROR. Diagnostic information can be |
| 3096 | obtained by calling OCIErrorGet(). |
| 3097 | filep (OUT) - the file object to be returned. |
| 3098 | filename (IN) - file name (NULL terminated string). |
| 3099 | path (IN) - path of the file (NULL terminated string). |
| 3100 | mode - mode in which to open the file (valid modes are OCI_FILE_READONLY, |
| 3101 | OCI_FILE_WRITEONLY, OCI_FILE_READ_WRITE). |
| 3102 | create - should the file be created if it does not exist. Valid values |
| 3103 | are: |
| 3104 | OCI_FILE_TRUNCATE - create a file regardless of whether or not it exists. |
| 3105 | If the file already exists overwrite it. |
| 3106 | OCI_FILE_EXIST - open it if it exists, else fail. |
| 3107 | OCI_FILE_EXCL - fail if the file exists, else create. |
| 3108 | OCI_FILE_CREATE - open the file if it exists, and create it if it doesn't. |
| 3109 | OCI_FILE_APPEND - set the file pointer to the end of the file prior to |
| 3110 | writing(this flag can be OR'ed with OCI_FILE_EXIST or |
| 3111 | OCI_FILE_CREATE). |
| 3112 | type - file type. Valid values are OCI_FILE_TEXT, OCI_FILE_BIN, |
| 3113 | OCI_FILE_STDIN, OCI_FILE_STDOUT and OCI_FILE_STDERR. |
| 3114 | If any of the standard files are specified then filename, path, mode |
| 3115 | and create are ignored. |
| 3116 | |
| 3117 | Related Functions. |
| 3118 | OCIFileClose |
| 3119 | |
| 3120 | |
| 3121 | |
| 3122 | ************************** OCIFileRead() ************************************ |
| 3123 | |
| 3124 | Name |
| 3125 | OCIFileRead - Oracle Call Interface FILE i/o READ |
| 3126 | |
| 3127 | Purpose |
| 3128 | Read from a file into a buffer. |
| 3129 | |
| 3130 | Syntax |
| 3131 | sword OCIFileRead ( void *hndl, |
| 3132 | OCIError *err, |
| 3133 | OCIFileObject *filep, |
| 3134 | void *bufp, |
| 3135 | ub4 bufl, |
| 3136 | ub4 *bytesread ) |
| 3137 | |
| 3138 | Comments |
| 3139 | Upto bufl bytes from the file will be read into bufp. The user should |
| 3140 | allocate memory for the buffer. |
| 3141 | The number of bytes read would be in bytesread. |
| 3142 | The function will return OCI_ERROR if any error is encountered, else |
| 3143 | it will return OCI_ERROR. |
| 3144 | |
| 3145 | Parameters |
| 3146 | hndl (IN) - the OCI environment or session handle. |
| 3147 | err (OUT) - the OCI error handle. If there is an error, it is recorded |
| 3148 | in err and this function returns OCI_ERROR. Diagnostic information can be |
| 3149 | obtained by calling OCIErrorGet(). |
| 3150 | filep (IN/OUT) - a File Object that uniquely references the file. |
| 3151 | bufp (IN) - the pointer to a buffer into which the data will be read. The |
| 3152 | length of the allocated memory is assumed to be bufl. |
| 3153 | bufl - the length of the buffer in bytes. |
| 3154 | bytesread (OUT) - the number of bytes read. |
| 3155 | |
| 3156 | Related Functions |
| 3157 | OCIFileOpen, OCIFileSeek, OCIFileWrite |
| 3158 | |
| 3159 | |
| 3160 | |
| 3161 | ****************************** OCIFileSeek() ****************************** |
| 3162 | |
| 3163 | Name |
| 3164 | OCIFileSeek - Oracle Call Interface FILE i/o SEEK |
| 3165 | |
| 3166 | Purpose |
| 3167 | Perfom a seek to a byte position. |
| 3168 | |
| 3169 | Syntax |
| 3170 | sword OCIFileSeek ( void *hndl, |
| 3171 | OCIError *err, |
| 3172 | OCIFileObject *filep, |
| 3173 | uword origin, |
| 3174 | ubig_ora offset, |
| 3175 | sb1 dir) |
| 3176 | |
| 3177 | Comments |
| 3178 | The function will return OCI_ERROR if any error is encountered, else |
| 3179 | it will return OCI_ERROR. |
| 3180 | |
| 3181 | Parameters |
| 3182 | hndl (IN) - the OCI environment or session handle. |
| 3183 | err (OUT) - the OCI error handle. If there is an error, it is recorded |
| 3184 | in err and this function returns OCI_ERROR. Diagnostic information can be |
| 3185 | obtained by calling OCIErrorGet(). |
| 3186 | filep (IN/OUT) - a file handle that uniquely references the file. |
| 3187 | origin - The starting point we want to seek from. NOTE: The starting |
| 3188 | point may be OCI_FILE_SEEK_BEGINNING (beginning), OCI_FILE_SEEK_CURRENT |
| 3189 | (current position), or OCI_FILE_SEEK_END (end of file). |
| 3190 | offset - The number of bytes from the origin we want to start reading from. |
| 3191 | dir - The direction we want to go from the origin. NOTE: The direction |
| 3192 | can be either OCI_FILE_FORWARD or OCI_FILE_BACKWARD. |
| 3193 | |
| 3194 | Related Function |
| 3195 | OCIFileOpen, OCIFileRead, OCIFileWrite |
| 3196 | |
| 3197 | |
| 3198 | |
| 3199 | *************************** OCIFileTerm() ********************************** |
| 3200 | |
| 3201 | Name |
| 3202 | OCIFileTerm - Oracle Call Interface FILE i/o TERMinate |
| 3203 | |
| 3204 | Purpose |
| 3205 | Terminate the OCI File I/O package and destroy the OCI File context. |
| 3206 | |
| 3207 | Syntax |
| 3208 | sword OCIFileTerm ( void *hndl, |
| 3209 | OCIError *err ) |
| 3210 | |
| 3211 | Comments |
| 3212 | After this function has been called no OCIFile function should be used. |
| 3213 | The function will return OCI_ERROR if any error is encountered, else |
| 3214 | it will return OCI_ERROR. |
| 3215 | |
| 3216 | Parameters |
| 3217 | hndl(IN) - OCI environment or session handle. |
| 3218 | err(OUT) - OCI error structure. |
| 3219 | |
| 3220 | Related Functions |
| 3221 | OCIFileInit |
| 3222 | |
| 3223 | |
| 3224 | ********************************* OCIFileWrite() **************************** |
| 3225 | |
| 3226 | Name |
| 3227 | OCIFileWrite - Oracle Call Interface FILE i/o WRITE |
| 3228 | |
| 3229 | Purpose |
| 3230 | Write data from buffer into a file. |
| 3231 | |
| 3232 | Syntax |
| 3233 | sword OCIFileWrite ( void *hndl, |
| 3234 | OCIError *err, |
| 3235 | OCIFileObject *filep, |
| 3236 | void *bufp, |
| 3237 | ub4 buflen |
| 3238 | ub4 *byteswritten ) |
| 3239 | |
| 3240 | Comments |
| 3241 | The number of bytes written will be in *byteswritten. |
| 3242 | The function will return OCI_ERROR if any error is encountered, else |
| 3243 | it will return OCI_ERROR. |
| 3244 | |
| 3245 | Parameters |
| 3246 | hndl (IN) - the OCI environment or session handle. |
| 3247 | err (OUT) - the OCI error handle. If there is an error, it is recorded |
| 3248 | in err and this function returns OCI_ERROR. Diagnostic information can be |
| 3249 | obtained by calling OCIErrorGet(). |
| 3250 | filep (IN/OUT) - a file handle that uniquely references the file. |
| 3251 | bufp (IN) - the pointer to a buffer from which the data will be written. |
| 3252 | The length of the allocated memory is assumed to be the value passed |
| 3253 | in bufl. |
| 3254 | bufl - the length of the buffer in bytes. |
| 3255 | byteswritten (OUT) - the number of bytes written. |
| 3256 | |
| 3257 | Related Functions |
| 3258 | OCIFileOpen, OCIFileSeek, OCIFileRead |
| 3259 | |
| 3260 | |
| 3261 | |
| 3262 | |
| 3263 | |
| 3264 | OCIHandleAlloc() |
| 3265 | Name |
| 3266 | OCI Get HaNDLe |
| 3267 | Purpose |
| 3268 | This call returns a pointer to an allocated and initialized handle. |
| 3269 | Syntax |
| 3270 | sword OCIHandleAlloc ( const void *parenth, |
| 3271 | void **hndlpp, |
| 3272 | ub4 type, |
| 3273 | size_t xtramem_sz, |
| 3274 | void **usrmempp); |
| 3275 | Comments |
| 3276 | Returns a pointer to an allocated and initialized structure, corresponding to |
| 3277 | the type specified in type. A non-NULL handle is returned on success. Bind |
| 3278 | handle and define handles are allocated with respect to a statement handle. All |
| 3279 | other handles are allocated with respect to an environment handle which is |
| 3280 | passed in as a parent handle. |
| 3281 | No diagnostics are available on error. This call returns OCI_SUCCESS if |
| 3282 | successful, or OCI_INVALID_HANDLE if an out-of-memory error occurs. |
| 3283 | Handles must be allocated using OCIHandleAlloc() before they can be passed |
| 3284 | into an OCI call. |
| 3285 | Parameters |
| 3286 | parenth (IN) - an environment or a statement handle. |
| 3287 | hndlpp (OUT) - returns a handle to a handle type. |
| 3288 | type (IN) - specifies the type of handle to be allocated. The specific types |
| 3289 | are: |
| 3290 | OCI_HTYPE_ERROR - specifies generation of an error report handle of |
| 3291 | C type OCIError |
| 3292 | OCI_HTYPE_SVCCTX - specifies generation of a service context handle |
| 3293 | of C type OCISvcCtx |
| 3294 | OCI_HTYPE_STMT - specifies generation of a statement (application |
| 3295 | request) handle of C type OCIStmt |
| 3296 | OCI_HTYPE_BIND - specifies generation of a bind information handle |
| 3297 | of C type OCIBind |
| 3298 | OCI_HTYPE_DEFINE - specifies generation of a column definition |
| 3299 | handle of C type OCIDefine |
| 3300 | OCI_HTYPE_DESCRIBE - specifies generation of a select list |
| 3301 | description handle of C type OCIDesc |
| 3302 | OCI_HTYPE_SERVER - specifies generation of a server context handle |
| 3303 | of C type OCIServer |
| 3304 | OCI_HTYPE_SESSION - specifies generation of an authentication |
| 3305 | context handle of C type OCISession |
| 3306 | OCI_HTYPE_TRANS - specifies generation of a transaction context |
| 3307 | handle of C type OCITrans |
| 3308 | OCI_HTYPE_COMPLEXOBJECT - specifies generation of a complex |
| 3309 | object retrieval handle of C type OCIComplexObject |
| 3310 | OCI_HTYPE_SECURITY - specifies generation of a security handle of C |
| 3311 | type OCISecurity |
| 3312 | xtramem_sz (IN) - specifies an amount of user memory to be allocated. |
| 3313 | usrmempp (OUT) - returns a pointer to the user memory of size xtramemsz |
| 3314 | allocated by the call for the user. |
| 3315 | Related Functions |
| 3316 | OCIHandleFree() |
| 3317 | |
| 3318 | |
| 3319 | |
| 3320 | OCIHandleFree() |
| 3321 | Name |
| 3322 | OCI Free HaNDLe |
| 3323 | Purpose |
| 3324 | This call explicitly deallocates a handle. |
| 3325 | Syntax |
| 3326 | sword OCIHandleFree ( void *hndlp, |
| 3327 | ub4 type); |
| 3328 | Comments |
| 3329 | This call frees up storage associated with a handle, corresponding to the type |
| 3330 | specified in the type parameter. |
| 3331 | This call returns either OCI_SUCCESS or OCI_INVALID_HANDLE. |
| 3332 | All handles must be explicitly deallocated. OCI will not deallocate a child |
| 3333 | handle if the parent is deallocated. |
| 3334 | Parameters |
| 3335 | hndlp (IN) - an opaque pointer to some storage. |
| 3336 | type (IN) - specifies the type of storage to be allocated. The specific types |
| 3337 | are: |
| 3338 | OCI_HTYPE_ENV - an environment handle |
| 3339 | OCI_HTYPE_ERROR - an error report handle |
| 3340 | OCI_HTYPE_SVCCTX - a service context handle |
| 3341 | OCI_HTYPE_STMT - a statement (application request) handle |
| 3342 | OCI_HTYPE_BIND - a bind information handle |
| 3343 | OCI_HTYPE_DEFINE - a column definition handle |
| 3344 | OCI_HTYPE_DESCRIBE - a select list description handle |
| 3345 | OCI_HTYPE_SERVER - a server handle |
| 3346 | OCI_HTYPE_SESSION - a user authentication handle |
| 3347 | OCI_HTYPE_TRANS - a transaction handle |
| 3348 | OCI_HTYPE_COMPLEXOBJECT - a complex object retrieval handle |
| 3349 | OCI_HTYPE_SECURITY - a security handle |
| 3350 | Related Functions |
| 3351 | OCIHandleAlloc() |
| 3352 | |
| 3353 | |
| 3354 | |
| 3355 | |
| 3356 | OCIInitialize() |
| 3357 | Name |
| 3358 | OCI Process Initialize |
| 3359 | Purpose |
| 3360 | Initializes the OCI process environment. |
| 3361 | Syntax |
| 3362 | sword OCIInitialize ( ub4 mode, |
| 3363 | const void *ctxp, |
| 3364 | const void *(*malocfp) |
| 3365 | ( void *ctxp, |
| 3366 | size_t size ), |
| 3367 | const void *(*ralocfp) |
| 3368 | ( void *ctxp, |
| 3369 | void *memp, |
| 3370 | size_t newsize ), |
| 3371 | const void (*mfreefp) |
| 3372 | ( void *ctxp, |
| 3373 | void *memptr )); |
| 3374 | Comments |
| 3375 | This call initializes the OCI process environment. |
| 3376 | OCIInitialize() must be invoked before any other OCI call. |
| 3377 | Parameters |
| 3378 | mode (IN) - specifies initialization of the mode. The valid modes are: |
| 3379 | OCI_DEFAULT - default mode. |
| 3380 | OCI_THREADED - threaded environment. In this mode, internal data |
| 3381 | structures are protected from concurrent accesses by multiple threads. |
| 3382 | OCI_OBJECT - will use navigational object interface. |
| 3383 | ctxp (IN) - user defined context for the memory call back routines. |
| 3384 | malocfp (IN) - user-defined memory allocation function. If mode is |
| 3385 | OCI_THREADED, this memory allocation routine must be thread safe. |
| 3386 | ctxp - context pointer for the user-defined memory allocation function. |
| 3387 | size - size of memory to be allocated by the user-defined memory |
| 3388 | allocation function |
| 3389 | ralocfp (IN) - user-defined memory re-allocation function. If mode is |
| 3390 | OCI_THREADED, this memory allocation routine must be thread safe. |
| 3391 | ctxp - context pointer for the user-defined memory reallocation |
| 3392 | function. |
| 3393 | memp - pointer to memory block |
| 3394 | newsize - new size of memory to be allocated |
| 3395 | mfreefp (IN) - user-defined memory free function. If mode is |
| 3396 | OCI_THREADED, this memory free routine must be thread safe. |
| 3397 | ctxp - context pointer for the user-defined memory free function. |
| 3398 | memptr - pointer to memory to be freed |
| 3399 | Example |
| 3400 | See the description of OCIStmtPrepare() on page 13-96 for an example showing |
| 3401 | the use of OCIInitialize(). |
| 3402 | Related Functions |
| 3403 | |
| 3404 | -------------------------------OCITerminate------------------------------------ |
| 3405 | |
| 3406 | OCITerminate() |
| 3407 | Name |
| 3408 | OCI process Terminate |
| 3409 | Purpose |
| 3410 | Do cleanup before process termination |
| 3411 | Syntax |
| 3412 | sword OCITerminate (ub4 mode); |
| 3413 | |
| 3414 | Comments |
| 3415 | This call performs OCI related clean up before the OCI process terminates. |
| 3416 | If the process is running in shared mode then the OCI process is disconnected |
| 3417 | from the shared memory subsystem. |
| 3418 | |
| 3419 | OCITerminate() should be the last OCI call in any process. |
| 3420 | |
| 3421 | Parameters |
| 3422 | mode (IN) - specifies different termination modes. |
| 3423 | |
| 3424 | OCI_DEFAULT - default mode. |
| 3425 | |
| 3426 | Example |
| 3427 | |
| 3428 | Related Functions |
| 3429 | OCIInitialize() |
| 3430 | |
| 3431 | ------------------------ OCIAppCtxSet-------------------------------------- |
| 3432 | Name |
| 3433 | OCI Application context Set |
| 3434 | Purpose |
| 3435 | Set an attribute and its value for a particular application context |
| 3436 | namespace |
| 3437 | Syntax |
| 3438 | (sword) OCIAppCtxSet((void *) sesshndl, (void *)nsptr,(ub4) nsptrlen, |
| 3439 | (void *)attrptr, (ub4) attrptrlen, (void *)valueptr, |
| 3440 | (ub4) valueptrlen, errhp, (ub4)mode); |
| 3441 | |
| 3442 | Comments |
| 3443 | Please note that the information set on the session handle is sent to the |
| 3444 | server during the next OCIStatementExecute or OCISessionBegin. |
| 3445 | |
| 3446 | This information is cleared from the session handle, once the information |
| 3447 | has been sent over to the server,and should be setup again if needed. |
| 3448 | |
| 3449 | Parameters |
| 3450 | sesshndl (IN/OUT) - Pointer to a session handle |
| 3451 | nsptr (IN) - Pointer to namespace string |
| 3452 | nsptrlen (IN) - length of the nsptr |
| 3453 | attrptr (IN) - Pointer to attribute string |
| 3454 | attrptrlen (IN) - length of the attrptr |
| 3455 | valueptr (IN) - Pointer to value string |
| 3456 | valueptrlen(IN) - length of the valueptr |
| 3457 | errhp (OUT) - Error from the API |
| 3458 | mode (IN) - mode of operation (OCI_DEFAULT) |
| 3459 | |
| 3460 | Returns |
| 3461 | error if any |
| 3462 | Example |
| 3463 | |
| 3464 | Related Functions |
| 3465 | OCIAppCtxClearAll |
| 3466 | |
| 3467 | |
| 3468 | ------------------------ OCIAppCtxClearAll--------------------------------- |
| 3469 | Name |
| 3470 | OCI Application Context Clear all attributes in a namespace |
| 3471 | Purpose |
| 3472 | To clear the values all attributes in a namespace |
| 3473 | Syntax |
| 3474 | (sword) OCIAppCtxClearAll((void *) sesshndl, (void *)nsptr, (ub4) nsptrlen, |
| 3475 | (OCIError *)errhp, (ub4)mode); |
| 3476 | |
| 3477 | Comments |
| 3478 | This will clean up the context information on the server side during the |
| 3479 | next piggy-back to the server. |
| 3480 | |
| 3481 | Parameters |
| 3482 | sesshndl (IN/OUT) - Pointer to a session handle |
| 3483 | nsptr (IN) - Pointer to namespace string where the values of all |
| 3484 | attributes are cleared |
| 3485 | nsptrlen (IN) - length of the nsptr |
| 3486 | errhp (OUT) - Error from the API |
| 3487 | mode (IN) - mode of operation (OCI_DEFAULT) |
| 3488 | Example |
| 3489 | |
| 3490 | Returns |
| 3491 | error if any |
| 3492 | |
| 3493 | Related Functions |
| 3494 | OCIAppCtxSet |
| 3495 | ---------------------- OCIIntervalAssign --------------------------------- |
| 3496 | sword OCIIntervalAssign(void *hndl, OCIError *err, |
| 3497 | const OCIInterval *inpinter, OCIInterval *outinter ); |
| 3498 | |
| 3499 | DESCRIPTION |
| 3500 | Copies one interval to another to create a replica |
| 3501 | PARAMETERS |
| 3502 | hndl (IN) - Session/Env handle. |
| 3503 | err (IN/OUT) - error handle. If there is an error, it is |
| 3504 | recorded in 'err' and this function returns OCI_ERROR. |
| 3505 | The error recorded in 'err' can be retrieved by calling |
| 3506 | OCIErrorGet(). |
| 3507 | (IN) inpinter - Input Interval |
| 3508 | (OUT) outinter - Output Interval |
| 3509 | RETURNS |
| 3510 | OCI_INVALID_HANDLE if 'err' is NULL. |
| 3511 | OCI_SUCCESS otherwise |
| 3512 | |
| 3513 | ---------------------- OCIIntervalCheck ------------------------------------ |
| 3514 | sword OCIIntervalCheck(void *hndl, OCIError *err, const OCIInterval *interval, |
| 3515 | ub4 *valid ); |
| 3516 | |
| 3517 | DESCRIPTION |
| 3518 | Checks the validity of an interval |
| 3519 | PARAMETERS |
| 3520 | hndl (IN) - Session/Env handle. |
| 3521 | err (IN/OUT) - error handle. If there is an error, it is |
| 3522 | recorded in 'err' and this function returns OCI_ERROR. |
| 3523 | The error recorded in 'err' can be retrieved by calling |
| 3524 | OCIErrorGet(). |
| 3525 | (IN) interval - Interval to be checked |
| 3526 | (OUT) valid - Zero if the interval is valid, else returns an Ored |
| 3527 | combination of the following codes. |
| 3528 | |
| 3529 | Macro name Bit number Error |
| 3530 | ---------- ---------- ----- |
| 3531 | OCI_INTER_INVALID_DAY 0x1 Bad day |
| 3532 | OCI_INTER_DAY_BELOW_VALID 0x2 Bad DAy Low/high bit (1=low) |
| 3533 | OCI_INTER_INVALID_MONTH 0x4 Bad MOnth |
| 3534 | OCI_INTER_MONTH_BELOW_VALID 0x8 Bad MOnth Low/high bit (1=low) |
| 3535 | OCI_INTER_INVALID_YEAR 0x10 Bad YeaR |
| 3536 | OCI_INTER_YEAR_BELOW_VALID 0x20 Bad YeaR Low/high bit (1=low) |
| 3537 | OCI_INTER_INVALID_HOUR 0x40 Bad HouR |
| 3538 | OCI_INTER_HOUR_BELOW_VALID 0x80 Bad HouR Low/high bit (1=low) |
| 3539 | OCI_INTER_INVALID_MINUTE 0x100 Bad MiNute |
| 3540 | OCI_INTER_MINUTE_BELOW_VALID 0x200 Bad MiNute Low/high bit(1=low) |
| 3541 | OCI_INTER_INVALID_SECOND 0x400 Bad SeCond |
| 3542 | OCI_INTER_SECOND_BELOW_VALID 0x800 bad second Low/high bit(1=low) |
| 3543 | OCI_INTER_INVALID_FRACSEC 0x1000 Bad Fractional second |
| 3544 | OCI_INTER_FRACSEC_BELOW_VALID 0x2000 Bad fractional second Low/High |
| 3545 | |
| 3546 | |
| 3547 | RETURNS |
| 3548 | OCI_SUCCESS if interval is okay |
| 3549 | OCI_INVALID_HANDLE if 'err' is NULL. |
| 3550 | |
| 3551 | ---------------------- OCIIntervalCompare ----------------------------------- |
| 3552 | sword OCIIntervalCompare(void *hndl, OCIError *err, OCIInterval *inter1, |
| 3553 | OCIInterval *inter2, sword *result ); |
| 3554 | |
| 3555 | DESCRIPTION |
| 3556 | Compares two intervals, returns 0 if equal, -1 if inter1 < inter2, |
| 3557 | 1 if inter1 > inter2 |
| 3558 | PARAMETERS |
| 3559 | hndl (IN) - Session/Env handle. |
| 3560 | err (IN/OUT) - error handle. If there is an error, it is |
| 3561 | recorded in 'err' and this function returns OCI_ERROR. |
| 3562 | The error recorded in 'err' can be retrieved by calling |
| 3563 | OCIErrorGet(). |
| 3564 | inter1 (IN) - Interval to be compared |
| 3565 | inter2 (IN) - Interval to be compared |
| 3566 | result (OUT) - comparison result, 0 if equal, -1 if inter1 < inter2, |
| 3567 | 1 if inter1 > inter2 |
| 3568 | |
| 3569 | RETURNS |
| 3570 | OCI_SUCCESS on success |
| 3571 | OCI_INVALID_HANDLE if 'err' is NULL. |
| 3572 | OCI_ERROR if |
| 3573 | the two input datetimes are not mutually comparable. |
| 3574 | |
| 3575 | ---------------------- OCIIntervalDivide ------------------------------------ |
| 3576 | sword OCIIntervalDivide(void *hndl, OCIError *err, OCIInterval *dividend, |
| 3577 | OCINumber *divisor, OCIInterval *result ); |
| 3578 | |
| 3579 | DESCRIPTION |
| 3580 | Divides an interval by an Oracle Number to produce an interval |
| 3581 | PARAMETERS |
| 3582 | hndl (IN) - Session/Env handle. |
| 3583 | err (IN/OUT) - error handle. If there is an error, it is |
| 3584 | recorded in 'err' and this function returns OCI_ERROR. |
| 3585 | The error recorded in 'err' can be retrieved by calling |
| 3586 | OCIErrorGet(). |
| 3587 | dividend (IN) - Interval to be divided |
| 3588 | divisor (IN) - Oracle Number dividing `dividend' |
| 3589 | result (OUT) - resulting interval (dividend / divisor) |
| 3590 | RETURNS |
| 3591 | OCI_SUCCESS on success |
| 3592 | OCI_INVALID_HANDLE if 'err' is NULL. |
| 3593 | |
| 3594 | ---------------------- OCIIntervalFromNumber -------------------- |
| 3595 | sword OCIIntervalFromNumber(void *hndl, OCIError *err, |
| 3596 | OCIInterval *inter, OCINumber *number); |
| 3597 | DESCRIPTION |
| 3598 | Converts an interval to an Oracle Number |
| 3599 | PARAMETERS |
| 3600 | hndl (IN) - Session/Env handle. |
| 3601 | err (IN/OUT) - error handle. If there is an error, it is |
| 3602 | recorded in 'err' and this function returns OCI_ERROR. |
| 3603 | The error recorded in 'err' can be retrieved by calling |
| 3604 | OCIErrorGet(). |
| 3605 | (OUT) interval - Interval to be converted |
| 3606 | (IN) number - Oracle number result (in years for YEARMONTH interval |
| 3607 | and in days for DAYSECOND) |
| 3608 | RETURNS |
| 3609 | OCI_SUCCESS on success |
| 3610 | OCI_INVALID_HANDLE if 'err' is NULL. |
| 3611 | OCI_ERROR on error. |
| 3612 | NOTES |
| 3613 | Fractional portions of the date (for instance, minutes and seconds if |
| 3614 | the unit chosen is hours) will be included in the Oracle number produced. |
| 3615 | Excess precision will be truncated. |
| 3616 | |
| 3617 | ---------------------- OCIIntervalFromText --------------------------------- |
| 3618 | sword OCIIntervalFromText( void *hndl, OCIError *err, const OraText *inpstr, |
| 3619 | size_t str_len, OCIInterval *result ); |
| 3620 | |
| 3621 | DESCRIPTION |
| 3622 | Given an interval string produce the interval represented by the string. |
| 3623 | The type of the interval is the type of the 'result' descriptor. |
| 3624 | PARAMETERS |
| 3625 | |
| 3626 | hndl (IN) - Session/Env handle. |
| 3627 | err (IN/OUT) - error handle. If there is an error, it is |
| 3628 | recorded in 'err' and this function returns OCI_ERROR. |
| 3629 | The error recorded in 'err' can be retrieved by calling |
| 3630 | OCIErrorGet(). |
| 3631 | (IN) inpstr - Input string |
| 3632 | (IN) str_len - Length of input string |
| 3633 | (OUT) result - Resultant interval |
| 3634 | RETURNS |
| 3635 | OCI_SUCCESS on success |
| 3636 | OCI_INVALID_HANDLE if 'err' is NULL. |
| 3637 | OCI_ERROR if |
| 3638 | there are too many fields in the literal string |
| 3639 | the year is out of range (-4713 to 9999) |
| 3640 | if the month is out of range (1 to 12) |
| 3641 | if the day of month is out of range (1 to 28...31) |
| 3642 | if hour is not in range (0 to 23) |
| 3643 | if hour is not in range (0 to 11) |
| 3644 | if minute is not in range (0 to 59) |
| 3645 | if seconds in minute not in range (0 to 59) |
| 3646 | if seconds in day not in range (0 to 86399) |
| 3647 | if the interval is invalid |
| 3648 | |
| 3649 | |
| 3650 | ---------------------- OCIIntervalGetDaySecond -------------------- |
| 3651 | |
| 3652 | DESCRIPTION |
| 3653 | Gets values of day second interval |
| 3654 | PARAMETERS |
| 3655 | hndl (IN) - Session/Env handle. |
| 3656 | err (IN/OUT) - error handle. If there is an error, it is |
| 3657 | recorded in 'err' and this function returns OCI_ERROR. |
| 3658 | The error recorded in 'err' can be retrieved by calling |
| 3659 | OCIErrorGet(). |
| 3660 | day (OUT) - number of days |
| 3661 | hour (OUT) - number of hours |
| 3662 | min (OUT) - number of mins |
| 3663 | sec (OUT) - number of secs |
| 3664 | fsec (OUT) - number of fractional seconds |
| 3665 | result (IN) - resulting interval |
| 3666 | RETURNS |
| 3667 | OCI_SUCCESS on success |
| 3668 | OCI_INVALID_HANDLE if 'err' is NULL. |
| 3669 | |
| 3670 | |
| 3671 | ---------------------- OCIIntervalGetYearMonth -------------------- |
| 3672 | |
| 3673 | DESCRIPTION |
| 3674 | Gets year month from an interval |
| 3675 | PARAMETERS |
| 3676 | hndl (IN) - Session/Env handle. |
| 3677 | err (IN/OUT) - error handle. If there is an error, it is |
| 3678 | recorded in 'err' and this function returns OCI_ERROR. |
| 3679 | The error recorded in 'err' can be retrieved by calling |
| 3680 | OCIErrorGet(). |
| 3681 | year (OUT) - year value |
| 3682 | month (OUT) - month value |
| 3683 | result (IN) - resulting interval |
| 3684 | RETURNS |
| 3685 | OCI_SUCCESS on success |
| 3686 | OCI_INVALID_HANDLE if 'err' is NULL. |
| 3687 | |
| 3688 | |
| 3689 | |
| 3690 | -------------------------- OCIIntervalAdd ------------------------------ |
| 3691 | sword OCIIntervalAdd(void *hndl, OCIError *err, OCIInterval *addend1, |
| 3692 | OCIInterval *addend2, OCIInterval *result ); |
| 3693 | NAME OCIIntervalAdd - Adds two intervals |
| 3694 | PARAMETERS |
| 3695 | hndl (IN) - Session/Env handle. |
| 3696 | err (IN/OUT) - error handle. If there is an error, it is |
| 3697 | recorded in 'err' and this function returns OCI_ERROR. |
| 3698 | The error recorded in 'err' can be retrieved by calling |
| 3699 | OCIErrorGet(). |
| 3700 | addend1 (IN) - Interval to be added |
| 3701 | addend2 (IN) - Interval to be added |
| 3702 | result (OUT) - resulting interval (addend1 + addend2) |
| 3703 | DESCRIPTION |
| 3704 | Adds two intervals to produce a resulting interval |
| 3705 | RETURNS |
| 3706 | OCI_SUCCESS on success |
| 3707 | OCI_ERROR if: |
| 3708 | the two input intervals are not mutually comparable. |
| 3709 | the resulting year would go above SB4MAXVAL |
| 3710 | the resulting year would go below SB4MINVAL |
| 3711 | OCI_INVALID_HANDLE if 'err' is NULL. |
| 3712 | NOTES |
| 3713 | The two input intervals must be mutually comparable |
| 3714 | |
| 3715 | ---------------------- OCIIntervalSubtract ------------------------------- |
| 3716 | sword OCIIntervalSubtract(void *hndl, OCIError *err, OCIInterval *minuend, |
| 3717 | OCIInterval *subtrahend, OCIInterval *result ); |
| 3718 | NAME - OCIIntervalSubtract - subtracts two intervals |
| 3719 | PARAMETERS |
| 3720 | hndl (IN) - Session/Env handle. |
| 3721 | err (IN/OUT) - error handle. If there is an error, it is |
| 3722 | recorded in 'err' and this function returns OCI_ERROR. |
| 3723 | The error recorded in 'err' can be retrieved by calling |
| 3724 | OCIErrorGet(). |
| 3725 | minuend (IN) - interval to be subtracted from |
| 3726 | subtrahend (IN) - interval subtracted from minuend |
| 3727 | result (OUT) - resulting interval (minuend - subtrahend) |
| 3728 | DESCRIPTION |
| 3729 | Subtracts two intervals and stores the result in an interval |
| 3730 | RETURNS |
| 3731 | OCI_SUCCESS on success |
| 3732 | OCI_INVALID_HANDLE if 'err' is NULL. |
| 3733 | OCI_ERROR if: |
| 3734 | the two input intervals are not mutually comparable. |
| 3735 | the resulting leading field would go below SB4MINVAL |
| 3736 | the resulting leading field would go above SB4MAXVAL |
| 3737 | |
| 3738 | ---------------------- OCIIntervalMultiply --------------------------------- |
| 3739 | sword OCIIntervalMultiply(void *hndl, OCIError *err, const OCIInterval *inter, |
| 3740 | OCINumber *nfactor, OCIInterval *result ); |
| 3741 | |
| 3742 | DESCRIPTION |
| 3743 | Multiplies an interval by an Oracle Number to produce an interval |
| 3744 | PARAMETERS |
| 3745 | hndl (IN) - Session/Env handle. |
| 3746 | err (IN/OUT) - error handle. If there is an error, it is |
| 3747 | recorded in 'err' and this function returns OCI_ERROR. |
| 3748 | The error recorded in 'err' can be retrieved by calling |
| 3749 | OCIErrorGet(). |
| 3750 | inter (IN) - Interval to be multiplied |
| 3751 | nfactor (IN) - Oracle Number to be multiplied |
| 3752 | result (OUT) - resulting interval (ifactor * nfactor) |
| 3753 | RETURNS |
| 3754 | OCI_SUCCESS on success |
| 3755 | OCI_INVALID_HANDLE if 'err' is NULL. |
| 3756 | OCI_ERROR if: |
| 3757 | the resulting year would go above SB4MAXVAL |
| 3758 | the resulting year would go below SB4MINVAL |
| 3759 | |
| 3760 | |
| 3761 | ---------------------- OCIIntervalSetDaySecond -------------------- |
| 3762 | |
| 3763 | DESCRIPTION |
| 3764 | Sets day second interval |
| 3765 | PARAMETERS |
| 3766 | hndl (IN) - Session/Env handle. |
| 3767 | err (IN/OUT) - error handle. If there is an error, it is |
| 3768 | recorded in 'err' and this function returns OCI_ERROR. |
| 3769 | The error recorded in 'err' can be retrieved by calling |
| 3770 | OCIErrorGet(). |
| 3771 | day (IN) - number of days |
| 3772 | hour (IN) - number of hours |
| 3773 | min (IN) - number of mins |
| 3774 | sec (IN) - number of secs |
| 3775 | fsec (IN) - number of fractional seconds |
| 3776 | result (OUT) - resulting interval |
| 3777 | RETURNS |
| 3778 | OCI_SUCCESS on success |
| 3779 | OCI_INVALID_HANDLE if 'err' is NULL. |
| 3780 | |
| 3781 | |
| 3782 | ---------------------- OCIIntervalSetYearMonth -------------------- |
| 3783 | |
| 3784 | DESCRIPTION |
| 3785 | Sets year month interval |
| 3786 | PARAMETERS |
| 3787 | hndl (IN) - Session/Env handle. |
| 3788 | err (IN/OUT) - error handle. If there is an error, it is |
| 3789 | recorded in 'err' and this function returns OCI_ERROR. |
| 3790 | The error recorded in 'err' can be retrieved by calling |
| 3791 | OCIErrorGet(). |
| 3792 | year (IN) - year value |
| 3793 | month (IN) - month value |
| 3794 | result (OUT) - resulting interval |
| 3795 | RETURNS |
| 3796 | OCI_SUCCESS on success |
| 3797 | OCI_INVALID_HANDLE if 'err' is NULL. |
| 3798 | |
| 3799 | |
| 3800 | ----------------------- OCIIntervalToNumber --------------------------------- |
| 3801 | sword OCIIntervalToNumber(void *hndl, OCIError *err, const OCIInterval *inter, |
| 3802 | OCINumber *number); |
| 3803 | |
| 3804 | DESCRIPTION |
| 3805 | Converts an interval to an Oracle Number |
| 3806 | PARAMETERS |
| 3807 | hndl (IN) - Session/Env handle. |
| 3808 | err (IN/OUT) - error handle. If there is an error, it is |
| 3809 | recorded in 'err' and this function returns OCI_ERROR. |
| 3810 | The error recorded in 'err' can be retrieved by calling |
| 3811 | OCIErrorGet(). |
| 3812 | (IN) inter - Interval to be converted |
| 3813 | (OUT) number - Oracle number result (in years for YEARMONTH interval |
| 3814 | and in days for DAYSECOND) |
| 3815 | RETURNS |
| 3816 | OCI_INVALID_HANDLE if 'err' is NULL. |
| 3817 | OCI_SUCCESS on success |
| 3818 | NOTES |
| 3819 | Fractional portions of the date (for instance, minutes and seconds if |
| 3820 | the unit chosen is hours) will be included in the Oracle number produced. |
| 3821 | Excess precision will be truncated. |
| 3822 | |
| 3823 | ------------------------------- OCIIntervalToText ------------------------- |
| 3824 | sword OCIIntervalToText( void *hndl, OCIError *err, const OCIInterval *inter, |
| 3825 | ub1 lfprec, ub1 fsprec, OraText *buffer, |
| 3826 | size_t buflen, size_t *resultlen ); |
| 3827 | |
| 3828 | DESCRIPTION |
| 3829 | Given an interval, produces a string representing the interval. |
| 3830 | PARAMETERS |
| 3831 | hndl (IN) - Session/Env handle. |
| 3832 | err (IN/OUT) - error handle. If there is an error, it is |
| 3833 | recorded in 'err' and this function returns OCI_ERROR. |
| 3834 | The error recorded in 'err' can be retrieved by calling |
| 3835 | OCIErrorGet(). |
| 3836 | (IN) inter - Interval to be converted |
| 3837 | (IN) lfprec - Leading field precision. Number of digits used to |
| 3838 | represent the leading field. |
| 3839 | (IN) fsprec - Fractional second precision of the interval. Number of |
| 3840 | digits used to represent the fractional seconds. |
| 3841 | (OUT) buffer - buffer to hold result |
| 3842 | (IN) buflen - length of above buffer |
| 3843 | (OUT) resultlen - length of result placed into buffer |
| 3844 | |
| 3845 | RETURNS |
| 3846 | OCI_SUCCESS on success |
| 3847 | OCI_INVALID_HANDLE if 'err' is NULL. |
| 3848 | OCI_ERROR |
| 3849 | if the buffer is not large enough to hold the result |
| 3850 | NOTES |
| 3851 | The interval literal will be output as `year' or `[year-]month' for |
| 3852 | YEAR-MONTH intervals and as `seconds' or `minutes[:seconds]' or |
| 3853 | `hours[:minutes[:seconds]]' or `days[ hours[:minutes[:seconds]]]' for |
| 3854 | DAY-TIME intervals (where optional fields are surrounded by brackets). |
| 3855 | |
| 3856 | ---------------------- OCIIntervalFromTZ -------------------- |
| 3857 | sword OCIIntervalFromTZ(void *hndl, OCIError *err, const oratext *inpstring, |
| 3858 | size_t str_len, OCIInterval *result); |
| 3859 | |
| 3860 | DESCRIPTION |
| 3861 | Retuns an OCI_DTYPE_INTERVAL_DS OCIInterval with the region id (if |
| 3862 | the region is specified in the input string) set and the current |
| 3863 | absolute offset or an absolut offset with the region id set to 0. |
| 3864 | PARAMETERS |
| 3865 | hndl (IN) - Session/Env handle. |
| 3866 | err (IN/OUT) - error handle. If there is an error, it is |
| 3867 | recorded in 'err' and this function returns OCI_ERROR. |
| 3868 | The error recorded in 'err' can be retrieved by calling |
| 3869 | OCIErrorGet(). |
| 3870 | inpstring (IN) - pointer to the input string |
| 3871 | str_len (IN) - inpstring length |
| 3872 | result - Output Interval |
| 3873 | RETURNS |
| 3874 | OCI_SUCCESS on success |
| 3875 | OCI_INVALID_HANDLE if 'err' is NULL. |
| 3876 | OCI_ERROR on error |
| 3877 | Bad interval type |
| 3878 | Timezone errors |
| 3879 | NOTES |
| 3880 | The input string must be of the form [+/-]TZH:TZM or 'TZR [TZD]' |
| 3881 | |
| 3882 | ----------------------- OCIKerbAttrSet --------------------- |
| 3883 | sword OCIKerbAttrSet(OCISession *trgthndlp, ub4 auth_mode, |
| 3884 | ub1 *ftgt_ticket, ub4 ftgt_ticket_len, |
| 3885 | ub1 *ftgt_sesskey, ub4 ftgt_sesskey_len, |
| 3886 | ub2 ftgt_keytype, ub4 ftgt_ticket_flags, |
| 3887 | sb4 ftgt_auth_time, sb4 ftgt_start_time, |
| 3888 | sb4 ftgt_end_time, sb4 ftgt_renew_time, |
| 3889 | oratext *ftgt_principal, ub4 ftgt_principal_len, |
| 3890 | oratext *ftgt_realm, ub4 ftgt_realm_len, |
| 3891 | OCIError *errhp); |
| 3892 | |
| 3893 | DESCRIPTION |
| 3894 | This call sets the attributes required for Kerberos authentication |
| 3895 | on the user handle. |
| 3896 | |
| 3897 | PARAMETERS |
| 3898 | trgthndlp (IN) - The pointer to a user handle. |
| 3899 | auth_mode (IN) - Indicates what type of Kerberos credentials should |
| 3900 | be set. Options are: |
| 3901 | |
| 3902 | OCI_KERBCRED_PROXY |
| 3903 | - Set Kerberos credentials for use with |
| 3904 | proxy authentication. |
| 3905 | OCI_KERBCRED_CLIENT_IDENTIFIER |
| 3906 | - Set Kerberos credentials for use |
| 3907 | with secure client identifier. |
| 3908 | |
| 3909 | ftgt_ticket (IN) - Forwardable Ticket Granting Ticket (FTGT). |
| 3910 | ftgt_ticket_len (IN) - Length of FTGT. |
| 3911 | ftgt_sesskey(IN) - Session Key associated with FTGT. |
| 3912 | ftgt_sesskey_len (IN) - Length of session key. |
| 3913 | ftgt_keytype (IN) - Type of encryption key used to encrypt FTGT. |
| 3914 | ftgt_ticket_flags (IN) - Flags associated with encryption of FTGT. |
| 3915 | ftgt_auth_time (IN) - Authentication time compatible with that in FTGT. |
| 3916 | ftgt_start_time (IN) - Start time compatible with that indicated in FTGT. |
| 3917 | ftgt_end_time (IN) - End time compatible with that indicated in FTGT. |
| 3918 | ftgt_renew_time (IN) - Renew time compatible with that indicated in FTGT. |
| 3919 | ftgt_principal (IN) - Client principal name from FTGT. |
| 3920 | ftgt_principal_len (IN) - Length of client principal name. |
| 3921 | ftgt_realm (IN) - Client realm name from FTGT. |
| 3922 | ftgt_realm_len (IN) - Client realm name length. |
| 3923 | errhp (IN/OUT) - error handle. If there is an error, it is |
| 3924 | recorded in 'err' and this function returns OCI_ERROR. |
| 3925 | The error recorded in 'err' can be retrieved by calling |
| 3926 | OCIErrorGet(). |
| 3927 | RETURNS |
| 3928 | OCI_SUCCESS on success |
| 3929 | OCI_ERROR on error |
| 3930 | NOTES |
| 3931 | |
| 3932 | OCILdaToSvcCtx() |
| 3933 | Name |
| 3934 | OCI toggle version 7 Lda_Def to SerVice context handle |
| 3935 | Purpose |
| 3936 | Converts a V7 Lda_Def to a V8 service context handle. |
| 3937 | Syntax |
| 3938 | sword OCILdaToSvcCtx ( OCISvcCtx **svchpp, |
| 3939 | OCIError *errhp, |
| 3940 | Lda_Def *ldap ); |
| 3941 | Comments |
| 3942 | Converts a V7 Lda_Def to a V8 service context handle. The action of this call |
| 3943 | can be reversed by passing the resulting service context handle to the |
| 3944 | OCISvcCtxToLda() function. |
| 3945 | Parameters |
| 3946 | svchpp (IN/OUT) - the service context handle. |
| 3947 | errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for |
| 3948 | diagnostic information in the event of an error. |
| 3949 | ldap (IN/OUT) - the V7 logon data area returned by OCISvcCtxToLda() from |
| 3950 | this service context. |
| 3951 | Related Functions |
| 3952 | OCISvcCtxToLda() |
| 3953 | |
| 3954 | |
| 3955 | |
| 3956 | |
| 3957 | OCILobAppend() |
| 3958 | |
| 3959 | Name |
| 3960 | OCI Lob APpend |
| 3961 | |
| 3962 | Purpose |
| 3963 | Appends a LOB value at the end of another LOB. |
| 3964 | |
| 3965 | Syntax |
| 3966 | sword OCILobAppend ( OCISvcCtx *svchp, |
| 3967 | OCIError *errhp, |
| 3968 | OCILobLocator *dst_locp, |
| 3969 | OCILobLocator *src_locp ); |
| 3970 | Comments |
| 3971 | Appends a LOB value at the end of LOB. The data is |
| 3972 | copied from the source to the destination at the end of the destination. The |
| 3973 | source and the destination must already exist. The destination LOB is |
| 3974 | extended to accommodate the newly written data. |
| 3975 | |
| 3976 | It is an error to extend the destination LOB beyond the maximum length |
| 3977 | allowed or to try to copy from a NULL LOB. |
| 3978 | |
| 3979 | Parameters |
| 3980 | svchp (IN) - the service context handle. |
| 3981 | errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for |
| 3982 | diagnostic information in the event of an error. |
| 3983 | dst_locp (IN/OUT) - a locator uniquely referencing the destination LOB. |
| 3984 | src_locp (IN/OUT) - a locator uniquely referencing the source LOB. |
| 3985 | |
| 3986 | Related Functions |
| 3987 | OCILobTrim() |
| 3988 | OCIErrorGet() |
| 3989 | OCILobWrite() |
| 3990 | OCILobCopy() |
| 3991 | |
| 3992 | |
| 3993 | |
| 3994 | OCILobAssign() |
| 3995 | |
| 3996 | Name |
| 3997 | OCI Lob ASsiGn |
| 3998 | |
| 3999 | Purpose |
| 4000 | Assigns one LOB/FILE locator to another. |
| 4001 | |
| 4002 | Syntax |
| 4003 | sword OCILobAssign ( OCIEnv *envhp, |
| 4004 | OCIError *errhp, |
| 4005 | const OCILobLocator *src_locp, |
| 4006 | OCILobLocator **dst_locpp ); |
| 4007 | |
| 4008 | Comments |
| 4009 | Assign source locator to destination locator. After the assignment, both |
| 4010 | locators refer to the same LOB data. For internal LOBs, the source locator's |
| 4011 | LOB data gets copied to the destination locator's LOB data only when the |
| 4012 | destination locator gets stored in the table. Therefore, issuing a flush of |
| 4013 | the object containing the destination locator will copy the LOB data. For |
| 4014 | FILEs only the locator that refers to the OS file is copied to the table. The |
| 4015 | OS file is not copied. |
| 4016 | Note: The only difference between this and OCILobLocatorAssign is that this |
| 4017 | takes an environment handle whereas OCILobLocatorAssign takes an OCI service |
| 4018 | handle |
| 4019 | |
| 4020 | Parameters |
| 4021 | envhp (IN/OUT) - OCI environment handle initialized in object mode. |
| 4022 | errhp (IN/OUT) - The OCI error handle. If there is an error, it is recorded |
| 4023 | in errhp and this function returns OCI_ERROR. Diagnostic information can be |
| 4024 | obtained by calling OCIErrorGet(). |
| 4025 | src_locp (IN) - LOB locator to copy from. |
| 4026 | dst_locpp (IN/OUT) - LOB locator to copy to. The caller must allocate space |
| 4027 | for the OCILobLocator by calling OCIDescriptorAlloc(). |
| 4028 | |
| 4029 | See also |
| 4030 | OCIErrorGet() |
| 4031 | OCILobIsEqual() |
| 4032 | OCILobLocatorIsInit() |
| 4033 | OCILobLocatorAssign() |
| 4034 | |
| 4035 | |
| 4036 | OCILobCharSetForm() |
| 4037 | |
| 4038 | Name |
| 4039 | OCI Lob Get Character Set Form |
| 4040 | |
| 4041 | Purpose |
| 4042 | Gets the LOB locator's character set fpr,, if any. |
| 4043 | |
| 4044 | Syntax |
| 4045 | sword OCILobCharSetForm ( OCIEnv *envhp, |
| 4046 | OCIError *errhp, |
| 4047 | const OCILobLocator *locp, |
| 4048 | ub1 *csfrm ); |
| 4049 | |
| 4050 | Comments |
| 4051 | Returns the character set form of the input LOB locator in the csfrm output |
| 4052 | parameter. |
| 4053 | |
| 4054 | Parameters |
| 4055 | envhp (IN/OUT) - OCI environment handle initialized in object mode. |
| 4056 | errhp (IN/OUT) - error handle. The OCI error handle. If there is an error, it |
| 4057 | is recorded in err and this function returns OCI_ERROR. Diagnostic |
| 4058 | information can be obtained by calling OCIErrorGet(). |
| 4059 | locp (IN) - LOB locator for which to get the character set form. |
| 4060 | csfrm(OUT) - character set form of the input LOB locator. If the input |
| 4061 | locator is for a BLOB or a BFILE, csfrm is set to 0 since there is no concept |
| 4062 | of a character set for binary LOBs/FILEs. The caller must allocate space for |
| 4063 | the csfrm (ub1) and not write into the space. |
| 4064 | See also |
| 4065 | OCIErrorGet(), OCILobCharSetId(), OCILobLocatorIsInit |
| 4066 | |
| 4067 | |
| 4068 | |
| 4069 | OCILobCharSetId() |
| 4070 | |
| 4071 | Name |
| 4072 | OCI Lob get Character Set IDentifier |
| 4073 | |
| 4074 | Purpose |
| 4075 | Gets the LOB locator's character set ID, if any. |
| 4076 | |
| 4077 | Syntax |
| 4078 | sword OCILobCharSetId ( OCIEnv *envhp, |
| 4079 | OCIError *errhp, |
| 4080 | const OCILobLocator *locp, |
| 4081 | ub2 *csid ); |
| 4082 | |
| 4083 | Comments |
| 4084 | Returns the character set ID of the input LOB locator in the cid output |
| 4085 | parameter. |
| 4086 | |
| 4087 | Parameters |
| 4088 | envhp (IN/OUT) - OCI environment handle initialized in object mode. |
| 4089 | errhp (IN/OUT) - error handle. The OCI error handle. If there is an error, it |
| 4090 | is recorded in err and this function returns OCI_ERROR. Diagnostic |
| 4091 | information can be obtained by calling OCIErrorGet(). |
| 4092 | locp (IN) - LOB locator for which to get the character set ID. |
| 4093 | csid (OUT) - character set ID of the input LOB locator. If the input locator |
| 4094 | is for a BLOB or a BFILE, csid is set to 0 since there is no concept of a |
| 4095 | character set for binary LOBs/FILEs. The caller must allocate space for the |
| 4096 | character set id of type ub2 and not write into the space. |
| 4097 | |
| 4098 | See also |
| 4099 | OCIErrorGet(), OCILobCharSetForm(), OCILobLocatorIsInit() |
| 4100 | |
| 4101 | |
| 4102 | |
| 4103 | OCILobCopy() |
| 4104 | |
| 4105 | Name |
| 4106 | OCI Lob Copy |
| 4107 | |
| 4108 | Purpose |
| 4109 | Copies a portion of a LOB value into another LOB value. |
| 4110 | |
| 4111 | Syntax |
| 4112 | sword OCILobCopy ( OCISvcCtx *svchp, |
| 4113 | OCIError *errhp, |
| 4114 | OCILobLocator *dst_locp, |
| 4115 | OCILobLocator *src_locp, |
| 4116 | ub4 amount, |
| 4117 | ub4 dst_offset, |
| 4118 | ub4 src_offset ); |
| 4119 | |
| 4120 | Comments |
| 4121 | Copies a portion of a LOB value into another LOB as specified. The data |
| 4122 | is copied from the source to the destination. The source (src_locp) and the |
| 4123 | destination (dlopb) LOBs must already exist. |
| 4124 | If the data already exists at the destination's start position, it is |
| 4125 | overwritten with the source data. If the destination's start position is |
| 4126 | beyond the end of the current data, a hole is created from the end of the data |
| 4127 | to the beginning of the newly written data from the source. The destination |
| 4128 | LOB is extended to accommodate the newly written data if it extends |
| 4129 | beyond the current length of the destination LOB. |
| 4130 | It is an error to extend the destination LOB beyond the maximum length |
| 4131 | allowed or to try to copy from a NULL LOB. |
| 4132 | Parameters |
| 4133 | svchp (IN) - the service context handle. |
| 4134 | errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for |
| 4135 | diagnostic information in the event of an error. |
| 4136 | dst_locp (IN/OUT) - a locator uniquely referencing the destination LOB. |
| 4137 | src_locp (IN/OUT) - a locator uniquely referencing the source LOB. |
| 4138 | amount (IN) - the number of character or bytes, as appropriate, to be copied. |
| 4139 | dst_offset (IN) - this is the absolute offset for the destination LOB. |
| 4140 | For character LOBs it is the number of characters from the beginning of the |
| 4141 | LOB at which to begin writing. For binary LOBs it is the number of bytes from |
| 4142 | the beginning of the lob from which to begin reading. The offset starts at 1. |
| 4143 | src_offset (IN) - this is the absolute offset for the source LOB. |
| 4144 | For character LOBs it is the number of characters from the beginning of the |
| 4145 | LOB, for binary LOBs it is the number of bytes. Starts at 1. |
| 4146 | |
| 4147 | See Also |
| 4148 | OCIErrorGet(), OCILobAppend(), OCILobWrite(), OCILobTrim() |
| 4149 | |
| 4150 | OCILobCreateTemporary() |
| 4151 | |
| 4152 | Name |
| 4153 | OCI Lob Create Temporary |
| 4154 | |
| 4155 | Purpose |
| 4156 | Create a Temporary Lob |
| 4157 | |
| 4158 | Syntax |
| 4159 | sword OCILobCreateTemporary(OCISvcCtx *svchp, |
| 4160 | OCIError *errhp, |
| 4161 | OCILobLocator *locp, |
| 4162 | ub2 csid, |
| 4163 | ub1 csfrm, |
| 4164 | ub1 lobtype, |
| 4165 | boolean cache, |
| 4166 | OCIDuration duration); |
| 4167 | |
| 4168 | |
| 4169 | Comments |
| 4170 | svchp (IN) - the service context handle. |
| 4171 | errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for |
| 4172 | diagnostic information in the event of an error. |
| 4173 | locp (IN/OUT) - a locator which points to the temporary Lob |
| 4174 | csid (IN) - the character set id |
| 4175 | csfrm(IN) - the character set form |
| 4176 | lobtype (IN) - the lob type - one of the three constants OCI_TEMP_BLOB, |
| 4177 | OCI_TEMP_CLOB and OCI_TEMP_NCLOB |
| 4178 | cache(IN)- TRUE if the temporary LOB goes through the cache; FALSE, if not. |
| 4179 | duration(IN)- duration of the temporary LOB; Can be a valid duration id or one |
| 4180 | of the values: OCI_DURATION_SESSION, OCI_DURATION_CALL |
| 4181 | Note: OCI_DURATION_TRANSACTION is NOT supported in 8.1 |
| 4182 | Related functions |
| 4183 | OCILobFreeTemporary() |
| 4184 | OCILobIsTemporary() |
| 4185 | |
| 4186 | OCILobDisableBuffering() |
| 4187 | |
| 4188 | Name |
| 4189 | OCI Lob Disable Buffering |
| 4190 | |
| 4191 | Purpose |
| 4192 | Disable lob buffering for the input locator. |
| 4193 | |
| 4194 | |
| 4195 | Syntax |
| 4196 | sword OCILobDisableBuffering ( OCISvcCtx *svchp, |
| 4197 | OCIError *errhp, |
| 4198 | OCILobLocator *locp); |
| 4199 | |
| 4200 | Comments |
| 4201 | |
| 4202 | Disable lob buffering for the input locator. The next time data is |
| 4203 | read/written from/to the lob through the input locator, the lob |
| 4204 | buffering subsystem is *not* used. Note that this call does *not* |
| 4205 | implicitly flush the changes made in the buffering subsystem. The |
| 4206 | user must explicitly call OCILobFlushBuffer() to do this. |
| 4207 | |
| 4208 | Parameters |
| 4209 | svchp (IN) - the service context handle. |
| 4210 | errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for |
| 4211 | diagnostic information in the event of an error. |
| 4212 | locp (IN/OUT) - a locator uniquely referencing the LOB. |
| 4213 | |
| 4214 | Related Functions |
| 4215 | OCILobEnableBuffering() |
| 4216 | OCIErrorGet() |
| 4217 | OCILobFlushBuffer() |
| 4218 | |
| 4219 | |
| 4220 | |
| 4221 | |
| 4222 | OCILobEnableBuffering() |
| 4223 | |
| 4224 | Name |
| 4225 | OCI Lob Enable Buffering |
| 4226 | |
| 4227 | Purpose |
| 4228 | Enable lob buffering for the input locator. |
| 4229 | |
| 4230 | |
| 4231 | Syntax |
| 4232 | sword OCILobEnableBuffering ( OCISvcCtx *svchp, |
| 4233 | OCIError *errhp, |
| 4234 | OCILobLocator *locp); |
| 4235 | |
| 4236 | Comments |
| 4237 | |
| 4238 | Enable lob buffering for the input locator. The next time data is |
| 4239 | read/written from/to the lob through the input locator, the lob |
| 4240 | buffering subsystem is used. |
| 4241 | |
| 4242 | Once lob buffering is enabled for a locator, if that locator is passed to |
| 4243 | one of the following routines, an error is returned: |
| 4244 | OCILobCopy, OCILobAppend, OCILobErase, OCILobGetLength, OCILobTrim |
| 4245 | |
| 4246 | Parameters |
| 4247 | svchp (IN) - the service context handle. |
| 4248 | errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for |
| 4249 | diagnostic information in the event of an error. |
| 4250 | locp (IN/OUT) - a locator uniquely referencing the LOB. |
| 4251 | |
| 4252 | Related Functions |
| 4253 | OCILobDisableBuffering() |
| 4254 | OCIErrorGet() |
| 4255 | OCILobWrite() |
| 4256 | OCILobRead() |
| 4257 | OCILobFlushBuffer() |
| 4258 | |
| 4259 | |
| 4260 | |
| 4261 | |
| 4262 | OCILobErase() |
| 4263 | |
| 4264 | Name |
| 4265 | OCI Lob ERase |
| 4266 | |
| 4267 | Purpose |
| 4268 | Erases a specified portion of the LOB data starting at a specified offset. |
| 4269 | |
| 4270 | Syntax |
| 4271 | sword OCILobErase ( OCISvcCtx *svchp, |
| 4272 | OCIError *errhp, |
| 4273 | OCILobLocator *locp, |
| 4274 | ub4 *amount, |
| 4275 | ub4 offset ); |
| 4276 | |
| 4277 | Comments |
| 4278 | Erases a specified portion of the LOB data starting at a specified offset. |
| 4279 | The actual number of characters/bytes erased is returned. The actual number |
| 4280 | of characters/bytes and the requested number of characters/bytes will differ |
| 4281 | if the end of the LOB data is reached before erasing the requested number of |
| 4282 | characters/bytes. |
| 4283 | If a section of data from the middle of the LOB data is erased, a hole is |
| 4284 | created. When data from that hole is read, 0's are returned. If the LOB is |
| 4285 | NULL, this routine will indicate that 0 characters/bytes were erased. |
| 4286 | |
| 4287 | Parameters |
| 4288 | svchp (IN) - the service context handle. |
| 4289 | errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for |
| 4290 | diagnostic information in the event of an error. |
| 4291 | locp (IN/OUT) - the LOB for which to erase a section of data. |
| 4292 | amount (IN/OUT) - On IN, the number of characters/bytes to erase. On OUT, |
| 4293 | the actual number of characters/bytes erased. |
| 4294 | offset (IN) - absolute offset from the beginning of the LOB data from which |
| 4295 | to start erasing data. Starts at 1. |
| 4296 | |
| 4297 | See Also |
| 4298 | OCIErrorGet(), OCILobRead(), OCILobWrite() |
| 4299 | |
| 4300 | OCILobOpen() |
| 4301 | |
| 4302 | Name |
| 4303 | OCI Lob Open |
| 4304 | |
| 4305 | Purpose |
| 4306 | Opens an internal or external Lob. |
| 4307 | |
| 4308 | Syntax |
| 4309 | sword OCILobOpen( OCISvcCtx *svchp, |
| 4310 | OCIError *errhp, |
| 4311 | OCILobLocator *locp, |
| 4312 | ub1 mode ); |
| 4313 | |
| 4314 | Comments |
| 4315 | It is an error if the same lob is opened more than once in |
| 4316 | the same transaction. Lobs are opened implicitly if they are |
| 4317 | not opened before using them. A LOB has to be closed before |
| 4318 | the transaction commits else the transaction is rolled back. |
| 4319 | Open locators are closed if the transaction aborts. Multiple |
| 4320 | users can open the same lob on different locators. |
| 4321 | Parameters |
| 4322 | svchp (IN) - the service context handle. |
| 4323 | errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for |
| 4324 | diagnostic information in the event of an error. |
| 4325 | locp (IN/OUT) - locator points to the LOB to be opened |
| 4326 | mode (IN) - mode in which to open the lob. The valid modes are |
| 4327 | read-only - OCI_FILE_READONLY, read-write - OCI_FILE_READWRITE |
| 4328 | |
| 4329 | OCILobClose() |
| 4330 | |
| 4331 | Name |
| 4332 | OCI Lob Close |
| 4333 | |
| 4334 | Purpose |
| 4335 | Closes an open internal or external Lob. |
| 4336 | |
| 4337 | Syntax |
| 4338 | sword OCILobClose( OCISvcCtx *svchp, |
| 4339 | OCIError *errhp, |
| 4340 | OCILobLocator *locp ); |
| 4341 | |
| 4342 | |
| 4343 | Comments |
| 4344 | It is an error if the lob is not open at this time. All LOBs |
| 4345 | that have been opened in a transaction have to be closed |
| 4346 | before the transaction commits, else the transaction gets |
| 4347 | rolled back. |
| 4348 | |
| 4349 | Parameters |
| 4350 | svchp (IN) - the service context handle. |
| 4351 | errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for |
| 4352 | diagnostic information in the event of an error. |
| 4353 | locp (IN) - A locator that was opened using OCILobOpen() |
| 4354 | |
| 4355 | |
| 4356 | OCILobFileClose() |
| 4357 | |
| 4358 | Name |
| 4359 | OCI Lob File CLoSe |
| 4360 | |
| 4361 | Purpose |
| 4362 | Closes a previously opened FILE. |
| 4363 | |
| 4364 | Syntax |
| 4365 | sword OCILobFileClose ( OCISvcCtx *svchp, |
| 4366 | OCIError *errhp, |
| 4367 | OCILobLocator *filep ); |
| 4368 | |
| 4369 | Comments |
| 4370 | Closes a previously opened FILE. It is an error if this function is called for |
| 4371 | an internal LOB. No error is returned if the FILE exists but is not opened. |
| 4372 | Parameters |
| 4373 | svchp (IN) - the service context handle. |
| 4374 | errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for |
| 4375 | diagnostic information in the event of an error. |
| 4376 | filep (IN/OUT) - a pointer to a FILE locator to be closed. |
| 4377 | |
| 4378 | See Also |
| 4379 | OCIErrorGet(), OCILobFileOpen(), OCILobFileCloseAll(), OCILobFileIsOpen(), |
| 4380 | OCILobFileExists(), CREATE DIRECTORY DDL |
| 4381 | |
| 4382 | |
| 4383 | |
| 4384 | |
| 4385 | OCILobFileCloseAll() |
| 4386 | |
| 4387 | Name |
| 4388 | OCI LOB FILE Close All |
| 4389 | |
| 4390 | Purpose |
| 4391 | Closes all open FILEs on a given service context. |
| 4392 | |
| 4393 | Syntax |
| 4394 | sword OCILobFileCLoseAll ( OCISvcCtx *svchp, |
| 4395 | OCIError *errhp ); |
| 4396 | |
| 4397 | Comments |
| 4398 | Closes all open FILEs on a given service context. |
| 4399 | |
| 4400 | Parameters |
| 4401 | svchp (IN) - the service context handle. |
| 4402 | errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for |
| 4403 | diagnostic information in the event of an error. |
| 4404 | |
| 4405 | See also |
| 4406 | OCILobFileClose(), |
| 4407 | OCIErrorGet(), OCILobFileOpen(), OCILobFileIsOpen(), |
| 4408 | OCILobFileExists(), CREATE DIRECTORY DDL |
| 4409 | |
| 4410 | |
| 4411 | |
| 4412 | |
| 4413 | OCILobFileExists() |
| 4414 | |
| 4415 | Name |
| 4416 | OCI LOB FILE exists |
| 4417 | |
| 4418 | Purpose |
| 4419 | Tests to see if the FILE exists on the server |
| 4420 | |
| 4421 | Syntax |
| 4422 | sword OCILobFileExists ( OCISvcCtx *svchp, |
| 4423 | OCIError *errhp, |
| 4424 | OCILobLocator *filep, |
| 4425 | boolean *flag ); |
| 4426 | |
| 4427 | Comments |
| 4428 | Checks to see if a FILE exists for on the server. |
| 4429 | |
| 4430 | Parameters |
| 4431 | svchp (IN) - the OCI service context handle. |
| 4432 | errhp (IN/OUT) - error handle. The OCI error handle. If there is an error, |
| 4433 | it is recorded in err and this function returns OCI_ERROR. Diagnostic |
| 4434 | information can be obtained by calling OCIErrorGet(). |
| 4435 | filep (IN) - pointer to the FILE locator that refers to the file. |
| 4436 | flag (OUT) - returns TRUE if the FILE exists; FALSE if it does not. |
| 4437 | |
| 4438 | See also |
| 4439 | OCIErrorGet, CREATE DIRECTORY (DDL) |
| 4440 | |
| 4441 | |
| 4442 | |
| 4443 | |
| 4444 | OCILobFileGetName() |
| 4445 | |
| 4446 | Name |
| 4447 | OCI LOB FILE Get file Name |
| 4448 | |
| 4449 | Purpose |
| 4450 | Gets the FILE locator's directory alias and file name. |
| 4451 | |
| 4452 | Syntax |
| 4453 | sword OCILobFileGetName ( OCIEnv *envhp, |
| 4454 | OCIError *errhp, |
| 4455 | const OCILobLocator *filep, |
| 4456 | OraText *dir_alias, |
| 4457 | ub2 *d_length, |
| 4458 | OraText *filename, |
| 4459 | ub2 *f_length ); |
| 4460 | |
| 4461 | Comments |
| 4462 | Returns the directory alias and file name associated with this file locator. |
| 4463 | |
| 4464 | Parameters |
| 4465 | envhp (IN/OUT) - OCI environment handle initialized in object mode. |
| 4466 | errhp (IN/OUT) -The OCI error handle. If there is an error, it is recorded in |
| 4467 | errhp and this function returns OCI_ERROR. Diagnostic information can be |
| 4468 | obtained by calling OCIErrorGet(). |
| 4469 | filep (IN) - FILE locator for which to get the directory alias and file name. |
| 4470 | dir_alias (OUT) - buffer into which the directory alias name is placed. The |
| 4471 | caller must allocate enough space for the directory alias name and must not |
| 4472 | write into the space. |
| 4473 | d_length (IN/OUT) |
| 4474 | - IN: length of the input dir_alias string; |
| 4475 | - OUT: length of the returned dir_alias string. |
| 4476 | filename (OUT) - buffer into which the file name is placed. The caller must |
| 4477 | allocate enough space for the file name and must not write into the space. |
| 4478 | f_length (IN/OUT) |
| 4479 | - IN: length of the input filename string; |
| 4480 | - OUT: lenght of the returned filename string. |
| 4481 | |
| 4482 | See also |
| 4483 | OCILobFileSetName(), OCIErrorGet() |
| 4484 | |
| 4485 | |
| 4486 | |
| 4487 | |
| 4488 | OCILobFileIsOpen() |
| 4489 | |
| 4490 | Name |
| 4491 | OCI LOB FILE Is Open? |
| 4492 | |
| 4493 | Purpose |
| 4494 | Tests to see if the FILE is open |
| 4495 | |
| 4496 | Syntax |
| 4497 | sword OCILobFileIsOpen ( OCISvcCtx *svchp, |
| 4498 | OCIError *errhp, |
| 4499 | OCILobLocator *filep, |
| 4500 | boolean *flag ); |
| 4501 | |
| 4502 | Comments |
| 4503 | Checks to see if the FILE on the server is open for a given LobLocator. |
| 4504 | |
| 4505 | Parameters |
| 4506 | svchp (IN) - the OCI service context handle. |
| 4507 | errhp (IN/OUT) - error handle. The OCI error handle. If there is an error, it |
| 4508 | is recorded in err and this function returns OCI_ERROR. Diagnostic |
| 4509 | information can be obtained by calling OCIErrorGet(). |
| 4510 | filep (IN) - pointer to the FILE locator being examined. If the input file |
| 4511 | locator was never passed to OCILobFileOpen(), the file is considered not to |
| 4512 | be opened by this locator. However, a different locator may have opened the |
| 4513 | file. More than one file opens can be performed on the same file using |
| 4514 | different locators. |
| 4515 | flag (OUT) - returns TRUE if the FILE is opened using this locator; FALSE if |
| 4516 | it is not. |
| 4517 | |
| 4518 | See also |
| 4519 | OCIErrorGet, OCILobFileOpen, OCILobFileClose, OCILobFileCloseAll, CREATE |
| 4520 | DIRECTORY SQL command |
| 4521 | |
| 4522 | |
| 4523 | OCILobFileOpen() |
| 4524 | |
| 4525 | Name |
| 4526 | OCI LOB FILE open |
| 4527 | |
| 4528 | Purpose |
| 4529 | Opens a FILE for read-only access |
| 4530 | |
| 4531 | Syntax |
| 4532 | sword OCILobFileOpen ( OCISvcCtx *svchp, |
| 4533 | OCIError *errhp, |
| 4534 | OCILobLocator *filep, |
| 4535 | ub1 mode ); |
| 4536 | |
| 4537 | Comments |
| 4538 | Opens a FILE. The FILE can be opened for read-only access only. FILEs may not |
| 4539 | be written to throough ORACLE. |
| 4540 | |
| 4541 | Parameters |
| 4542 | svchp (IN) - the service context handle. |
| 4543 | errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for |
| 4544 | diagnostic information in the event of an error. |
| 4545 | filep (IN/OUT) - the FILE to open. Error if the locator does not refer to a |
| 4546 | FILE. |
| 4547 | mode (IN) - mode in which to open the file. The only valid mode is |
| 4548 | read-only - OCI_FILE_READONLY. |
| 4549 | |
| 4550 | See Also |
| 4551 | OCILobFileClose, OCIErrorGet, OCILobFileCloseAll, OCILobFileIsOpen, |
| 4552 | OCILobFileSetName, CREATE DIRECTORY |
| 4553 | |
| 4554 | |
| 4555 | |
| 4556 | |
| 4557 | OCILobFileSetName() |
| 4558 | |
| 4559 | Name |
| 4560 | OCI Lob File Set NaMe |
| 4561 | |
| 4562 | Purpose |
| 4563 | Sets directory alias and file name in the FILE locator. |
| 4564 | |
| 4565 | Syntax |
| 4566 | sword OCILobFileSetName ( OCIEnv *envhp, |
| 4567 | OCIError *errhp, |
| 4568 | OCILobLocator **filepp, |
| 4569 | OraText *dir_alias, |
| 4570 | ub2 d_length, |
| 4571 | OraText *filename, |
| 4572 | ub2 f_length ); |
| 4573 | Comments |
| 4574 | Sets the directory alias and file name in the LOB file locator. |
| 4575 | Parameters |
| 4576 | envhp (IN/OUT) - OCI environment handle initialized in object mode. |
| 4577 | errhp (IN/OUT) - The OCI error handle. If there is an error, it is recorded |
| 4578 | in errhp and this function returns OCI_ERROR. Diagnostic information can be |
| 4579 | obtained by calling OCIErrorGet(). |
| 4580 | filepp (IN/OUT) - FILE locator for which to set the directory alias name. |
| 4581 | The caller must have already allocated space for the locator by calling |
| 4582 | OCIDescriptorAlloc(). |
| 4583 | dir_alias (IN) - buffer that contains the directory alias name to set in the |
| 4584 | locator. |
| 4585 | d_length (IN) - length of the input dir_alias parameter. |
| 4586 | filename (IN) - buffer that contains the file name is placed. |
| 4587 | f_length (IN) - length of the input filename parameter. |
| 4588 | See also |
| 4589 | OCILobFileGetName, OCIErrorGet, CREATE DIRECTORY |
| 4590 | |
| 4591 | |
| 4592 | |
| 4593 | |
| 4594 | OCILobFlushBuffer() |
| 4595 | |
| 4596 | Name |
| 4597 | OCI Lob Flush all Buffers for this lob. |
| 4598 | |
| 4599 | Purpose |
| 4600 | Flush/write all buffers for this lob to the server. |
| 4601 | |
| 4602 | |
| 4603 | Syntax |
| 4604 | sword OCILobFlushBuffer ( OCISvcCtx *svchp, |
| 4605 | OCIError *errhp, |
| 4606 | OCILobLocator *locp, |
| 4607 | ub4 flag); |
| 4608 | |
| 4609 | Comments |
| 4610 | |
| 4611 | Flushes to the server, changes made to the buffering subsystem that |
| 4612 | are associated with the lob referenced by the input locator. This |
| 4613 | routine will actually write the data in the buffer to the lob in |
| 4614 | the database. Lob buffering must have already been enabled for the |
| 4615 | input lob locator. |
| 4616 | |
| 4617 | This routine, by default, does not free the buffer resources for |
| 4618 | reallocation to another buffered LOB operation. However, if you |
| 4619 | want to free the buffer explicitly, you can set the flag parameter |
| 4620 | to OCI_LOB_BUFFER_FREE. |
| 4621 | |
| 4622 | Parameters |
| 4623 | svchp (IN/OUT) - the service context handle. |
| 4624 | errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for |
| 4625 | diagnostic information in the event of an error. |
| 4626 | locp (IN/OUT) - a locator uniquely referencing the LOB. |
| 4627 | flag (IN) - to indicate if the buffer resources need to be freed |
| 4628 | after a flush. Default value is OCI_LOB_BUFFER_NOFREE. |
| 4629 | Set it to OCI_LOB_BUFFER_FREE if you want the buffer |
| 4630 | resources to be freed. |
| 4631 | Related Functions |
| 4632 | OCILobEnableBuffering() |
| 4633 | OCILobDisableBuffering() |
| 4634 | OCIErrorGet() |
| 4635 | OCILobWrite() |
| 4636 | OCILobRead() |
| 4637 | |
| 4638 | |
| 4639 | OCILobFreeTemporary() |
| 4640 | |
| 4641 | Name |
| 4642 | OCI Lob Free Temporary |
| 4643 | |
| 4644 | Purpose |
| 4645 | Free a temporary LOB |
| 4646 | |
| 4647 | Syntax |
| 4648 | sword OCILobFreeTemporary(OCISvcCtx *svchp, |
| 4649 | OCIError *errhp, |
| 4650 | OCILobLocator *locp); |
| 4651 | |
| 4652 | Comments |
| 4653 | Frees the contents of the temporary Lob this locator is pointing to. Note |
| 4654 | that the locator itself is not freed until a OCIDescriptorFree is done. |
| 4655 | |
| 4656 | Parameters |
| 4657 | svchp (IN/OUT) - the service context handle. |
| 4658 | errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for |
| 4659 | diagnostic information in the event of an error. |
| 4660 | locp (IN/OUT) - a locator uniquely referencing the LOB |
| 4661 | |
| 4662 | Related functions |
| 4663 | OCILobCreateTemporary() |
| 4664 | OCILobIsTemporary() |
| 4665 | |
| 4666 | |
| 4667 | Name |
| 4668 | OCI Lob/File Get Chunk Size |
| 4669 | |
| 4670 | Purpose |
| 4671 | When creating the table, the user can specify the chunking factor, which can |
| 4672 | be a multiple of Oracle blocks. This corresponds to the chunk size used by the |
| 4673 | LOB data layer when accessing/modifying the LOB value. Part of the chunk is |
| 4674 | used to store system-related information and the rest stores the LOB value. |
| 4675 | This function returns the amount of space used in the LOB chunk to store |
| 4676 | the LOB value. |
| 4677 | |
| 4678 | Syntax |
| 4679 | sword OCILobGetChunkSize ( OCISvcCtx *svchp, |
| 4680 | OCIError *errhp, |
| 4681 | OCILobLocator *locp, |
| 4682 | ub4 *chunksizep ); |
| 4683 | |
| 4684 | Comments |
| 4685 | Performance will be improved if the user issues read/write |
| 4686 | requests using a multiple of this chunk size. For writes, there is an added |
| 4687 | benefit since LOB chunks are versioned and, if all writes are done on chunk |
| 4688 | basis, no extra/excess versioning is done nor duplicated. Users could batch |
| 4689 | up the write until they have enough for a chunk instead of issuing several |
| 4690 | write calls for the same chunk. |
| 4691 | |
| 4692 | Parameters |
| 4693 | svchp (IN) - the service context handle. |
| 4694 | errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for |
| 4695 | diagnostic information in the event of an error. |
| 4696 | locp (IN/OUT) - a LOB locator that uniquely references the LOB. For internal |
| 4697 | LOBs, this locator must be a locator that was obtained from the server |
| 4698 | specified by svchp. For FILEs, this locator can be initialized by a Select or |
| 4699 | OCILobFileSetName. |
| 4700 | chunksizep (OUT) - On output, it is the length of the LOB if not NULL - for |
| 4701 | character LOBs it is the number of characters, for binary LOBs it is the |
| 4702 | number of bytes in the LOB. |
| 4703 | |
| 4704 | Related Functions |
| 4705 | |
| 4706 | OCILobGetLength() |
| 4707 | |
| 4708 | Name |
| 4709 | OCI Lob/File Length |
| 4710 | |
| 4711 | Purpose |
| 4712 | Gets the length of a LOB/FILE. |
| 4713 | |
| 4714 | Syntax |
| 4715 | sword OCILobGetLength ( OCISvcCtx *svchp, |
| 4716 | OCIError *errhp, |
| 4717 | OCILobLocator *locp, |
| 4718 | ub4 *lenp ); |
| 4719 | |
| 4720 | Comments |
| 4721 | Gets the length of a LOB/FILE. If the LOB/FILE is NULL, the length is |
| 4722 | undefined. |
| 4723 | |
| 4724 | Parameters |
| 4725 | svchp (IN) - the service context handle. |
| 4726 | errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for |
| 4727 | diagnostic information in the event of an error. |
| 4728 | locp (IN/OUT) - a LOB locator that uniquely references the LOB. For internal |
| 4729 | LOBs, this locator must be a locator that was obtained from the server |
| 4730 | specified by svchp. For FILEs, this locator can be initialized by a Select or |
| 4731 | OCILobFileSetName. |
| 4732 | lenp (OUT) - On output, it is the length of the LOB if not NULL - for |
| 4733 | character LOBs it is the number of characters, for binary LOBs it is the |
| 4734 | number of bytes in the LOB. |
| 4735 | |
| 4736 | Related Functions |
| 4737 | OCIErrorGet, OCIFileSetName |
| 4738 | |
| 4739 | |
| 4740 | |
| 4741 | OCILobIsEqual() |
| 4742 | |
| 4743 | Name |
| 4744 | |
| 4745 | OCI Lob Is Equal |
| 4746 | |
| 4747 | Purpose |
| 4748 | Compares two LOB locators for equality. |
| 4749 | |
| 4750 | Syntax |
| 4751 | sword OCILobIsEqual ( OCIEnv *envhp, |
| 4752 | const OCILobLocator *x, |
| 4753 | const OCILobLocator *y, |
| 4754 | boolean *is_equal ); |
| 4755 | |
| 4756 | Comments |
| 4757 | Compares the given LOB locators for equality. Two LOB locators are equal if |
| 4758 | and only if they both refer to the same LOB data. |
| 4759 | Two NULL locators are considered not equal by this function. |
| 4760 | Parameters |
| 4761 | envhp (IN) - the OCI environment handle. |
| 4762 | x (IN) - LOB locator to compare. |
| 4763 | y (IN) - LOB locator to compare. |
| 4764 | is_equal (OUT) - TRUE, if the LOB locators are equal; FALSE if they are not. |
| 4765 | |
| 4766 | See also |
| 4767 | OCILobAssign, OCILobLocatorIsInit |
| 4768 | OCILobLocatorAssign, |
| 4769 | OCILobIsOpen() |
| 4770 | |
| 4771 | Name |
| 4772 | |
| 4773 | OCI Lob Is Open |
| 4774 | sword OCILobIsOpen(svchp, errhp, locp, flag) |
| 4775 | OCISvcCtx *svchp; |
| 4776 | OCIError *errhp; |
| 4777 | OCILobLocator *locp; |
| 4778 | boolean *flag; |
| 4779 | |
| 4780 | Comments |
| 4781 | Checks if the LOB locator was opened before. flag is set to TRUE |
| 4782 | if opened; FALSE otherwise |
| 4783 | |
| 4784 | |
| 4785 | Parameters |
| 4786 | svchp (IN) - the service context handle. |
| 4787 | errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for |
| 4788 | diagnostic information in the event of an error. |
| 4789 | locp (IN) - the locator to test for temporary LOB |
| 4790 | flag(OUT) - TRUE, if the LOB locator points to is open |
| 4791 | FALSE, if not. |
| 4792 | |
| 4793 | OCILobIsTemporary() |
| 4794 | |
| 4795 | Name |
| 4796 | |
| 4797 | OCI Lob Is Temporary |
| 4798 | |
| 4799 | Purpose |
| 4800 | Tests if this locator points to a temporary LOB |
| 4801 | |
| 4802 | Syntax |
| 4803 | sword OCILobIsTemporary(OCIEnv *envhp, |
| 4804 | OCIError *errhp, |
| 4805 | OCILobLocator *locp, |
| 4806 | boolean *is_temporary); |
| 4807 | |
| 4808 | Comments |
| 4809 | Tests the locator to determine if it points to a temporary LOB. |
| 4810 | If so, is_temporary is set to TRUE. If not, is_temporary is set |
| 4811 | to FALSE. |
| 4812 | |
| 4813 | Parameters |
| 4814 | envhp (IN) - the environment handle. |
| 4815 | errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for |
| 4816 | diagnostic information in the event of an error. |
| 4817 | locp (IN) - the locator to test for temporary LOB |
| 4818 | is_temporary(OUT) - TRUE, if the LOB locator points to a temporary LOB; |
| 4819 | FALSE, if not. |
| 4820 | |
| 4821 | See Also |
| 4822 | OCILobCreateTemporary, OCILobFreeTemporary |
| 4823 | |
| 4824 | |
| 4825 | OCILobLoadFromFile() |
| 4826 | |
| 4827 | Name |
| 4828 | OCI Lob Load From File |
| 4829 | |
| 4830 | Purpose |
| 4831 | Load/copy all or a portion of the file into an internal LOB. |
| 4832 | |
| 4833 | Syntax |
| 4834 | sword OCILobLoadFromFile ( OCISvcCtx *svchp, |
| 4835 | OCIError *errhp, |
| 4836 | OCILobLocator *dst_locp, |
| 4837 | OCILobLocator *src_filep, |
| 4838 | ub4 amount, |
| 4839 | ub4 dst_offset, |
| 4840 | ub4 src_offset ); |
| 4841 | |
| 4842 | Comments |
| 4843 | Loads/copies a portion or all of a file value into an internal LOB as |
| 4844 | specified. The data is copied from the source file to the destination |
| 4845 | internal LOB (BLOB/CLOB). No character set conversions are performed |
| 4846 | when copying the bfile data to a clob/nclob. The bfile data must already |
| 4847 | be in the same character set as the clob/nclob in the database. No |
| 4848 | error checking is performed to verify this. |
| 4849 | The source (src_filep) and the destination (dst_locp) LOBs must already exist. |
| 4850 | If the data already exists at the destination's start position, it is |
| 4851 | overwritten with the source data. If the destination's start position is |
| 4852 | beyond the end of the current data, a hole is created from the end of the data |
| 4853 | to the beginning of the newly written data from the source. The destination |
| 4854 | LOB is extended to accommodate the newly written data if it extends |
| 4855 | beyond the current length of the destination LOB. |
| 4856 | It is an error to extend the destination LOB beyond the maximum length |
| 4857 | allowed or to try to copy from a NULL LOB. |
| 4858 | Parameters |
| 4859 | svchp (IN) - the service context handle. |
| 4860 | errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for |
| 4861 | diagnostic information in the event of an error. |
| 4862 | dst_locp (IN/OUT) - a locator uniquely referencing the destination internal |
| 4863 | LOB which may be of type blob, clob, or nclob. |
| 4864 | src_filep (IN/OUT) - a locator uniquely referencing the source BFILE. |
| 4865 | amount (IN) - the number of bytes to be copied. |
| 4866 | dst_offset (IN) - this is the absolute offset for the destination LOB. |
| 4867 | For character LOBs it is the number of characters from the beginning of the |
| 4868 | LOB at which to begin writing. For binary LOBs it is the number of bytes from |
| 4869 | the beginning of the lob from which to begin reading. The offset starts at 1. |
| 4870 | src_offset (IN) - this is the absolute offset for the source BFILE. It is |
| 4871 | the number of bytes from the beginning of the LOB. The offset starts at 1. |
| 4872 | |
| 4873 | See Also |
| 4874 | OCIErrorGet(), OCILobAppend(), OCILobWrite(), OCILobTrim(), OCILobCopy() |
| 4875 | |
| 4876 | OCILobLocatorAssign() |
| 4877 | |
| 4878 | Name |
| 4879 | OCI Lob LOCATOR ASsiGn |
| 4880 | |
| 4881 | Purpose |
| 4882 | Assigns one LOB/FILE locator to another. |
| 4883 | |
| 4884 | Syntax |
| 4885 | sword OCILobLocatorAssign ( OCISvcCtx *svchp, |
| 4886 | OCIError *errhp, |
| 4887 | const OCILobLocator *src_locp, |
| 4888 | OCILobLocator **dst_locpp ); |
| 4889 | |
| 4890 | Comments |
| 4891 | Assign source locator to destination locator. After the assignment, both |
| 4892 | locators refer to the same LOB data. For internal LOBs, the source locator's |
| 4893 | LOB data gets copied to the destination locator's LOB data only when the |
| 4894 | destination locator gets stored in the table. Therefore, issuing a flush of |
| 4895 | the object containing the destination locator will copy the LOB data. For |
| 4896 | FILEs only the locator that refers to the OS file is copied to the table. The |
| 4897 | OS file is not copied. |
| 4898 | Note : the only difference between this and OCILobAssign is that this takes |
| 4899 | a OCI service handle pointer instead of a OCI environment handle pointer |
| 4900 | |
| 4901 | Parameters |
| 4902 | svchp (IN/OUT) - OCI service handle initialized in object mode. |
| 4903 | errhp (IN/OUT) - The OCI error handle. If there is an error, it is recorded |
| 4904 | in errhp and this function returns OCI_ERROR. Diagnostic information can be |
| 4905 | obtained by calling OCIErrorGet(). |
| 4906 | src_locp (IN) - LOB locator to copy from. |
| 4907 | dst_locpp (IN/OUT) - LOB locator to copy to. The caller must allocate space |
| 4908 | for the OCILobLocator by calling OCIDescriptorAlloc(). |
| 4909 | |
| 4910 | See also |
| 4911 | OCIErrorGet() |
| 4912 | OCILobIsEqual() |
| 4913 | OCILobLocatorIsInit() |
| 4914 | OCILobAssign() |
| 4915 | |
| 4916 | |
| 4917 | |
| 4918 | |
| 4919 | OCILobLocatorIsInit() |
| 4920 | |
| 4921 | Name |
| 4922 | OCI LOB locator is initialized? |
| 4923 | |
| 4924 | Purpose |
| 4925 | Tests to see if a given LOB locator is initialized. |
| 4926 | |
| 4927 | Syntax |
| 4928 | sword OCILobLocatorIsInit ( OCIEnv *envhp, |
| 4929 | OCIError *errhp, |
| 4930 | const OCILobLocator *locp, |
| 4931 | boolean *is_initialized ); |
| 4932 | |
| 4933 | Comments |
| 4934 | Tests to see if a given LOB locator is initialized. |
| 4935 | |
| 4936 | Parameters |
| 4937 | envhp (IN/OUT) - OCI environment handle initialized in object mode. |
| 4938 | errhp (IN/OUT) - error handle. The OCI error handle. If there is an error, it |
| 4939 | is recorded in err and this function returns OCI_ERROR. Diagnostic |
| 4940 | information can be obtained by calling OCIErrorGet(). |
| 4941 | locp (IN) - the LOB locator being tested |
| 4942 | is_initialized (OUT) - returns TRUE if the given LOB locator is initialized; |
| 4943 | FALSE if it is not. |
| 4944 | |
| 4945 | See also |
| 4946 | OCIErrorGet, OCILobIsEqual |
| 4947 | |
| 4948 | |
| 4949 | |
| 4950 | |
| 4951 | OCILobRead() |
| 4952 | |
| 4953 | Name |
| 4954 | OCI Lob/File ReaD |
| 4955 | |
| 4956 | Purpose |
| 4957 | Reads a portion of a LOB/FILE as specified by the call into a buffer. |
| 4958 | |
| 4959 | Syntax |
| 4960 | sword OCILobRead ( OCISvcCtx *svchp, |
| 4961 | OCIError *errhp, |
| 4962 | OCILobLocator *locp, |
| 4963 | ub4 offset, |
| 4964 | ub4 *amtp, |
| 4965 | void *bufp, |
| 4966 | ub4 bufl, |
| 4967 | void *ctxp, |
| 4968 | OCICallbackLobRead cbfp, |
| 4969 | ub2 csid, |
| 4970 | ub1 csfrm ); |
| 4971 | |
| 4972 | Comments |
| 4973 | Reads a portion of a LOB/FILE as specified by the call into a buffer. Data |
| 4974 | read from a hole is returned as 0s. It is an error to try to read from a NULL |
| 4975 | LOB/FILE. The OS FILE must already exist on the server and must have been |
| 4976 | opened using the input locator. Oracle must hav epermission to read the OS |
| 4977 | file and user must have read permission on the directory object. |
| 4978 | |
| 4979 | Parameters |
| 4980 | svchp (IN/OUT) - the service context handle. |
| 4981 | errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for |
| 4982 | diagnostic information in the event of an error. |
| 4983 | locp (IN/OUT) - a LOB locator that uniquely references a LOB. |
| 4984 | offset (IN) - On input, it is the absolute offset, for character LOBs in the |
| 4985 | number of characters from the beginning of the LOB, for binary LOBs it is the |
| 4986 | number of bytes. Starts from 1. |
| 4987 | amtp (IN/OUT) - On input, the number of character or bytes to be read. On |
| 4988 | output, the actual number of bytes or characters read. |
| 4989 | If the amount of bytes to be read is larger than the buffer length it is |
| 4990 | assumed that the LOB is being read in a streamed mode. On input if this value |
| 4991 | is 0, then the data shall be read in streamed mode from the LOB until the end |
| 4992 | of LOB. If the data is read in pieces, *amtp always contains the length of |
| 4993 | the last piece read. If a callback function is defined, then this callback |
| 4994 | function will be invoked each time bufl bytes are read off the pipe. Each |
| 4995 | piece will be written into bufp. |
| 4996 | If the callback function is not defined, then OCI_NEED_DATA error code will |
| 4997 | be returned. The application must invoke the LOB read over and over again to |
| 4998 | read more pieces of the LOB until the OCI_NEED_DATA error code is not |
| 4999 | returned. The buffer pointer and the length can be different in each call |
| 5000 | if the pieces are being read into different sizes and location. |
| 5001 | bufp (IN) - the pointer to a buffer into which the piece will be read. The |
| 5002 | length of the allocated memory is assumed to be bufl. |
| 5003 | bufl (IN) - the length of the buffer in octets. |
| 5004 | ctxp (IN) - the context for the call back function. Can be NULL. |
| 5005 | cbfp (IN) - a callback that may be registered to be called for each piece. If |
| 5006 | this is NULL, then OCI_NEED_DATA will be returned for each piece. |
| 5007 | The callback function must return OCI_CONTINUE for the read to continue. |
| 5008 | If any other error code is returned, the LOB read is aborted. |
| 5009 | ctxp (IN) - the context for the call back function. Can be NULL. |
| 5010 | bufp (IN) - a buffer pointer for the piece. |
| 5011 | len (IN) - the length of length of current piece in bufp. |
| 5012 | piece (IN) - which piece - OCI_FIRST_PIECE, OCI_NEXT_PIECE or |
| 5013 | OCI_LAST_PIECE. |
| 5014 | csid - the character set ID of the buffer data |
| 5015 | csfrm - the character set form of the buffer data |
| 5016 | |
| 5017 | Related Functions |
| 5018 | OCIErrorGet, OCILobWrite, OCILobFileOpen, OCILobFileSetName, CREATE DIRECTORY |
| 5019 | |
| 5020 | |
| 5021 | |
| 5022 | |
| 5023 | OCILobTrim() |
| 5024 | |
| 5025 | Name |
| 5026 | |
| 5027 | OCI Lob Trim |
| 5028 | |
| 5029 | Purpose |
| 5030 | Trims the lob value to a shorter length |
| 5031 | |
| 5032 | Syntax |
| 5033 | sword OCILobTrim ( OCISvcCtx *svchp, |
| 5034 | OCIError *errhp, |
| 5035 | OCILobLocator *locp, |
| 5036 | ub4 newlen ); |
| 5037 | |
| 5038 | Comments |
| 5039 | Truncates LOB data to a specified shorter length. |
| 5040 | |
| 5041 | Parameters |
| 5042 | svchp (IN) - the service context handle. |
| 5043 | errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for |
| 5044 | diagnostic information in the event of an error. |
| 5045 | locp (IN/OUT) - a LOB locator that uniquely references the LOB. This locator |
| 5046 | must be a locator that was obtained from the server specified by svchp. |
| 5047 | newlen (IN) - the new length of the LOB data, which must be less than or equal |
| 5048 | to the current length. |
| 5049 | |
| 5050 | Related Functions |
| 5051 | OCIErrorGet, OCILobWrite, OCiLobErase, OCILobAppend, OCILobCopy |
| 5052 | |
| 5053 | |
| 5054 | |
| 5055 | |
| 5056 | |
| 5057 | OCILobWrite() |
| 5058 | |
| 5059 | Name |
| 5060 | OCI Lob Write |
| 5061 | |
| 5062 | Purpose |
| 5063 | Writes a buffer into a LOB |
| 5064 | |
| 5065 | Syntax |
| 5066 | sword OCILobWrite ( OCISvcCtx *svchp, |
| 5067 | OCIError *errhp, |
| 5068 | OCILobLocator *locp, |
| 5069 | ub4 offset, |
| 5070 | ub4 *amtp, |
| 5071 | void *bufp, |
| 5072 | ub4 buflen, |
| 5073 | ub1 piece, |
| 5074 | void *ctxp, |
| 5075 | OCICallbackLobWrite (cbfp) |
| 5076 | ( |
| 5077 | void *ctxp, |
| 5078 | void *bufp, |
| 5079 | ub4 *lenp, |
| 5080 | ub1 *piecep ) |
| 5081 | ub2 csid |
| 5082 | ub1 csfrm ); |
| 5083 | |
| 5084 | |
| 5085 | Comments |
| 5086 | Writes a buffer into a LOB as specified. If LOB data already exists |
| 5087 | it is overwritten with the data stored in the buffer. |
| 5088 | The buffer can be written to the LOB in a single piece with this call, or |
| 5089 | it can be provided piecewise using callbacks or a standard polling method. |
| 5090 | If this value of the piece parameter is OCI_FIRST_PIECE, data must be |
| 5091 | provided through callbacks or polling. |
| 5092 | If a callback function is defined in the cbfp parameter, then this callback |
| 5093 | function will be invoked to get the next piece after a piece is written to |
| 5094 | the pipe. Each piece will be written from bufp. |
| 5095 | If no callback function is defined, then OCILobWrite() returns the |
| 5096 | OCI_NEED_DATA error code. The application must all OCILobWrite() again |
| 5097 | to write more pieces of the LOB. In this mode, the buffer pointer and the |
| 5098 | length can be different in each call if the pieces are of different sizes and |
| 5099 | from different locations. A piece value of OCI_LAST_PIECE terminates the |
| 5100 | piecewise write. |
| 5101 | |
| 5102 | Parameters |
| 5103 | svchp (IN/OUT) - the service context handle. |
| 5104 | errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for |
| 5105 | diagnostic information in the event of an error. |
| 5106 | locp (IN/OUT) - a LOB locator that uniquely references a LOB. |
| 5107 | offset (IN) - On input, it is the absolute offset, for character LOBs in |
| 5108 | the number of characters from the beginning of the LOB, for binary LOBs it |
| 5109 | is the number of bytes. Starts at 1. |
| 5110 | bufp (IN) - the pointer to a buffer from which the piece will be written. The |
| 5111 | length of the allocated memory is assumed to be the value passed in bufl. |
| 5112 | Even if the data is being written in pieces, bufp must contain the first |
| 5113 | piece of the LOB when this call is invoked. |
| 5114 | bufl (IN) - the length of the buffer in bytes. |
| 5115 | Note: This parameter assumes an 8-bit byte. If your platform uses a |
| 5116 | longer byte, the value of bufl must be adjusted accordingly. |
| 5117 | piece (IN) - which piece of the buffer is being written. The default value for |
| 5118 | this parameter is OCI_ONE_PIECE, indicating the buffer will be written in a |
| 5119 | single piece. |
| 5120 | The following other values are also possible for piecewise or callback mode: |
| 5121 | OCI_FIRST_PIECE, OCI_NEXT_PIECE and OCI_LAST_PIECE. |
| 5122 | amtp (IN/OUT) - On input, takes the number of character or bytes to be |
| 5123 | written. On output, returns the actual number of bytes or characters written. |
| 5124 | If the data is written in pieces, *amtp will contain the total length of the |
| 5125 | pieces written at the end of the call (last piece written) and is undefined in |
| 5126 | between. |
| 5127 | (Note it is different from the piecewise read case) |
| 5128 | ctxp (IN) - the context for the call back function. Can be NULL. |
| 5129 | cbfp (IN) - a callback that may be registered to be called for each piece in |
| 5130 | a piecewise write. If this is NULL, the standard polling method will be used. |
| 5131 | The callback function must return OCI_CONTINUE for the write to continue. |
| 5132 | If any other error code is returned, the LOB write is aborted. The |
| 5133 | callback takes the following parameters: |
| 5134 | ctxp (IN) - the context for the call back function. Can be NULL. |
| 5135 | bufp (IN/OUT) - a buffer pointer for the piece. |
| 5136 | lenp (IN/OUT) - the length of the buffer (in octets) and the length of |
| 5137 | current piece in bufp (out octets). |
| 5138 | piecep (OUT) - which piece - OCI_NEXT_PIECE or OCI_LAST_PIECE. |
| 5139 | csid - the character set ID of the buffer data |
| 5140 | csfrm - the character set form of the buffer data |
| 5141 | Related Functions |
| 5142 | |
| 5143 | OCILobWriteAppend() |
| 5144 | |
| 5145 | Name |
| 5146 | OCI Lob Write Append |
| 5147 | |
| 5148 | Purpose |
| 5149 | Writes data to the end of a LOB value. This call provides the ability |
| 5150 | to get the length of the data and append it to the end of the LOB in |
| 5151 | a single round trip to the server. |
| 5152 | |
| 5153 | Syntax |
| 5154 | sword OCILobWriteAppend ( OCISvcCtx *svchp, |
| 5155 | OCIError *errhp, |
| 5156 | OCILobLocator *locp, |
| 5157 | ub4 *amtp, |
| 5158 | void *bufp, |
| 5159 | ub4 buflen, |
| 5160 | ub1 piece, |
| 5161 | void *ctxp, |
| 5162 | OCICallbackLobWrite (cbfp) |
| 5163 | ( |
| 5164 | void *ctxp, |
| 5165 | void *bufp, |
| 5166 | ub4 *lenp, |
| 5167 | ub1 *piecep ) |
| 5168 | ub2 csid |
| 5169 | ub1 csfrm ); |
| 5170 | |
| 5171 | |
| 5172 | Comments |
| 5173 | Writes a buffer to the end of a LOB as specified. If LOB data already exists |
| 5174 | it is overwritten with the data stored in the buffer. |
| 5175 | The buffer can be written to the LOB in a single piece with this call, or |
| 5176 | it can be provided piecewise using callbacks or a standard polling method. |
| 5177 | If this value of the piece parameter is OCI_FIRST_PIECE, data must be |
| 5178 | provided through callbacks or polling. |
| 5179 | If a callback function is defined in the cbfp parameter, then this callback |
| 5180 | function will be invoked to get the next piece after a piece is written to the |
| 5181 | pipe. Each piece will be written from bufp. |
| 5182 | If no callback function is defined, then OCILobWriteAppend() returns the |
| 5183 | OCI_NEED_DATA error code. The application must all OCILobWriteAppend() again |
| 5184 | to write more pieces of the LOB. In this mode, the buffer pointer and the |
| 5185 | length can be different in each call if the pieces are of different sizes and |
| 5186 | from different locations. A piece value of OCI_LAST_PIECE terminates the |
| 5187 | piecewise write. |
| 5188 | |
| 5189 | Parameters |
| 5190 | svchp (IN/OUT) - the service context handle. |
| 5191 | errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for |
| 5192 | diagnostic information in the event of an error. |
| 5193 | locp (IN/OUT) - a LOB locator that uniquely references a LOB. |
| 5194 | bufp (IN) - the pointer to a buffer from which the piece will be written. The |
| 5195 | length of the allocated memory is assumed to be the value passed in bufl. Even |
| 5196 | if the data is being written in pieces, bufp must contain the first piece of |
| 5197 | the LOB when this call is invoked. |
| 5198 | bufl (IN) - the length of the buffer in bytes. |
| 5199 | Note: This parameter assumes an 8-bit byte. If your platform uses a |
| 5200 | longer byte, the value of bufl must be adjusted accordingly. |
| 5201 | piece (IN) - which piece of the buffer is being written. The default value for |
| 5202 | this parameter is OCI_ONE_PIECE, indicating the buffer will be written in a |
| 5203 | single piece. |
| 5204 | The following other values are also possible for piecewise or callback mode: |
| 5205 | OCI_FIRST_PIECE, OCI_NEXT_PIECE and OCI_LAST_PIECE. |
| 5206 | amtp (IN/OUT) - On input, takes the number of character or bytes to be |
| 5207 | written. On output, returns the actual number of bytes or characters written. |
| 5208 | If the data is written in pieces, *amtp will contain the total length of the |
| 5209 | pieces written at the end of the call (last piece written) and is undefined in |
| 5210 | between. |
| 5211 | (Note it is different from the piecewise read case) |
| 5212 | ctxp (IN) - the context for the call back function. Can be NULL. |
| 5213 | cbfp (IN) - a callback that may be registered to be called for each piece in a |
| 5214 | piecewise write. If this is NULL, the standard polling method will be used. |
| 5215 | The callback function must return OCI_CONTINUE for the write to continue. |
| 5216 | If any other error code is returned, the LOB write is aborted. The |
| 5217 | callback takes the following parameters: |
| 5218 | ctxp (IN) - the context for the call back function. Can be NULL. |
| 5219 | bufp (IN/OUT) - a buffer pointer for the piece. |
| 5220 | lenp (IN/OUT) - the length of the buffer (in octets) and the length of |
| 5221 | current piece in bufp (out octets). |
| 5222 | piecep (OUT) - which piece - OCI_NEXT_PIECE or OCI_LAST_PIECE. |
| 5223 | csid - the character set ID of the buffer data |
| 5224 | csfrm - the character set form of the buffer data |
| 5225 | Related Functions |
| 5226 | |
| 5227 | |
| 5228 | |
| 5229 | |
| 5230 | OCILobGetStorageLimit() |
| 5231 | |
| 5232 | Name |
| 5233 | OCI Lob Get Storage Limit |
| 5234 | |
| 5235 | Purpose |
| 5236 | To get the maximum Length of a LOB in bytes that can be stored in the database. |
| 5237 | |
| 5238 | Syntax |
| 5239 | sword OCILobGetStorageLimit ( OCISvcCtx *svchp, |
| 5240 | OCIError *errhp, |
| 5241 | OCILobLocator *locp, |
| 5242 | oraub8 *limitp); |
| 5243 | |
| 5244 | |
| 5245 | Comments |
| 5246 | With unlimited size LOB support the limit for a LOB is no longer restricted |
| 5247 | to 4GB. |
| 5248 | This interface should be used to get the actual limit for storing data for |
| 5249 | a specific |
| 5250 | LOB locator. Note that if the compatibality is set to 9.2 or older the limit |
| 5251 | would still be 4GB. |
| 5252 | |
| 5253 | Parameters |
| 5254 | svchp (IN/OUT) - the service context handle. |
| 5255 | errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for |
| 5256 | diagnostic information in the event of an error. |
| 5257 | locp (IN/OUT) - a LOB locator that uniquely references a LOB. |
| 5258 | limitp (OUT) - The storage limit for a LOB in bytes. |
| 5259 | Related Functions |
| 5260 | |
| 5261 | |
| 5262 | |
| 5263 | |
| 5264 | OCILobGetOptions() |
| 5265 | |
| 5266 | Name |
| 5267 | OCI Lob Get Options |
| 5268 | |
| 5269 | Purpose |
| 5270 | To get the current options set for the given SecureFile. |
| 5271 | |
| 5272 | Syntax |
| 5273 | sword OCILobGetOptions ( OCISvcCtx *svchp, |
| 5274 | OCIError *errhp, |
| 5275 | OCILobLocator *locp, |
| 5276 | ub4 optypes, |
| 5277 | void *optionsp, |
| 5278 | ub4 *optionslenp, |
| 5279 | ub4 mode); |
| 5280 | |
| 5281 | |
| 5282 | Comments |
| 5283 | This function only works on SecureFiles. All others will get an error. |
| 5284 | |
| 5285 | Parameters |
| 5286 | svchp (IN/OUT) - the service context handle. |
| 5287 | errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for |
| 5288 | diagnostic information in the event of an error. |
| 5289 | locp (IN/OUT) - a LOB locator that uniquely references a LOB. |
| 5290 | optypes (IN) - the types of options flags to be retrieved. |
| 5291 | optionsp (OUT) - the options flags or value for the given types. |
| 5292 | optionslenp (IN/OUT) - the length of option_value buffer |
| 5293 | mode (IN) - for future use (pass 0 for now). |
| 5294 | Related Functions |
| 5295 | OCISetOptions() |
| 5296 | |
| 5297 | OCILobSetOptions() |
| 5298 | |
| 5299 | Name |
| 5300 | OCI Lob Set Options |
| 5301 | |
| 5302 | Purpose |
| 5303 | To set the options for the given SecureFile Lob. |
| 5304 | |
| 5305 | Syntax |
| 5306 | sword OCILobSetOptions ( OCISvcCtx *svchp, |
| 5307 | OCIError *errhp, |
| 5308 | OCILobLocator *locp, |
| 5309 | ub4 optypes, |
| 5310 | void *optionsp, |
| 5311 | ub4 optionslen, |
| 5312 | ub4 mode); |
| 5313 | |
| 5314 | |
| 5315 | Comments |
| 5316 | This function only works on SecureFile Lobs. All others will get an error. |
| 5317 | |
| 5318 | Parameters |
| 5319 | svchp (IN/OUT) - the service context handle. |
| 5320 | errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for |
| 5321 | diagnostic information in the event of an error. |
| 5322 | locp (IN/OUT) - a LOB locator that uniquely references a LOB. |
| 5323 | optypes (IN) - the types of options flags to be set. |
| 5324 | optionsp (IN) - the options flags or value to be set for the given types. |
| 5325 | optionslen (IN) - then length of option_value buffer |
| 5326 | mode (IN) - for future use (pass 0 for now). |
| 5327 | Related Functions |
| 5328 | OCILobGetOptions() |
| 5329 | |
| 5330 | OCILobGetContentType() |
| 5331 | |
| 5332 | Name |
| 5333 | OCI Lob Get Content Type |
| 5334 | |
| 5335 | Purpose |
| 5336 | To get the current contenttype set for the given SecureFile. |
| 5337 | |
| 5338 | Syntax |
| 5339 | sword OCILobGetContentType (OCISvcCtx *svchp, |
| 5340 | OCIError *errhp, |
| 5341 | OCILobLocator *locp, |
| 5342 | oratext *contenttypep, |
| 5343 | ub4 *contenttypelenp, |
| 5344 | ub4 mode); |
| 5345 | |
| 5346 | |
| 5347 | Comments |
| 5348 | This function only works on SecureFiles. All others will get an error. |
| 5349 | If the securefile does not have a contenttype associated with it, |
| 5350 | the contenttype length (= *contenttypelenp) is returned as 0 without |
| 5351 | modifying the buffer contenttypep. |
| 5352 | Parameters |
| 5353 | svchp (IN/OUT) - the service context handle. |
| 5354 | errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for |
| 5355 | diagnostic information in the event of an error. |
| 5356 | locp (IN/OUT) - a LOB locator that uniquely references a LOB. |
| 5357 | contenttypep(IN/OUT)- pointer to the buffer where the contenttype is stored |
| 5358 | after successful execution. |
| 5359 | The caller needs to allocate the buffer before calling |
| 5360 | this function. The size of the allocated buffer should |
| 5361 | be >= OCI_LOB_CONTENTTYPE_MAXSIZE bytes |
| 5362 | contenttypelenp(IN/OUT)- The caller should set this field to the size |
| 5363 | of contenttypep buffer. |
| 5364 | After the call successfully executes, it will hold the |
| 5365 | size of the contenttype returned. |
| 5366 | mode (IN) - for future use (pass 0 for now). |
| 5367 | Related Functions |
| 5368 | OCISetContentType() |
| 5369 | |
| 5370 | OCILobSetContentType() |
| 5371 | |
| 5372 | Name |
| 5373 | OCI Lob Set Content Type |
| 5374 | |
| 5375 | Purpose |
| 5376 | To set the contenttype for the given SecureFile Lob. |
| 5377 | |
| 5378 | Syntax |
| 5379 | sword OCILobSetContentType (OCISvcCtx *svchp, |
| 5380 | OCIError *errhp, |
| 5381 | OCILobLocator *locp, |
| 5382 | const oratext *contenttypep, |
| 5383 | ub4 contenttypelen, |
| 5384 | ub4 mode); |
| 5385 | |
| 5386 | |
| 5387 | Comments |
| 5388 | This function only works on SecureFiles. All others will get an error. |
| 5389 | To clear an existing contenttype set on a securefile, the user will |
| 5390 | invoke OCILobSetContentType API with contenttypep set to (oratext *)0, |
| 5391 | and contenttypelen set to 0. |
| 5392 | Parameters |
| 5393 | svchp (IN/OUT) - the service context handle. |
| 5394 | errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for |
| 5395 | diagnostic information in the event of an error. |
| 5396 | locp (IN/OUT) - a LOB locator that uniquely references a LOB. |
| 5397 | contenttypep (IN) - the contenttype to be set for the given LOB. |
| 5398 | contenttypelen(IN) - the size of contenttype in bytes. The size of the |
| 5399 | contenttype should be <= OCI_LOB_CONTENTTYPE_MAXSIZE |
| 5400 | bytes. |
| 5401 | mode (IN) - for future use (pass 0 for now). |
| 5402 | Related Functions |
| 5403 | OCILobGetContentType() |
| 5404 | |
| 5405 | |
| 5406 | OCILogoff() |
| 5407 | Name |
| 5408 | OCI simplified Logoff |
| 5409 | Purpose |
| 5410 | This function is used to terminate a session created with OCILogon() or |
| 5411 | OCILogon2(). |
| 5412 | Syntax |
| 5413 | sword OCILogoff ( OCISvcCtx *svchp |
| 5414 | OCIError *errhp ); |
| 5415 | Comments |
| 5416 | This call is used to terminate a session which was created with OCILogon() or |
| 5417 | OCILogon2(). |
| 5418 | This call implicitly deallocates the server, authentication, and service |
| 5419 | context handles. |
| 5420 | Note: For more information on logging on and off in an application, |
| 5421 | refer to the section "Application Initialization, Connection, and |
| 5422 | Authorization" on page 2-16. |
| 5423 | Parameters |
| 5424 | svchp (IN) - the service context handle which was used in the call to |
| 5425 | OCILogon() or OCILogon2(). |
| 5426 | errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for |
| 5427 | diagnostic information in the event of an error. |
| 5428 | See Also |
| 5429 | OCILogon(), OCILogon2(). |
| 5430 | |
| 5431 | |
| 5432 | |
| 5433 | |
| 5434 | |
| 5435 | |
| 5436 | OCILogon() |
| 5437 | Name |
| 5438 | OCI Service Context Logon |
| 5439 | Purpose |
| 5440 | This function is used to create a simple logon session. |
| 5441 | Syntax |
| 5442 | sword OCILogon ( OCIEnv *envhp, |
| 5443 | OCIError *errhp, |
| 5444 | OCISvcCtx *svchp, |
| 5445 | const OraText *username, |
| 5446 | ub4 uname_len, |
| 5447 | const OraText *password, |
| 5448 | ub4 passwd_len, |
| 5449 | const OraText *dbname, |
| 5450 | ub4 dbname_len ); |
| 5451 | Comments |
| 5452 | This function is used to create a simple logon session for an application. |
| 5453 | Note: Users requiring more complex session (e.g., TP monitor |
| 5454 | applications) should refer to the section "Application Initialization, |
| 5455 | Connection, and Authorization" on page 2-16. |
| 5456 | This call allocates the error and service context handles which are passed to |
| 5457 | it. This call also implicitly allocates server and authentication handles |
| 5458 | associated with the session. These handles can be retrieved by calling |
| 5459 | OCIAttrGet() on the service context handle. |
| 5460 | Parameters |
| 5461 | envhp (IN) - the OCI environment handle. |
| 5462 | errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for |
| 5463 | diagnostic information in the event of an error. |
| 5464 | svchp (OUT) - the service context pointer. |
| 5465 | username (IN) - the username. |
| 5466 | uname_len (IN) - the length of username. |
| 5467 | password (IN) - the user's password. |
| 5468 | passwd_len (IN) - the length of password. |
| 5469 | dbname (IN) - the name of the database to connect to. |
| 5470 | dbname_len (IN) - the length of dbname. |
| 5471 | See Also |
| 5472 | OCILogoff() |
| 5473 | |
| 5474 | |
| 5475 | |
| 5476 | |
| 5477 | |
| 5478 | OCILogon2() |
| 5479 | Name |
| 5480 | OCI Service Context Logon |
| 5481 | Purpose |
| 5482 | This function is used to create a logon session in connection pooling mode. |
| 5483 | Syntax |
| 5484 | sword OCILogon2 ( OCIEnv *envhp, |
| 5485 | OCIError *errhp, |
| 5486 | OCISvcCtx **svchp, |
| 5487 | const OraText *username, |
| 5488 | ub4 uname_len, |
| 5489 | const OraText *password, |
| 5490 | ub4 passwd_len, |
| 5491 | const OraText *dbname, |
| 5492 | ub4 dbname_len, |
| 5493 | ub4 mode); |
| 5494 | Comments |
| 5495 | This function is used to create a simple logon session for an application in |
| 5496 | Connection Pooling mode. The valid values for mode are currently OCI_POOL and |
| 5497 | OCI_DEFAULT. Call to this function with OCI_DEFAULT mode is equivalent to |
| 5498 | OCILogon() call. |
| 5499 | This call allocates the error and service context handles which are passed to |
| 5500 | it. This call also implicitly allocates server and authentication handles |
| 5501 | associated with the session. These handles can be retrieved by calling |
| 5502 | OCIAttrGet() on the service context handle. This call assumes that |
| 5503 | OCIConnectionPoolCreate() has already been called for the same dbname. |
| 5504 | Parameters |
| 5505 | envhp (IN) - the OCI environment handle. |
| 5506 | errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for |
| 5507 | diagnostic information in the event of an error. |
| 5508 | svchp (OUT) - the service context pointer. |
| 5509 | username (IN) - the username. |
| 5510 | uname_len (IN) - the length of username. |
| 5511 | password (IN) - the user's password. If this is null, it is assumed that a |
| 5512 | proxy session has to be created and the required grants on |
| 5513 | the database are already done. |
| 5514 | passwd_len (IN) - the length of password. |
| 5515 | dbname (IN) - the name of the database to connect to. |
| 5516 | dbname_len (IN) - the length of dbname. |
| 5517 | mode (IN) - the mode for doing the server attach. Should be OCI_POOL for |
| 5518 | using Connection Pooling. |
| 5519 | |
| 5520 | |
| 5521 | See Also |
| 5522 | OCILogoff() |
| 5523 | |
| 5524 | |
| 5525 | |
| 5526 | |
| 5527 | |
| 5528 | OCIMemoryFree() |
| 5529 | Name |
| 5530 | OCI FREE Memory |
| 5531 | Purpose |
| 5532 | Frees up storage associated with the pointer. |
| 5533 | Syntax |
| 5534 | void OCIMemoryFree ( const OCIStmt *stmhp, |
| 5535 | void *memptr); |
| 5536 | Comments |
| 5537 | Frees up dynamically allocated data pointers associated with the pointer using |
| 5538 | either the default memory free function or the registered memory free |
| 5539 | function, as the case may be. |
| 5540 | A user-defined memory free function can be registered during the initial call |
| 5541 | to OCIInitialize(). |
| 5542 | This call is always successful. |
| 5543 | Parameters |
| 5544 | stmhp (IN) - statement handle which returned this data buffer. |
| 5545 | memptr (IN) - pointer to data allocated by the client library. |
| 5546 | Related Functions |
| 5547 | OCIInitialize() |
| 5548 | |
| 5549 | |
| 5550 | |
| 5551 | |
| 5552 | |
| 5553 | OCIParamGet() |
| 5554 | Name |
| 5555 | OCI Get PARaMeter |
| 5556 | Purpose |
| 5557 | Returns a descriptor of a parameter specified by position in the describe |
| 5558 | handle or statement handle. |
| 5559 | Syntax |
| 5560 | sword OCIParamGet ( const void *hndlp, |
| 5561 | ub4 htype, |
| 5562 | OCIError *errhp, |
| 5563 | void **parmdpp, |
| 5564 | ub4 pos ); |
| 5565 | Comments |
| 5566 | This call returns a descriptor of a parameter specified by position in the |
| 5567 | describe handle or statement handle. Parameter descriptors are always |
| 5568 | allocated internally by the OCI library. They are read-only. |
| 5569 | OCI_NO_DATA may be returned if there are no parameter descriptors for this |
| 5570 | position. |
| 5571 | See Appendix B for more detailed information about parameter descriptor |
| 5572 | attributes. |
| 5573 | Parameters |
| 5574 | hndlp (IN) - a statement handle or describe handle. The OCIParamGet() |
| 5575 | function will return a parameter descriptor for this handle. |
| 5576 | htype (IN) - the type of the handle passed in the handle parameter. Valid |
| 5577 | types are OCI_HTYPE_DESCRIBE, for a describe handle OCI_HTYPE_STMT, for a |
| 5578 | statement handle |
| 5579 | errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for |
| 5580 | diagnostic information in the event of an error. |
| 5581 | parmdpp (OUT) - a descriptor of the parameter at the position given in the pos |
| 5582 | parameter. |
| 5583 | pos (IN) - position number in the statement handle or describe handle. A |
| 5584 | parameter descriptor will be returned for this position. |
| 5585 | Note: OCI_NO_DATA may be returned if there are no parameter |
| 5586 | descriptors for this position. |
| 5587 | Related Functions |
| 5588 | OCIAttrGet(), OCIAttrSet() |
| 5589 | |
| 5590 | |
| 5591 | |
| 5592 | |
| 5593 | |
| 5594 | OCIParamSet() |
| 5595 | Name |
| 5596 | OCI Parameter Set in handle |
| 5597 | Purpose |
| 5598 | Used to set a complex object retrieval descriptor into a complex object |
| 5599 | retrieval handle. |
| 5600 | Syntax |
| 5601 | sword OCIParamGet ( void *hndlp, |
| 5602 | ub4 htyp, |
| 5603 | OCIError *errhp, |
| 5604 | const void *dscp, |
| 5605 | ub4 dtyp, |
| 5606 | ub4 pos ); |
| 5607 | Comments |
| 5608 | This call sets a given complex object retrieval descriptor into a complex |
| 5609 | object retrieval handle. |
| 5610 | The handle must have been previously allocated using OCIHandleAlloc(), and |
| 5611 | the descriptor must have been previously allocated using OCIDescAlloc(). |
| 5612 | Attributes of the descriptor are set using OCIAttrSet(). |
| 5613 | Parameters |
| 5614 | hndlp (IN/OUT) - handle pointer. |
| 5615 | htype (IN) - handle type. |
| 5616 | errhp (IN/OUT) - error handle. |
| 5617 | dscp (IN) - complex object retrieval descriptor pointer. |
| 5618 | dtyp (IN) - |
| 5619 | pos (IN) - position number. |
| 5620 | See Also |
| 5621 | |
| 5622 | |
| 5623 | |
| 5624 | |
| 5625 | |
| 5626 | OCIPasswordChange() |
| 5627 | Name |
| 5628 | OCI Change PassWord |
| 5629 | Purpose |
| 5630 | This call allows the password of an account to be changed. |
| 5631 | Syntax |
| 5632 | sword OCIPasswordChange ( OCISvcCtx *svchp, |
| 5633 | OCIError *errhp, |
| 5634 | const OraText *user_name, |
| 5635 | ub4 usernm_len, |
| 5636 | const OraText *opasswd, |
| 5637 | ub4 opasswd_len, |
| 5638 | const OraText *npasswd, |
| 5639 | sb4 npasswd_len, |
| 5640 | ub4 mode); |
| 5641 | Comments |
| 5642 | This call allows the password of an account to be changed. This call is |
| 5643 | similar to OCISessionBegin() with the following differences: |
| 5644 | If the user authentication is already established, it authenticates |
| 5645 | the account using the old password and then changes the |
| 5646 | password to the new password |
| 5647 | If the user authentication is not established, it establishes a user |
| 5648 | authentication and authenticates the account using the old |
| 5649 | password, then changes the password to the new password. |
| 5650 | This call is useful when the password of an account is expired and |
| 5651 | OCISessionBegin() returns an error or warning which indicates that the |
| 5652 | password has expired. |
| 5653 | Parameters |
| 5654 | svchp (IN/OUT) - a handle to a service context. The service context handle |
| 5655 | must be initialized and have a server context handle associated with it. |
| 5656 | errhp (IN) - an error handle which can be passed to OCIErrorGet() for |
| 5657 | diagnostic information in the event of an error. |
| 5658 | user_name (IN) - specifies the user name. It points to a character string, |
| 5659 | whose length is specified in usernm_len. This parameter must be NULL if the |
| 5660 | service context has been initialized with an authentication handle. |
| 5661 | usernm_len (IN) - the length of the user name string specified in user_name. |
| 5662 | For a valid user name string, usernm_len must be non-zero. |
| 5663 | opasswd (IN) - specifies the user's old password. It points to a character |
| 5664 | string, whose length is specified in opasswd_len . |
| 5665 | opasswd_len (IN) - the length of the old password string specified in opasswd. |
| 5666 | For a valid password string, opasswd_len must be non-zero. |
| 5667 | npasswd (IN) - specifies the user's new password. It points to a character |
| 5668 | string, whose length is specified in npasswd_len which must be non-zero for a |
| 5669 | valid password string. If the password complexity verification routine is |
| 5670 | specified in the user's profile to verify the new password's complexity, the |
| 5671 | new password must meet the complexity requirements of the verification |
| 5672 | function. |
| 5673 | npasswd_len (IN) - then length of the new password string specified in |
| 5674 | npasswd. For a valid password string, npasswd_len must be non-zero. |
| 5675 | mode - pass as OCI_DEFAULT. |
| 5676 | Related Functions |
| 5677 | OCISessionBegin() |
| 5678 | |
| 5679 | |
| 5680 | ----------------------------------OCIReset------------------------------------ |
| 5681 | |
| 5682 | |
| 5683 | OCIReset() |
| 5684 | Name |
| 5685 | OCI Reset |
| 5686 | Purpose |
| 5687 | Resets the interrupted asynchronous operation and protocol. Must be called |
| 5688 | if a OCIBreak call had been issued while a non-blocking operation was in |
| 5689 | progress. |
| 5690 | Syntax |
| 5691 | sword OCIReset ( void *hndlp, |
| 5692 | OCIError *errhp); |
| 5693 | Comments |
| 5694 | This call is called in non-blocking mode ONLY. Resets the interrupted |
| 5695 | asynchronous operation and protocol. Must be called if a OCIBreak call |
| 5696 | had been issued while a non-blocking operation was in progress. |
| 5697 | Parameters |
| 5698 | hndlp (IN) - the service context handle or the server context handle. |
| 5699 | errhp (IN) - an error handle which can be passed to OCIErrorGet() for |
| 5700 | diagnostic information in the event of an error. |
| 5701 | Related Functions |
| 5702 | |
| 5703 | |
| 5704 | OCIResultSetToStmt() |
| 5705 | Name |
| 5706 | OCI convert Result Set to Statement Handle |
| 5707 | Purpose |
| 5708 | Converts a descriptor to statement handle for fetching rows. |
| 5709 | Syntax |
| 5710 | sword OCIResultSetToStmt ( OCIResult *rsetdp, |
| 5711 | OCIError *errhp ); |
| 5712 | Comments |
| 5713 | Converts a descriptor to statement handle for fetching rows. |
| 5714 | A result set descriptor can be allocated with a call to OCIDescAlloc(). |
| 5715 | Parameters |
| 5716 | rsetdp (IN/OUT) - a result set descriptor pointer. |
| 5717 | errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for |
| 5718 | diagnostic information in the event of an error. |
| 5719 | Related Functions |
| 5720 | OCIDescAlloc() |
| 5721 | |
| 5722 | |
| 5723 | |
| 5724 | |
| 5725 | OCIServerAttach() |
| 5726 | Name |
| 5727 | OCI ATtaCH to server |
| 5728 | Purpose |
| 5729 | Creates an access path to a data source for OCI operations. |
| 5730 | Syntax |
| 5731 | sword OCIServerAttach ( OCIServer *srvhp, |
| 5732 | OCIError *errhp, |
| 5733 | const OraText *dblink, |
| 5734 | sb4 dblink_len, |
| 5735 | ub4 mode); |
| 5736 | Comments |
| 5737 | This call is used to create an association between an OCI application and a |
| 5738 | particular server. |
| 5739 | This call initializes a server context handle, which must have been previously |
| 5740 | allocated with a call to OCIHandleAlloc(). |
| 5741 | The server context handle initialized by this call can be associated with a |
| 5742 | service context through a call to OCIAttrSet(). Once that association has been |
| 5743 | made, OCI operations can be performed against the server. |
| 5744 | If an application is operating against multiple servers, multiple server |
| 5745 | context handles can be maintained. OCI operations are performed against |
| 5746 | whichever server context is currently associated with the service context. |
| 5747 | Parameters |
| 5748 | srvhp (IN/OUT) - an uninitialized server context handle, which gets |
| 5749 | initialized by this call. Passing in an initialized server handle causes an |
| 5750 | error. |
| 5751 | errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for |
| 5752 | diagnostic information in the event of an error. |
| 5753 | dblink (IN) - specifies the database (server) to use. This parameter points to |
| 5754 | a character string which specifies a connect string or a service point. If the |
| 5755 | connect string is NULL, then this call attaches to the default host. The length |
| 5756 | of connstr is specified in connstr_len. The connstr pointer may be freed by the |
| 5757 | caller on return. |
| 5758 | dblink_len (IN) - the length of the string pointed to by connstr. For a valid |
| 5759 | connect string name or alias, connstr_len must be non-zero. |
| 5760 | mode (IN) - specifies the various modes of operation. For release 8.0, pass as |
| 5761 | OCI_DEFAULT - in this mode, calls made to the server on this server context |
| 5762 | are made in blocking mode. |
| 5763 | Example |
| 5764 | See the description of OCIStmtPrepare() on page 13-96 for an example showing |
| 5765 | the use of OCIServerAttach(). |
| 5766 | Related Functions |
| 5767 | OCIServerDetach() |
| 5768 | |
| 5769 | |
| 5770 | |
| 5771 | OCIServerDetach() |
| 5772 | Name |
| 5773 | OCI DeTaCH server |
| 5774 | Purpose |
| 5775 | Deletes an access to a data source for OCI operations. |
| 5776 | Syntax |
| 5777 | sword OCIServerDetach ( OCIServer *svrhp, |
| 5778 | OCIError *errhp, |
| 5779 | ub4 mode); |
| 5780 | Comments |
| 5781 | This call deletes an access to data source for OCI operations, which was |
| 5782 | established by a call to OCIServerAttach(). |
| 5783 | Parameters |
| 5784 | srvhp (IN) - a handle to an initialized server context, which gets reset to |
| 5785 | uninitialized state. The handle is not de-allocated. |
| 5786 | errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for |
| 5787 | diagnostic information in the event of an error. |
| 5788 | mode (IN) - specifies the various modes of operation. The only valid mode is |
| 5789 | OCI_DEFAULT for the default mode. |
| 5790 | Related Functions |
| 5791 | OCIServerAttach() |
| 5792 | |
| 5793 | |
| 5794 | |
| 5795 | OCIServerVersion() |
| 5796 | Name |
| 5797 | OCI VERSion |
| 5798 | Purpose |
| 5799 | Returns the version string of the Oracle server. |
| 5800 | Syntax |
| 5801 | sword OCIServerVersion ( void *hndlp, |
| 5802 | OCIError *errhp, |
| 5803 | OraText *bufp, |
| 5804 | ub4 bufsz |
| 5805 | ub1 hndltype ); |
| 5806 | Comments |
| 5807 | This call returns the version string of the Oracle server. |
| 5808 | For example, the following might be returned as the version string if your |
| 5809 | application is running against a 7.3.2 server: |
| 5810 | Oracle7 Server Release 7.3.2.0.0 - Production Release |
| 5811 | PL/SQL Release 2.3.2.0.0 - Production |
| 5812 | CORE Version 3.5.2.0.0 - Production |
| 5813 | TNS for SEQUENT DYNIX/ptx: Version 2.3.2.0.0 - Production |
| 5814 | NLSRTL Version 3.2.2.0.0 - Production |
| 5815 | |
| 5816 | Parameters |
| 5817 | hndlp (IN) - the service context handle or the server context handle. |
| 5818 | errhp (IN) - an error handle which can be passed to OCIErrorGet() for |
| 5819 | diagnostic information in the event of an error. |
| 5820 | bufp (IN) - the buffer in which the version information is returned. |
| 5821 | bufsz (IN) - the length of the buffer. |
| 5822 | hndltype (IN) - the type of handle passed to the function. |
| 5823 | Related Functions |
| 5824 | |
| 5825 | |
| 5826 | |
| 5827 | |
| 5828 | |
| 5829 | OCISessionBegin() |
| 5830 | Name |
| 5831 | OCI Session Begin and authenticate user |
| 5832 | Purpose |
| 5833 | Creates a user authentication and begins a user session for a given server. |
| 5834 | Syntax |
| 5835 | sword OCISessionBegin ( OCISvcCtx *svchp, |
| 5836 | OCIError *errhp, |
| 5837 | OCISession *usrhp, |
| 5838 | ub4 credt, |
| 5839 | ub4 mode); |
| 5840 | |
| 5841 | Comments |
| 5842 | For Oracle8, OCISessionBegin() must be called for any given server handle |
| 5843 | before requests can be made against it. Also, OCISessionBegin() only supports |
| 5844 | authenticating the user for access to the Oracle server specified by the |
| 5845 | server handle in the service context. In other words, after OCIServerAttach() |
| 5846 | is called to initialize a server handle, OCISessionBegin() must be called to |
| 5847 | authenticate the user for that given server. |
| 5848 | When OCISessionBegin() is called for the first time for the given server |
| 5849 | handle, the initialized authentication handle is called a primary |
| 5850 | authentication context. A primary authentication context may not be created |
| 5851 | with the OCI_MIGRATE mode. Also, only one primary authentication context can |
| 5852 | be created for a given server handle and the primary authentication context c |
| 5853 | an only ever be used with that server handle. If the primary authentication |
| 5854 | context is set in a service handle with a different server handle, then an |
| 5855 | error will result. |
| 5856 | After OCISessionBegin() has been called for the server handle, and the primary |
| 5857 | authentication context is set in the service handle, OCISessionBegin() may be |
| 5858 | called again to initialize another authentication handle with different (or |
| 5859 | the same) credentials. When OCISessionBegin() is called with a service handle |
| 5860 | set with a primary authentication context, the returned authentication context |
| 5861 | in authp is called a user authentication context. As many user authentication |
| 5862 | contexts may be initialized as desired. |
| 5863 | User authentication contexts may be created with the OCI_MIGRATE mode. |
| 5864 | If the OCI_MIGRATE mode is not specified, then the user authentication |
| 5865 | context can only ever be used with the same server handle set in svchp. If |
| 5866 | OCI_MIGRATE mode is specified, then the user authentication may be set |
| 5867 | with different server handles. However, the user authentication context is |
| 5868 | restricted to use with only server handles which resolve to the same database |
| 5869 | instance and that have equivalent primary authentication contexts. Equivalent |
| 5870 | authentication contexts are those which were authenticated as the same |
| 5871 | database user. |
| 5872 | OCI_SYSDBA, OCI_SYSOPER, OCI_SYSASM, and OCI_PRELIM_AUTH may only be used |
| 5873 | with a primary authentication context. |
| 5874 | To provide credentials for a call to OCISessionBegin(), one of two methods are |
| 5875 | supported. The first is to provide a valid username and password pair for |
| 5876 | database authentication in the user authentication handle passed to |
| 5877 | OCISessionBegin(). This involves using OCIAttrSet() to set the |
| 5878 | OCI_ATTR_USERNAME and OCI_ATTR_PASSWORD attributes on the |
| 5879 | authentication handle. Then OCISessionBegin() is called with |
| 5880 | OCI_CRED_RDBMS. |
| 5881 | Note: When the authentication handle is terminated using |
| 5882 | OCISessionEnd(), the username and password attributes remain |
| 5883 | unchanged and thus can be re-used in a future call to OCISessionBegin(). |
| 5884 | Otherwise, they must be reset to new values before the next |
| 5885 | OCISessionBegin() call. |
| 5886 | The second type of credentials supported are external credentials. No |
| 5887 | attributes need to be set on the authentication handle before calling |
| 5888 | OCISessionBegin(). The credential type is OCI_CRED_EXT. This is equivalent |
| 5889 | to the Oracle7 `connect /' syntax. If values have been set for |
| 5890 | OCI_ATTR_USERNAME and OCI_ATTR_PASSWORD, then these are |
| 5891 | ignored if OCI_CRED_EXT is used. |
| 5892 | Parameters |
| 5893 | svchp (IN) - a handle to a service context. There must be a valid server |
| 5894 | handle set in svchp. |
| 5895 | errhp (IN) - an error handle to the retrieve diagnostic information. |
| 5896 | usrhp (IN/OUT) - a handle to an authentication context, which is initialized |
| 5897 | by this call. |
| 5898 | credt (IN) - specifies the type of credentials to use for authentication. |
| 5899 | Valid values for credt are: |
| 5900 | OCI_CRED_RDBMS - authenticate using a database username and |
| 5901 | password pair as credentials. The attributes OCI_ATTR_USERNAME |
| 5902 | and OCI_ATTR_PASSWORD should be set on the authentication |
| 5903 | context before this call. |
| 5904 | OCI_CRED_EXT - authenticate using external credentials. No username |
| 5905 | or password is provided. |
| 5906 | mode (IN) - specifies the various modes of operation. Valid modes are: |
| 5907 | OCI_DEFAULT - in this mode, the authentication context returned may |
| 5908 | only ever be set with the same server context specified in svchp. This |
| 5909 | establishes the primary authentication context. |
| 5910 | OCI_MIGRATE - in this mode, the new authentication context may be |
| 5911 | set in a service handle with a different server handle. This mode |
| 5912 | establishes the user authentication context. |
| 5913 | OCI_SYSDBA - in this mode, the user is authenticated for SYSDBA |
| 5914 | access. |
| 5915 | OCI_SYSOPER - in this mode, the user is authenticated for SYSOPER |
| 5916 | access. |
| 5917 | OCI_SYSASM - in this mode, the user is authenticated for SYSASM |
| 5918 | access. Note that only an ASM instance can grant SYSASM access. |
| 5919 | OCI_PRELIM_AUTH - this mode may only be used with OCI_SYSDBA, OCI_SYSASM, |
| 5920 | or OCI_SYSOPER to authenticate for certain administration tasks. |
| 5921 | Related Functions |
| 5922 | OCISessionEnd() |
| 5923 | |
| 5924 | |
| 5925 | |
| 5926 | |
| 5927 | |
| 5928 | |
| 5929 | OCISessionEnd() |
| 5930 | Name |
| 5931 | OCI Terminate user Authentication Context |
| 5932 | Purpose |
| 5933 | Terminates a user authentication context created by OCISessionBegin() |
| 5934 | Syntax |
| 5935 | sword OCISessionEnd ( OCISvcCtx *svchp, |
| 5936 | OCIError *errhp, |
| 5937 | OCISession *usrhp, |
| 5938 | ub4 mode); |
| 5939 | |
| 5940 | Comments |
| 5941 | The user security context associated with the service context is invalidated |
| 5942 | by this call. Storage for the authentication context is not freed. The |
| 5943 | transaction specified by the service context is implicitly committed. The |
| 5944 | transaction handle, if explicitly allocated, may be freed if not being used. |
| 5945 | Resources allocated on the server for this user are freed. |
| 5946 | The authentication handle may be reused in a new call to OCISessionBegin(). |
| 5947 | Parameters |
| 5948 | svchp (IN/OUT) - the service context handle. There must be a valid server |
| 5949 | handle and user authentication handle associated with svchp. |
| 5950 | errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for |
| 5951 | diagnostic information in the event of an error. |
| 5952 | usrhp (IN) - de-authenticate this user. If this parameter is passed as NULL, |
| 5953 | the user in the service context handle is de-authenticated. |
| 5954 | mode (IN) - the only valid mode is OCI_DEFAULT. |
| 5955 | Example |
| 5956 | In this example, an authentication context is destroyed. |
| 5957 | Related Functions |
| 5958 | OCISessionBegin() |
| 5959 | |
| 5960 | |
| 5961 | |
| 5962 | |
| 5963 | OCIStmtExecute() |
| 5964 | Name |
| 5965 | OCI EXECute |
| 5966 | Purpose |
| 5967 | This call associates an application request with a server. |
| 5968 | Syntax |
| 5969 | sword OCIStmtExecute ( OCISvcCtx *svchp, |
| 5970 | OCIStmt *stmtp, |
| 5971 | OCIError *errhp, |
| 5972 | ub4 iters, |
| 5973 | ub4 rowoff, |
| 5974 | const OCISnapshot *snap_in, |
| 5975 | OCISnapshot *snap_out, |
| 5976 | ub4 mode ); |
| 5977 | Comments |
| 5978 | This function is used to execute a prepared SQL statement. |
| 5979 | Using an execute call, the application associates a request with a server. On |
| 5980 | success, OCI_SUCCESS is returned. |
| 5981 | If a SELECT statement is executed, the description of the select list follows |
| 5982 | implicitly as a response. This description is buffered on the client side for |
| 5983 | describes, fetches and define type conversions. Hence it is optimal to |
| 5984 | describe a select list only after an execute. |
| 5985 | Also for SELECT statements, some results are available implicitly. Rows will |
| 5986 | be received and buffered at the end of the execute. For queries with small row |
| 5987 | count, a prefetch causes memory to be released in the server if the end of |
| 5988 | fetch is reached, an optimization that may result in memory usage reduction. |
| 5989 | Set attribute call has been defined to set the number of rows to be prefetched |
| 5990 | per result set. |
| 5991 | For SELECT statements, at the end of the execute, the statement handle |
| 5992 | implicitly maintains a reference to the service context on which it is |
| 5993 | executed. It is the user's responsibility to maintain the integrity of the |
| 5994 | service context. If the attributes of a service context is changed for |
| 5995 | executing some operations on this service context, the service context must |
| 5996 | be restored to have the same attributes, that a statement was executed with, |
| 5997 | prior to a fetch on the statement handle. The implicit reference is maintained |
| 5998 | until the statement handle is freed or the fetch is cancelled or an end of |
| 5999 | fetch condition is reached. |
| 6000 | Note: If output variables are defined for a SELECT statement before a |
| 6001 | call to OCIStmtExecute(), the number of rows specified by iters will be |
| 6002 | fetched directly into the defined output buffers and additional rows |
| 6003 | equivalent to the prefetch count will be prefetched. If there are no |
| 6004 | additional rows, then the fetch is complete without calling |
| 6005 | OCIStmtFetch(). |
| 6006 | The execute call will return errors if the statement has bind data types that |
| 6007 | are not supported in an Oracle7 server. |
| 6008 | Parameters |
| 6009 | svchp (IN/OUT) - service context handle. |
| 6010 | stmtp (IN/OUT) - an statement handle - defines the statement and the |
| 6011 | associated data to be executed at the server. It is invalid to pass in a |
| 6012 | statement handle that has bind of data types only supported in release 8.0 |
| 6013 | when srvchp points to an Oracle7 server. |
| 6014 | errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for |
| 6015 | diagnostic information in the event of an error. If the statement is being |
| 6016 | batched and it is successful, then this handle will contain this particular |
| 6017 | statement execution specific errors returned from the server when the batch is |
| 6018 | flushed. |
| 6019 | iters (IN) - the number of times this statement is executed for non-Select |
| 6020 | statements. For Select statements, if iters is non-zero, then defines must |
| 6021 | have been done for the statement handle. The execution fetches iters rows into |
| 6022 | these predefined buffers and prefetches more rows depending upon the prefetch |
| 6023 | row count. This function returns an error if iters=0 for non-SELECT |
| 6024 | statements. |
| 6025 | rowoff (IN) - the index from which the data in an array bind is relevant for |
| 6026 | this multiple row execution. |
| 6027 | snap_in (IN) - this parameter is optional. if supplied, must point to a |
| 6028 | snapshot descriptor of type OCI_DTYPE_SNAP. The contents of this descriptor |
| 6029 | must be obtained from the snap_out parameter of a previous call. The |
| 6030 | descriptor is ignored if the SQL is not a SELECT. This facility allows |
| 6031 | multiple service contexts to ORACLE to see the same consistent snapshot of the |
| 6032 | database's committed data. However, uncommitted data in one context is not |
| 6033 | visible to another context even using the same snapshot. |
| 6034 | snap_out (OUT) - this parameter optional. if supplied, must point to a |
| 6035 | descriptor of type OCI_DTYPE_SNAP. This descriptor is filled in with an |
| 6036 | opaque representation which is the current ORACLE "system change |
| 6037 | number" suitable as a snap_in input to a subsequent call to OCIStmtExecute(). |
| 6038 | This descriptor should not be used any longer than necessary in order to avoid |
| 6039 | "snapshot too old" errors. |
| 6040 | mode (IN) - The modes are: |
| 6041 | If OCI_DEFAULT_MODE, the default mode, is selected, the request is |
| 6042 | immediately executed. Error handle contains diagnostics on error if any. |
| 6043 | OCI_EXACT_FETCH - if the statement is a SQL SELECT, this mode is |
| 6044 | only valid if the application has set the prefetch row count prior to this |
| 6045 | call. In this mode, the OCI library will get up to the number of rows |
| 6046 | specified (i.e., prefetch row count plus iters). If the number of rows |
| 6047 | returned by the query is greater than this value, OCI_ERROR will be |
| 6048 | returned with ORA-01422 as the implementation specific error in a |
| 6049 | diagnostic record. If the number of rows returned by the query is |
| 6050 | smaller than the prefetch row count, OCI_SUCCESS_WITH_INFO will |
| 6051 | be returned with ORA-01403 as the implementation specific error. The |
| 6052 | prefetch buffer size is ignored and the OCI library tries to allocate all the |
| 6053 | space required to contain the prefetched rows. The exact fetch semantics |
| 6054 | apply to only the top level rows. No more rows can be fetched for this |
| 6055 | query at the end of the call. |
| 6056 | OCI_KEEP_FETCH_STATE - the result set rows (not yet fetched) of this |
| 6057 | statement executed in this transaction will be maintained when the |
| 6058 | transaction is detached for migration. By default, a query is cancelled |
| 6059 | when a transaction is detached for migration. This mode is the default |
| 6060 | mode when connected to a V7 server. |
| 6061 | Related Functions |
| 6062 | OCIStmtPrepare() |
| 6063 | |
| 6064 | |
| 6065 | |
| 6066 | |
| 6067 | |
| 6068 | OCIStmtFetch() |
| 6069 | Name |
| 6070 | OCI FetCH |
| 6071 | Purpose |
| 6072 | Fetches rows from a query. |
| 6073 | Syntax |
| 6074 | sword OCIStmtFetch ( OCIStmt *stmtp, |
| 6075 | OCIError *errhp, |
| 6076 | ub4 nrows, |
| 6077 | ub2 orientation, |
| 6078 | ub4 mode); |
| 6079 | Comments |
| 6080 | The fetch call is a local call, if prefetched rows suffice. However, this is |
| 6081 | transparent to the application. If LOB columns are being read, LOB locators |
| 6082 | are fetched for subsequent LOB operations to be performed on these locators. |
| 6083 | Prefetching is turned off if LONG columns are involved. |
| 6084 | A fetch with nrows set to 0 rows effectively cancels the fetch for this |
| 6085 | statement. |
| 6086 | Parameters |
| 6087 | stmtp (IN) - a statement (application request) handle. |
| 6088 | errhp (IN) - an error handle which can be passed to OCIErrorGet() for |
| 6089 | diagnostic information in the event of an error. |
| 6090 | nrows (IN) - number of rows to be fetched from the current position. |
| 6091 | orientation (IN) - for release 8.0, the only acceptable value is |
| 6092 | OCI_FETCH_NEXT, which is also the default value. |
| 6093 | mode (IN) - for release 8.0, beta-1, the following mode is defined. |
| 6094 | OCI_DEFAULT - default mode |
| 6095 | OCI_EOF_FETCH - indicates that it is the last fetch from the result set. |
| 6096 | If nrows is non-zero, setting this mode effectively cancels fetching after |
| 6097 | retrieving nrows, otherwise it cancels fetching immediately. |
| 6098 | Related Functions |
| 6099 | OCIAttrGet() |
| 6100 | |
| 6101 | OCIStmtFetch2() |
| 6102 | Name |
| 6103 | OCI FetCH2 |
| 6104 | Purpose |
| 6105 | Fetches rows from a query. |
| 6106 | Syntax |
| 6107 | sword OCIStmtFetch2 ( OCIStmt *stmtp, |
| 6108 | OCIError *errhp, |
| 6109 | ub4 nrows, |
| 6110 | ub2 orientation, |
| 6111 | ub4 scrollOffset, |
| 6112 | ub4 mode); |
| 6113 | Comments |
| 6114 | The fetch call works similar to the OCIStmtFetch call with the |
| 6115 | addition of the fetchOffset parameter. It can be used on any |
| 6116 | statement handle, whether it is scrollable or not. For a |
| 6117 | non-scrollable statement handle, the only acceptable value |
| 6118 | will be OCI_FETCH_NEXT, and the fetchOffset parameter will be |
| 6119 | ignored. Applications are encouraged to use this new call. |
| 6120 | |
| 6121 | A fetchOffset with OCI_FETCH_RELATIVE is equivalent to |
| 6122 | OCI_FETCH_CURRENT with a value of 0, is equivalent to |
| 6123 | OCI_FETCH_NEXT with a value of 1, and equivalent to |
| 6124 | OCI_FETCH_PRIOR with a value of -1. Note that the range of |
| 6125 | accessible rows is [1,OCI_ATTR_ROW_COUNT] beyond which an |
| 6126 | error could be raised if sufficient rows do not exist in |
| 6127 | |
| 6128 | The fetch call is a local call, if prefetched rows suffice. However, this is |
| 6129 | transparent to the application. If LOB columns are being read, LOB locators |
| 6130 | are fetched for subsequent LOB operations to be performed on these locators. |
| 6131 | Prefetching is turned off if LONG columns are involved. |
| 6132 | A fetch with nrows set to 0 rows effectively cancels the fetch for this |
| 6133 | statement. |
| 6134 | Parameters |
| 6135 | stmtp (IN) - a statement (application request) handle. |
| 6136 | errhp (IN) - an error handle which can be passed to OCIErrorGet() for |
| 6137 | diagnostic information in the event of an error. |
| 6138 | nrows (IN) - number of rows to be fetched from the current position. |
| 6139 | It defaults to 1 for orientation OCI_FETCH_LAST. |
| 6140 | orientation (IN) - The acceptable values are as follows, with |
| 6141 | OCI_FETCH_NEXT being the default value. |
| 6142 | OCI_FETCH_CURRENT gets the current row, |
| 6143 | OCI_FETCH_NEXT gets the next row from the current position, |
| 6144 | OCI_FETCH_FIRST gets the first row in the result set, |
| 6145 | OCI_FETCH_LAST gets the last row in the result set, |
| 6146 | OCI_FETCH_PRIOR gets the previous row from the current row in the result set, |
| 6147 | OCI_FETCH_ABSOLUTE will fetch the row number (specified by fetchOffset |
| 6148 | parameter) in the result set using absolute positioning, |
| 6149 | OCI_FETCH_RELATIVE will fetch the row number (specified by fetchOffset |
| 6150 | parameter) in the result set using relative positioning. |
| 6151 | scrollOffset(IN) - offset used with the OCI_FETCH_ABSOLUTE and |
| 6152 | OCI_FETCH_RELATIVE orientation parameters only. It specify |
| 6153 | the new current position for scrollable result set. It is |
| 6154 | ignored for non-scrollable result sets. |
| 6155 | mode (IN) - for release 8.0, beta-1, the following mode is defined. |
| 6156 | OCI_DEFAULT - default mode |
| 6157 | OCI_EOF_FETCH - indicates that it is the last fetch from the result set. |
| 6158 | If nrows is non-zero, setting this mode effectively cancels fetching after |
| 6159 | retrieving nrows, otherwise it cancels fetching immediately. |
| 6160 | Related Functions |
| 6161 | OCIAttrGet() |
| 6162 | |
| 6163 | |
| 6164 | |
| 6165 | OCIStmtGetPieceInfo() |
| 6166 | Name |
| 6167 | OCI Get Piece Information |
| 6168 | Purpose |
| 6169 | Returns piece information for a piecewise operation. |
| 6170 | Syntax |
| 6171 | sword OCIStmtGetPieceInfo( const OCIStmt *stmtp, |
| 6172 | OCIError *errhp, |
| 6173 | void **hndlpp, |
| 6174 | ub4 *typep, |
| 6175 | ub1 *in_outp, |
| 6176 | ub4 *iterp, |
| 6177 | ub4 *idxp, |
| 6178 | ub1 *piecep ); |
| 6179 | |
| 6180 | Comments |
| 6181 | When an execute/fetch call returns OCI_NEED_DATA to get/return a |
| 6182 | dynamic bind/define value or piece, OCIStmtGetPieceInfo() returns the |
| 6183 | relevant information: bind/define handle, iteration or index number and |
| 6184 | which piece. |
| 6185 | See the section "Runtime Data Allocation and Piecewise Operations" on page |
| 6186 | 5-16 for more information about using OCIStmtGetPieceInfo(). |
| 6187 | Parameters |
| 6188 | stmtp (IN) - the statement when executed returned OCI_NEED_DATA. |
| 6189 | errhp (OUT) - an error handle which can be passed to OCIErrorGet() for |
| 6190 | diagnostic information in the event of an error. |
| 6191 | hndlpp (OUT) - returns a pointer to the bind or define handle of the bind or |
| 6192 | define whose runtime data is required or is being provided. |
| 6193 | typep (OUT) - the type of the handle pointed to by hndlpp: OCI_HTYPE_BIND |
| 6194 | (for a bind handle) or OCI_HTYPE_DEFINE (for a define handle). |
| 6195 | in_outp (OUT) - returns OCI_PARAM_IN if the data is required for an IN bind |
| 6196 | value. Returns OCI_PARAM_OUT if the data is available as an OUT bind |
| 6197 | variable or a define position value. |
| 6198 | iterp (OUT) - returns the row number of a multiple row operation. |
| 6199 | idxp (OUT) - the index of an array element of a PL/SQL array bind operation. |
| 6200 | piecep (OUT) - returns one of the following defined values - |
| 6201 | OCI_ONE_PIECE, OCI_FIRST_PIECE, OCI_NEXT_PIECE and |
| 6202 | OCI_LAST_PIECE. The default value is always OCI_ONE_PIECE. |
| 6203 | Related Functions |
| 6204 | OCIAttrGet(), OCIAttrGet(), OCIStmtExecute(), OCIStmtFetch(), |
| 6205 | OCIStmtSetPieceInfo() |
| 6206 | |
| 6207 | |
| 6208 | |
| 6209 | |
| 6210 | OCIStmtPrepare() |
| 6211 | Name |
| 6212 | OCI Statement REQuest |
| 6213 | Purpose |
| 6214 | This call defines the SQL/PLSQL statement to be executed. |
| 6215 | Syntax |
| 6216 | sword OCIStmtPrepare ( OCIStmt *stmtp, |
| 6217 | OCIError *errhp, |
| 6218 | const OraText *stmt, |
| 6219 | ub4 stmt_len, |
| 6220 | ub4 language, |
| 6221 | ub4 mode); |
| 6222 | Comments |
| 6223 | This call is used to prepare a SQL or PL/SQL statement for execution. The |
| 6224 | OCIStmtPrepare() call defines an application request. |
| 6225 | This is a purely local call. Data values for this statement initialized in |
| 6226 | subsequent bind calls will be stored in a bind handle which will hang off this |
| 6227 | statement handle. |
| 6228 | This call does not create an association between this statement handle and any |
| 6229 | particular server. |
| 6230 | See the section "Preparing Statements" on page 2-21 for more information |
| 6231 | about using this call. |
| 6232 | Parameters |
| 6233 | stmtp (IN) - a statement handle. |
| 6234 | errhp (IN) - an error handle to retrieve diagnostic information. |
| 6235 | stmt (IN) - SQL or PL/SQL statement to be executed. Must be a null-terminated |
| 6236 | string. The pointer to the OraText of the statement must be available as long |
| 6237 | as the statement is executed. |
| 6238 | stmt_len (IN) - length of the statement. Must not be zero. |
| 6239 | language (IN) - V7, V8, or native syntax. Possible values are: |
| 6240 | OCI_V7_SYNTAX - V7 ORACLE parsing syntax |
| 6241 | OCI_V8_SYNTAX - V8 ORACLE parsing syntax |
| 6242 | OCI_NTV_SYNTAX - syntax depending upon the version of the server. |
| 6243 | mode (IN) - the only defined mode is OCI_DEFAULT for default mode. |
| 6244 | Example |
| 6245 | This example demonstrates the use of OCIStmtPrepare(), as well as the OCI |
| 6246 | application initialization calls. |
| 6247 | Related Functions |
| 6248 | OCIAttrGet(), OCIStmtExecute() |
| 6249 | |
| 6250 | |
| 6251 | OCIStmtPrepare2() |
| 6252 | Name |
| 6253 | OCI Statement REQuest with (a) early binding to svchp and/or |
| 6254 | (b) stmt caching |
| 6255 | Purpose |
| 6256 | This call defines the SQL/PLSQL statement to be executed. |
| 6257 | Syntax |
| 6258 | sword OCIStmtPrepare2 ( OCISvcCtx *svchp, |
| 6259 | OCIStmt **stmtp, |
| 6260 | OCIError *errhp, |
| 6261 | const OraText *stmt, |
| 6262 | ub4 stmt_len, |
| 6263 | const OraText *key, |
| 6264 | ub4 key_len, |
| 6265 | ub4 language, |
| 6266 | ub4 mode); |
| 6267 | Comments |
| 6268 | This call is used to prepare a SQL or PL/SQL statement for execution. The |
| 6269 | OCIStmtPrepare() call defines an application request. |
| 6270 | This is a purely local call. Data values for this statement initialized in |
| 6271 | subsequent bind calls will be stored in a bind handle which will hang off this |
| 6272 | statement handle. |
| 6273 | This call creates an association between the statement handle and a service |
| 6274 | context. It differs from OCIStmtPrepare in that respect.It also supports |
| 6275 | stmt caching. The stmt will automatically be cached if the authp of the stmt |
| 6276 | has enabled stmt caching. |
| 6277 | Parameters |
| 6278 | svchp (IN) - the service context handle that contains the session that |
| 6279 | this stmt handle belongs to. |
| 6280 | stmtp (OUT) - an unallocated stmt handle must be pased in. An allocated |
| 6281 | and prepared statement handle will be returned. |
| 6282 | errhp (IN) - an error handle to retrieve diagnostic information. |
| 6283 | stmt (IN) - SQL or PL/SQL statement to be executed. Must be a null- |
| 6284 | terminated string. The pointer to the OraText of the statement |
| 6285 | must be available as long as the statement is executed. |
| 6286 | stmt_len (IN) - length of the statement. Must not be zero. |
| 6287 | key (IN) - This is only Valid for OCI Stmt Caching. It indicates the |
| 6288 | key to search with. It thus optimizes the search in the cache. |
| 6289 | key_len (IN) - the length of the key. This, too, is onlly valid for stmt |
| 6290 | caching. |
| 6291 | language (IN) - V7, V8, or native syntax. Possible values are: |
| 6292 | OCI_V7_SYNTAX - V7 ORACLE parsing syntax |
| 6293 | OCI_V8_SYNTAX - V8 ORACLE parsing syntax |
| 6294 | OCI_NTV_SYNTAX - syntax depending upon the version of the server. |
| 6295 | mode (IN) - the defined modes are OCI_DEFAULT and OCI_PREP2_CACHE_SEARCHONLY. |
| 6296 | Example |
| 6297 | Related Functions |
| 6298 | OCIStmtExecute(), OCIStmtRelease() |
| 6299 | |
| 6300 | |
| 6301 | OCIStmtRelease() |
| 6302 | Name |
| 6303 | OCI Statement Release. This call is used to relesae the stmt that |
| 6304 | was retreived using OCIStmtPrepare2(). If the stmt is release |
| 6305 | using this call, OCIHandleFree() must not be called on the stmt |
| 6306 | handle. |
| 6307 | Purpose |
| 6308 | This call releases the statement obtained by OCIStmtPrepare2 |
| 6309 | Syntax |
| 6310 | sword OCIStmtRelease ( OCIStmt *stmtp, |
| 6311 | OCIError *errhp, |
| 6312 | cONST OraText *key, |
| 6313 | ub4 key_len, |
| 6314 | ub4 mode); |
| 6315 | Comments |
| 6316 | This call is used to release a handle obtained via OCIStmtPrepare2(). |
| 6317 | It also frees the memory associated with the handle. |
| 6318 | This is a purely local call. |
| 6319 | Parameters |
| 6320 | stmtp (IN/OUT) - The statement handle to be released/freed. |
| 6321 | errhp (IN) - an error handle to retrieve diagnostic information. |
| 6322 | key (IN) - This is only Valid for OCI Stmt Caching. It indicates the |
| 6323 | key to tag the stmt with. |
| 6324 | key_len (IN) - the length of the key. This, too, is only valid for stmt |
| 6325 | caching. |
| 6326 | mode (IN) - the defined modes are OCI_DEFAULT for default mode and |
| 6327 | OCI_STRLS_CACHE_DELETE (only used for Stmt Caching). |
| 6328 | Example |
| 6329 | Related Functions |
| 6330 | OCIStmtExecute(), OCIStmtPrepare2() |
| 6331 | |
| 6332 | |
| 6333 | OCIStmtSetPieceInfo() |
| 6334 | Name |
| 6335 | OCI Set Piece Information |
| 6336 | Purpose |
| 6337 | Sets piece information for a piecewise operation. |
| 6338 | Syntax |
| 6339 | sword OCIStmtSetPieceInfo ( void *hndlp, |
| 6340 | ub4 type, |
| 6341 | OCIError *errhp, |
| 6342 | const void *bufp, |
| 6343 | ub4 *alenp, |
| 6344 | ub1 piece, |
| 6345 | const void *indp, |
| 6346 | ub2 *rcodep ); |
| 6347 | Comments |
| 6348 | When an execute call returns OCI_NEED_DATA to get a dynamic IN/OUT |
| 6349 | bind value or piece, OCIStmtSetPieceInfo() sets the piece information: the |
| 6350 | buffer, the length, the indicator and which piece is currently being processed. |
| 6351 | For more information about using OCIStmtSetPieceInfo() see the section |
| 6352 | "Runtime Data Allocation and Piecewise Operations" on page 5-16. |
| 6353 | Parameters |
| 6354 | hndlp (IN/OUT) - the bind/define handle. |
| 6355 | type (IN) - type of the handle. |
| 6356 | errhp (OUT) - an error handle which can be passed to OCIErrorGet() for |
| 6357 | diagnostic information in the event of an error. |
| 6358 | bufp (IN/OUT) - bufp is a pointer to a storage containing the data value or |
| 6359 | the piece when it is an IN bind variable, otherwise bufp is a pointer to |
| 6360 | storage for getting a piece or a value for OUT binds and define variables. For |
| 6361 | named data types or REFs, a pointer to the object or REF is returned. |
| 6362 | alenp (IN/OUT) - the length of the piece or the value. |
| 6363 | piece (IN) - the piece parameter. The following are valid values: |
| 6364 | OCI_ONE_PIECE, OCI_FIRST_PIECE, OCI_NEXT_PIECE, or |
| 6365 | OCI_LAST_PIECE. |
| 6366 | The default value is OCI_ONE_PIECE. This parameter is used for IN bind |
| 6367 | variables only. |
| 6368 | indp (IN/OUT) - indicator. A pointer to a sb2 value or pointer to an indicator |
| 6369 | structure for named data types (SQLT_NTY) and REFs (SQLT_REF), i.e., *indp |
| 6370 | is either an sb2 or a void * depending upon the data type. |
| 6371 | rcodep (IN/OUT) - return code. |
| 6372 | Related Functions |
| 6373 | OCIAttrGet(), OCIAttrGet(), OCIStmtExecute(), OCIStmtFetch(), |
| 6374 | OCIStmtGetPieceInfo() |
| 6375 | |
| 6376 | |
| 6377 | OCIFormatInit |
| 6378 | Name |
| 6379 | OCIFormat Package Initialize |
| 6380 | Purpose |
| 6381 | Initializes the OCIFormat package. |
| 6382 | Syntax |
| 6383 | sword OCIFormatInit(void *hndl, OCIError *err); |
| 6384 | Comments |
| 6385 | This routine must be called before calling any other OCIFormat routine. |
| 6386 | Returns OCI_SUCCESS, OCI_INVALID_HANDLE, or OCI_ERROR |
| 6387 | Parameters |
| 6388 | hndl (IN/OUT) - OCI environment or session handle |
| 6389 | err (IN/OUT) - OCI error handle |
| 6390 | Related Functions |
| 6391 | OCIFormatTerm() |
| 6392 | |
| 6393 | |
| 6394 | OCIFormatString |
| 6395 | Name |
| 6396 | OCIFormat Package Format String |
| 6397 | Purpose |
| 6398 | Writes a text string into the supplied text buffer using the argument |
| 6399 | list submitted to it and in accordance with the format string given. |
| 6400 | Syntax |
| 6401 | sword OCIFormatString(void *hndl, OCIError *err, OraText *buffer, |
| 6402 | sbig_ora bufferLength, sbig_ora *returnLength, |
| 6403 | const OraText *formatString, ...); |
| 6404 | Comments |
| 6405 | The first call to this routine must be preceded by a call to the |
| 6406 | OCIFormatInit routine that initializes the OCIFormat package |
| 6407 | for use. When this routine is no longer needed then terminate |
| 6408 | the OCIFormat package by a call to the OCIFormatTerm routine. |
| 6409 | Returns OCI_SUCCESS, OCI_INVALID_HANDLE, or OCI_ERROR |
| 6410 | Parameters |
| 6411 | hndl (IN/OUT) - OCI environment or session handle |
| 6412 | err (IN/OUT) - OCI error handle |
| 6413 | buffer (OUT) - text buffer for the string |
| 6414 | bufferLength (IN) - length of the text buffer |
| 6415 | returnLength (OUT) - length of the formatted string |
| 6416 | formatString (IN) - format specification string |
| 6417 | ... (IN) - variable argument list |
| 6418 | Related Functions |
| 6419 | |
| 6420 | |
| 6421 | OCIFormatTerm |
| 6422 | Name |
| 6423 | OCIFormat Package Terminate |
| 6424 | Purpose |
| 6425 | Terminates the OCIFormat package. |
| 6426 | Syntax |
| 6427 | sword OCIFormatTerm(void *hndl, OCIError *err); |
| 6428 | Comments |
| 6429 | It must be called after the OCIFormat package is no longer being used. |
| 6430 | Returns OCI_SUCCESS, OCI_INVALID_HANDLE, or OCI_ERROR |
| 6431 | Parameters |
| 6432 | hndl (IN/OUT) - OCI environment or session handle |
| 6433 | err (IN/OUT) - OCI error handle |
| 6434 | Related Functions |
| 6435 | OCIFormatInit() |
| 6436 | |
| 6437 | |
| 6438 | OCIFormatTUb1 |
| 6439 | Name |
| 6440 | OCIFormat Package ub1 Type |
| 6441 | Purpose |
| 6442 | Return the type value for the ub1 type. |
| 6443 | Syntax |
| 6444 | sword OCIFormatTUb1(void); |
| 6445 | Comments |
| 6446 | None |
| 6447 | Parameters |
| 6448 | None |
| 6449 | Related Functions |
| 6450 | None |
| 6451 | |
| 6452 | |
| 6453 | OCIFormatTUb2 |
| 6454 | Name |
| 6455 | OCIFormat Package ub2 Type |
| 6456 | Purpose |
| 6457 | Return the type value for the ub2 type. |
| 6458 | Syntax |
| 6459 | sword OCIFormatTUb2(void); |
| 6460 | Comments |
| 6461 | None |
| 6462 | Parameters |
| 6463 | None |
| 6464 | Related Functions |
| 6465 | None |
| 6466 | |
| 6467 | |
| 6468 | OCIFormatTUb4 |
| 6469 | Name |
| 6470 | OCIFormat Package ub4 Type |
| 6471 | Purpose |
| 6472 | Return the type value for the ub4 type. |
| 6473 | Syntax |
| 6474 | sword OCIFormatTUb4(void); |
| 6475 | Comments |
| 6476 | None |
| 6477 | Parameters |
| 6478 | None |
| 6479 | Related Functions |
| 6480 | None |
| 6481 | |
| 6482 | |
| 6483 | OCIFormatTUword |
| 6484 | Name |
| 6485 | OCIFormat Package uword Type |
| 6486 | Purpose |
| 6487 | Return the type value for the uword type. |
| 6488 | Syntax |
| 6489 | sword OCIFormatTUword(void); |
| 6490 | Comments |
| 6491 | None |
| 6492 | Parameters |
| 6493 | None |
| 6494 | Related Functions |
| 6495 | None |
| 6496 | |
| 6497 | |
| 6498 | OCIFormatTUbig_ora |
| 6499 | Name |
| 6500 | OCIFormat Package ubig_ora Type |
| 6501 | Purpose |
| 6502 | Return the type value for the ubig_ora type. |
| 6503 | Syntax |
| 6504 | sword OCIFormatTUbig_ora(void); |
| 6505 | Comments |
| 6506 | None |
| 6507 | Parameters |
| 6508 | None |
| 6509 | Related Functions |
| 6510 | None |
| 6511 | |
| 6512 | |
| 6513 | OCIFormatTSb1 |
| 6514 | Name |
| 6515 | OCIFormat Package sb1 Type |
| 6516 | Purpose |
| 6517 | Return the type value for the sb1 type. |
| 6518 | Syntax |
| 6519 | sword OCIFormatTSb1(void); |
| 6520 | Comments |
| 6521 | None |
| 6522 | Parameters |
| 6523 | None |
| 6524 | Related Functions |
| 6525 | None |
| 6526 | |
| 6527 | |
| 6528 | OCIFormatTSb2 |
| 6529 | Name |
| 6530 | OCIFormat Package sb2 Type |
| 6531 | Purpose |
| 6532 | Return the type value for the sb2 type. |
| 6533 | Syntax |
| 6534 | sword OCIFormatTSb2(void); |
| 6535 | Comments |
| 6536 | None |
| 6537 | Parameters |
| 6538 | None |
| 6539 | Related Functions |
| 6540 | None |
| 6541 | |
| 6542 | |
| 6543 | OCIFormatTSb4 |
| 6544 | Name |
| 6545 | OCIFormat Package sb4 Type |
| 6546 | Purpose |
| 6547 | Return the type value for the sb4 type. |
| 6548 | Syntax |
| 6549 | sword OCIFormatTSb4(void); |
| 6550 | Comments |
| 6551 | None |
| 6552 | Parameters |
| 6553 | None |
| 6554 | Related Functions |
| 6555 | None |
| 6556 | |
| 6557 | |
| 6558 | OCIFormatTSword |
| 6559 | Name |
| 6560 | OCIFormat Package sword Type |
| 6561 | Purpose |
| 6562 | Return the type value for the sword type. |
| 6563 | Syntax |
| 6564 | sword OCIFormatTSword(void); |
| 6565 | Comments |
| 6566 | None |
| 6567 | Parameters |
| 6568 | None |
| 6569 | Related Functions |
| 6570 | None |
| 6571 | |
| 6572 | |
| 6573 | OCIFormatTSbig_ora |
| 6574 | Name |
| 6575 | OCIFormat Package sbig_ora Type |
| 6576 | Purpose |
| 6577 | Return the type value for the sbig_ora type. |
| 6578 | Syntax |
| 6579 | sword OCIFormatTSbig_ora(void); |
| 6580 | Comments |
| 6581 | None |
| 6582 | Parameters |
| 6583 | None |
| 6584 | Related Functions |
| 6585 | None |
| 6586 | |
| 6587 | |
| 6588 | OCIFormatTEb1 |
| 6589 | Name |
| 6590 | OCIFormat Package eb1 Type |
| 6591 | Purpose |
| 6592 | Return the type value for the eb1 type. |
| 6593 | Syntax |
| 6594 | sword OCIFormatTEb1(void); |
| 6595 | Comments |
| 6596 | None |
| 6597 | Parameters |
| 6598 | None |
| 6599 | Related Functions |
| 6600 | None |
| 6601 | |
| 6602 | |
| 6603 | OCIFormatTEb2 |
| 6604 | Name |
| 6605 | OCIFormat Package eb2 Type |
| 6606 | Purpose |
| 6607 | Return the type value for the eb2 type. |
| 6608 | Syntax |
| 6609 | sword OCIFormatTEb2(void); |
| 6610 | Comments |
| 6611 | None |
| 6612 | Parameters |
| 6613 | None |
| 6614 | Related Functions |
| 6615 | None |
| 6616 | |
| 6617 | |
| 6618 | OCIFormatTEb4 |
| 6619 | Name |
| 6620 | OCIFormat Package eb4 Type |
| 6621 | Purpose |
| 6622 | Return the type value for the eb4 type. |
| 6623 | Syntax |
| 6624 | sword OCIFormatTEb4(void); |
| 6625 | Comments |
| 6626 | None |
| 6627 | Parameters |
| 6628 | None |
| 6629 | Related Functions |
| 6630 | None |
| 6631 | |
| 6632 | |
| 6633 | OCIFormatTEword |
| 6634 | Name |
| 6635 | OCIFormat Package eword Type |
| 6636 | Purpose |
| 6637 | Return the type value for the eword type. |
| 6638 | Syntax |
| 6639 | sword OCIFormatTEword(void); |
| 6640 | Comments |
| 6641 | None |
| 6642 | Parameters |
| 6643 | None |
| 6644 | Related Functions |
| 6645 | None |
| 6646 | |
| 6647 | |
| 6648 | OCIFormatTChar |
| 6649 | Name |
| 6650 | OCIFormat Package text Type |
| 6651 | Purpose |
| 6652 | Return the type value for the text type. |
| 6653 | Syntax |
| 6654 | sword OCIFormatTChar(void); |
| 6655 | Comments |
| 6656 | None |
| 6657 | Parameters |
| 6658 | None |
| 6659 | Related Functions |
| 6660 | None |
| 6661 | |
| 6662 | |
| 6663 | OCIFormatTText |
| 6664 | Name |
| 6665 | OCIFormat Package *text Type |
| 6666 | Purpose |
| 6667 | Return the type value for the *text type. |
| 6668 | Syntax |
| 6669 | sword OCIFormatTText(void); |
| 6670 | Comments |
| 6671 | None |
| 6672 | Parameters |
| 6673 | None |
| 6674 | Related Functions |
| 6675 | None |
| 6676 | |
| 6677 | |
| 6678 | OCIFormatTDouble |
| 6679 | Name |
| 6680 | OCIFormat Package double Type |
| 6681 | Purpose |
| 6682 | Return the type value for the double type. |
| 6683 | Syntax |
| 6684 | sword OCIFormatTDouble(void); |
| 6685 | Comments |
| 6686 | None |
| 6687 | Parameters |
| 6688 | None |
| 6689 | Related Functions |
| 6690 | None |
| 6691 | |
| 6692 | |
| 6693 | OCIFormatDvoid |
| 6694 | Name |
| 6695 | OCIFormat Package void Type |
| 6696 | Purpose |
| 6697 | Return the type value for the void type. |
| 6698 | Syntax |
| 6699 | sword OCIFormatTDvoid(void); |
| 6700 | Comments |
| 6701 | None |
| 6702 | Parameters |
| 6703 | None |
| 6704 | Related Functions |
| 6705 | None |
| 6706 | |
| 6707 | |
| 6708 | OCIFormatTEnd |
| 6709 | Name |
| 6710 | OCIFormat Package end Type |
| 6711 | Purpose |
| 6712 | Return the list terminator's "type". |
| 6713 | Syntax |
| 6714 | sword OCIFormatTEnd(void); |
| 6715 | Comments |
| 6716 | None |
| 6717 | Parameters |
| 6718 | None |
| 6719 | Related Functions |
| 6720 | None |
| 6721 | |
| 6722 | |
| 6723 | OCISvcCtxToLda() |
| 6724 | Name |
| 6725 | OCI toggle SerVice context handle to Version 7 Lda_Def |
| 6726 | Purpose |
| 6727 | Toggles between a V8 service context handle and a V7 Lda_Def. |
| 6728 | Syntax |
| 6729 | sword OCISvcCtxToLda ( OCISvcCtx *srvhp, |
| 6730 | OCIError *errhp, |
| 6731 | Lda_Def *ldap ); |
| 6732 | Comments |
| 6733 | Toggles between an Oracle8 service context handle and an Oracle7 Lda_Def. |
| 6734 | This function can only be called after a service context has been properly |
| 6735 | initialized. |
| 6736 | Once the service context has been translated to an Lda_Def, it can be used in |
| 6737 | release 7.x OCI calls (e.g., obindps(), ofen()). |
| 6738 | Note: If there are multiple service contexts which share the same server |
| 6739 | handle, only one can be in V7 mode at any time. |
| 6740 | The action of this call can be reversed by passing the resulting Lda_Def to |
| 6741 | the OCILdaToSvcCtx() function. |
| 6742 | Parameters |
| 6743 | svchp (IN/OUT) - the service context handle. |
| 6744 | errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for |
| 6745 | diagnostic information in the event of an error. |
| 6746 | ldap (IN/OUT) - a Logon Data Area for V7-style OCI calls which is initialized |
| 6747 | by this call. |
| 6748 | Related Functions |
| 6749 | OCILdaToSvcCtx() |
| 6750 | |
| 6751 | |
| 6752 | |
| 6753 | |
| 6754 | OCITransCommit() |
| 6755 | Name |
| 6756 | OCI TX (transaction) CoMmit |
| 6757 | Purpose |
| 6758 | Commits the transaction associated with a specified service context. |
| 6759 | Syntax |
| 6760 | sword OCITransCommit ( OCISvcCtx *srvcp, |
| 6761 | OCIError *errhp, |
| 6762 | ub4 flags ); |
| 6763 | Comments |
| 6764 | The transaction currently associated with the service context is committed. If |
| 6765 | it is a distributed transaction that the server cannot commit, this call |
| 6766 | additionally retrieves the state of the transaction from the database to be |
| 6767 | returned to the user in the error handle. |
| 6768 | If the application has defined multiple transactions, this function operates |
| 6769 | on the transaction currently associated with the service context. If the |
| 6770 | application is working with only the implicit local transaction created when |
| 6771 | database changes are made, that implicit transaction is committed. |
| 6772 | If the application is running in the object mode, then the modified or updated |
| 6773 | objects in the object cache for this transaction are also committed. |
| 6774 | The flags parameter is used for one-phase commit optimization in distributed |
| 6775 | transactions. If the transaction is non-distributed, the flags parameter is |
| 6776 | ignored, and OCI_DEFAULT can be passed as its value. OCI applications |
| 6777 | managing global transactions should pass a value of |
| 6778 | OCI_TRANS_TWOPHASE to the flags parameter for a two-phase commit. The |
| 6779 | default is one-phase commit. |
| 6780 | Under normal circumstances, OCITransCommit() returns with a status |
| 6781 | indicating that the transaction has either been committed or rolled back. With |
| 6782 | distributed transactions, it is possible that the transaction is now in-doubt |
| 6783 | (i.e., neither committed nor aborted). In this case, OCITransCommit() |
| 6784 | attempts to retrieve the status of the transaction from the server. |
| 6785 | The status is returned. |
| 6786 | Parameters |
| 6787 | srvcp (IN) - the service context handle. |
| 6788 | errhp (IN) - an error handle which can be passed to OCIErrorGet() for |
| 6789 | diagnostic information in the event of an error. |
| 6790 | flags -see the "Comments" section above. |
| 6791 | Related Functions |
| 6792 | OCITransRollback() |
| 6793 | |
| 6794 | |
| 6795 | |
| 6796 | |
| 6797 | OCITransDetach() |
| 6798 | Name |
| 6799 | OCI TX (transaction) DeTach |
| 6800 | Purpose |
| 6801 | Detaches a transaction. |
| 6802 | Syntax |
| 6803 | sword OCITransDetach ( OCISvcCtx *srvcp, |
| 6804 | OCIError *errhp, |
| 6805 | ub4 flags); |
| 6806 | Comments |
| 6807 | Detaches a global transaction from the service context handle. The transaction |
| 6808 | currently attached to the service context handle becomes inactive at the end |
| 6809 | of this call. The transaction may be resumed later by calling OCITransStart(), |
| 6810 | specifying a flags value of OCI_TRANS_RESUME. |
| 6811 | When a transaction is detached, the value which was specified in the timeout |
| 6812 | parameter of OCITransStart() when the transaction was started is used to |
| 6813 | determine the amount of time the branch can remain inactive before being |
| 6814 | deleted by the server's PMON process. |
| 6815 | Note: The transaction can be resumed by a different process than the one |
| 6816 | that detached it, provided that the transaction has the same |
| 6817 | authorization. |
| 6818 | Parameters |
| 6819 | srvcp (IN) - the service context handle. |
| 6820 | errhp (IN) - an error handle which can be passed to OCIErrorGet() for |
| 6821 | diagnostic information in the event of an error. |
| 6822 | flags (IN) - you must pass a value of OCI_DEFAULT for this parameter. |
| 6823 | Related Functions |
| 6824 | OCITransStart() |
| 6825 | |
| 6826 | |
| 6827 | |
| 6828 | OCITransForget() |
| 6829 | Name |
| 6830 | OCI TX (transaction) ForGeT |
| 6831 | Purpose |
| 6832 | Causes the server to forget a heuristically completed global transaction. |
| 6833 | Syntax |
| 6834 | sword OCITransForget ( OCISvcCtx *svchp, |
| 6835 | OCIError *errhp, |
| 6836 | ub4 flags); |
| 6837 | |
| 6838 | Comments |
| 6839 | |
| 6840 | Forgets a heuristically completed global transaction. The server deletes the |
| 6841 | status of the transaction from the system's pending transaction table. |
| 6842 | The XID of the transaction to be forgotten is set as an attribute of the |
| 6843 | transaction handle (OCI_ATTR_XID). |
| 6844 | Parameters |
| 6845 | srvcp (IN) - the service context handle - the transaction is rolled back. |
| 6846 | errhp (IN) - an error handle which can be passed to OCIErrorGet() for |
| 6847 | diagnostic information in the event of an error. |
| 6848 | flags (IN) - you must pass OCI_DEFAULT for this parameter. |
| 6849 | Related Functions |
| 6850 | OCITransCommit(), OCITransRollback() |
| 6851 | |
| 6852 | |
| 6853 | OCITransMultiPrepare() |
| 6854 | Name |
| 6855 | OCI Trans(action) Multi-Branch Prepare |
| 6856 | Purpose |
| 6857 | Prepares a transaction with multiple branches in a single call. |
| 6858 | Syntax |
| 6859 | sword OCITransMultiPrepare ( OCISvcCtx *svchp, |
| 6860 | ub4 numBranches, |
| 6861 | OCITrans **txns, |
| 6862 | OCIError **errhp); |
| 6863 | |
| 6864 | Comments |
| 6865 | |
| 6866 | Prepares the specified global transaction for commit. |
| 6867 | This call is valid only for distributed transactions. |
| 6868 | This call is an advanced performance feature intended for use only in |
| 6869 | situations where the caller is responsible for preparing all the branches |
| 6870 | in a transaction. |
| 6871 | Parameters |
| 6872 | srvcp (IN) - the service context handle. |
| 6873 | numBranches (IN) - This is the number of branches expected. It is also the |
| 6874 | array size for the next two parameters. |
| 6875 | txns (IN) - This is the array of transaction handles for the branches to |
| 6876 | prepare. They should all have the OCI_ATTR_XID set. The global transaction |
| 6877 | ID should be the same. |
| 6878 | errhp (IN) - This is the array of error handles. If OCI_SUCCESS is not |
| 6879 | returned, then these will indicate which branches received which errors. |
| 6880 | Related Functions |
| 6881 | OCITransPrepare() |
| 6882 | |
| 6883 | |
| 6884 | OCITransPrepare() |
| 6885 | Name |
| 6886 | OCI TX (transaction) PREpare |
| 6887 | Purpose |
| 6888 | Prepares a transaction for commit. |
| 6889 | Syntax |
| 6890 | sword OCITransPrepare ( OCISvcCtx *svchp, |
| 6891 | OCIError *errhp, |
| 6892 | ub4 flags); |
| 6893 | |
| 6894 | Comments |
| 6895 | |
| 6896 | Prepares the specified global transaction for commit. |
| 6897 | This call is valid only for distributed transactions. |
| 6898 | The call returns OCI_SUCCESS_WITH_INFO if the transaction has not made |
| 6899 | any changes. The error handle will indicate that the transaction is read-only. |
| 6900 | The flag parameter is not currently used. |
| 6901 | Parameters |
| 6902 | srvcp (IN) - the service context handle. |
| 6903 | errhp (IN) - an error handle which can be passed to OCIErrorGet() for |
| 6904 | diagnostic information in the event of an error. |
| 6905 | flags (IN) - you must pass OCI_DEFAULT for this parameter. |
| 6906 | Related Functions |
| 6907 | OCITransCommit(), OCITransForget() |
| 6908 | |
| 6909 | |
| 6910 | |
| 6911 | |
| 6912 | OCITransRollback() |
| 6913 | Name |
| 6914 | OCI TX (transaction) RoLlback |
| 6915 | Purpose |
| 6916 | Rolls back the current transaction. |
| 6917 | Syntax |
| 6918 | sword OCITransRollback ( void *svchp, |
| 6919 | OCIError *errhp, |
| 6920 | ub4 flags ); |
| 6921 | Comments |
| 6922 | The current transaction- defined as the set of statements executed since the |
| 6923 | last OCITransCommit() or since OCISessionBegin()-is rolled back. |
| 6924 | If the application is running under object mode then the modified or updated |
| 6925 | objects in the object cache for this transaction are also rolled back. |
| 6926 | An error is returned if an attempt is made to roll back a global transaction |
| 6927 | that is not currently active. |
| 6928 | Parameters |
| 6929 | svchp (IN) - a service context handle. The transaction currently set in the |
| 6930 | service context handle is rolled back. |
| 6931 | errhp -(IN) - an error handle which can be passed to OCIErrorGet() for |
| 6932 | diagnostic information in the event of an error. |
| 6933 | flags - you must pass a value of OCI_DEFAULT for this parameter. |
| 6934 | Related Functions |
| 6935 | OCITransCommit() |
| 6936 | |
| 6937 | |
| 6938 | |
| 6939 | |
| 6940 | OCITransStart() |
| 6941 | Name |
| 6942 | OCI TX (transaction) STart |
| 6943 | Purpose |
| 6944 | Sets the beginning of a transaction. |
| 6945 | Syntax |
| 6946 | sword OCITransStart ( OCISvcCtx *svchp, |
| 6947 | OCIError *errhp, |
| 6948 | uword timeout, |
| 6949 | ub4 flags); |
| 6950 | |
| 6951 | Comments |
| 6952 | This function sets the beginning of a global or serializable transaction. The |
| 6953 | transaction context currently associated with the service context handle is |
| 6954 | initialized at the end of the call if the flags parameter specifies that a new |
| 6955 | transaction should be started. |
| 6956 | The XID of the transaction is set as an attribute of the transaction handle |
| 6957 | (OCI_ATTR_XID) |
| 6958 | Parameters |
| 6959 | svchp (IN/OUT) - the service context handle. The transaction context in the |
| 6960 | service context handle is initialized at the end of the call if the flag |
| 6961 | specified a new transaction to be started. |
| 6962 | errhp (IN/OUT) - The OCI error handle. If there is an error, it is recorded in |
| 6963 | err and this function returns OCI_ERROR. Diagnostic information can be |
| 6964 | obtained by calling OCIErrorGet(). |
| 6965 | timeout (IN) - the time, in seconds, to wait for a transaction to become |
| 6966 | available for resumption when OCI_TRANS_RESUME is specified. When |
| 6967 | OCI_TRANS_NEW is specified, this value is stored and may be used later by |
| 6968 | OCITransDetach(). |
| 6969 | flags (IN) - specifies whether a new transaction is being started or an |
| 6970 | existing transaction is being resumed. Also specifies serializiability or |
| 6971 | read-only status. More than a single value can be specified. By default, |
| 6972 | a read/write transaction is started. The flag values are: |
| 6973 | OCI_TRANS_NEW - starts a new transaction branch. By default starts a |
| 6974 | tightly coupled and migratable branch. |
| 6975 | OCI_TRANS_TIGHT - explicitly specifies a tightly coupled branch |
| 6976 | OCI_TRANS_LOOSE - specifies a loosely coupled branch |
| 6977 | OCI_TRANS_RESUME - resumes an existing transaction branch. |
| 6978 | OCI_TRANS_READONLY - start a readonly transaction |
| 6979 | OCI_TRANS_SERIALIZABLE - start a serializable transaction |
| 6980 | Related Functions |
| 6981 | OCITransDetach() |
| 6982 | |
| 6983 | |
| 6984 | |
| 6985 | |
| 6986 | |
| 6987 | ******************************************************************************/ |
| 6988 | /*-----------------------Dynamic Callback Function Pointers------------------*/ |
| 6989 | |
| 6990 | |
| 6991 | typedef sb4 (*OCICallbackInBind)(void *ictxp, OCIBind *bindp, ub4 iter, |
| 6992 | ub4 index, void **bufpp, ub4 *alenp, |
| 6993 | ub1 *piecep, void **indp); |
| 6994 | |
| 6995 | typedef sb4 (*OCICallbackOutBind)(void *octxp, OCIBind *bindp, ub4 iter, |
| 6996 | ub4 index, void **bufpp, ub4 **alenp, |
| 6997 | ub1 *piecep, void **indp, |
| 6998 | ub2 **rcodep); |
| 6999 | |
| 7000 | typedef sb4 (*OCICallbackDefine)(void *octxp, OCIDefine *defnp, ub4 iter, |
| 7001 | void **bufpp, ub4 **alenp, ub1 *piecep, |
| 7002 | void **indp, ub2 **rcodep); |
| 7003 | |
| 7004 | typedef sword (*OCIUserCallback)(void *ctxp, void *hndlp, ub4 type, |
| 7005 | ub4 fcode, ub4 when, sword returnCode, |
| 7006 | sb4 *errnop, va_list arglist); |
| 7007 | |
| 7008 | typedef sword (*OCIEnvCallbackType)(OCIEnv *env, ub4 mode, |
| 7009 | size_t xtramem_sz, void *usrmemp, |
| 7010 | OCIUcb *ucbDesc); |
| 7011 | |
| 7012 | typedef sb4 (*OCICallbackLobRead)(void *ctxp, const void *bufp, |
| 7013 | ub4 len, ub1 piece); |
| 7014 | |
| 7015 | typedef sb4 (*OCICallbackLobWrite)(void *ctxp, void *bufp, |
| 7016 | ub4 *lenp, ub1 *piece); |
| 7017 | |
| 7018 | #ifdef ORAXB8_DEFINED |
| 7019 | |
| 7020 | typedef sb4 (*OCICallbackLobRead2)(void *ctxp, const void *bufp, oraub8 len, |
| 7021 | ub1 piece, void **changed_bufpp, |
| 7022 | oraub8 *changed_lenp); |
| 7023 | |
| 7024 | typedef sb4 (*OCICallbackLobWrite2)(void *ctxp, void *bufp, oraub8 *lenp, |
| 7025 | ub1 *piece, void **changed_bufpp, |
| 7026 | oraub8 *changed_lenp); |
| 7027 | |
| 7028 | typedef sb4 (*OCICallbackLobArrayRead)(void *ctxp, ub4 array_iter, |
| 7029 | const void *bufp, oraub8 len, |
| 7030 | ub1 piece, void **changed_bufpp, |
| 7031 | oraub8 *changed_lenp); |
| 7032 | |
| 7033 | typedef sb4 (*OCICallbackLobArrayWrite)(void *ctxp, ub4 array_iter, |
| 7034 | void *bufp, oraub8 *lenp, |
| 7035 | ub1 *piece, void **changed_bufpp, |
| 7036 | oraub8 *changed_lenp); |
| 7037 | #endif |
| 7038 | |
| 7039 | typedef sb4 (*OCICallbackLobGetDeduplicateRegions)(void *ctxp, |
| 7040 | OCILobRegion *regions, |
| 7041 | ub4 count, ub1 piece, |
| 7042 | OCILobRegion **changed_reg, |
| 7043 | ub4 *changed_count); |
| 7044 | |
| 7045 | typedef sb4 (*OCICallbackAQEnq)(void *ctxp, void **payload, |
| 7046 | void **payload_ind); |
| 7047 | |
| 7048 | typedef sb4 (*OCICallbackAQEnqStreaming)(void *ctxp, void **payload, |
| 7049 | void **payload_ind, |
| 7050 | OCIAQMsgProperties **msgprop, |
| 7051 | OCIType **tdo); |
| 7052 | |
| 7053 | typedef sb4 (*OCICallbackAQDeq)(void *ctxp, void **payload, |
| 7054 | void **payload_ind); |
| 7055 | |
| 7056 | /*--------------------------Failover Callback Structure ---------------------*/ |
| 7057 | typedef sb4 (*OCICallbackFailover)(void *svcctx, void *envctx, |
| 7058 | void *fo_ctx, ub4 fo_type, |
| 7059 | ub4 fo_event); |
| 7060 | |
| 7061 | typedef struct |
| 7062 | { |
| 7063 | OCICallbackFailover callback_function; |
| 7064 | void *fo_ctx; |
| 7065 | } |
| 7066 | OCIFocbkStruct; |
| 7067 | |
| 7068 | /*---------------------Statement Cache callback function ------------------*/ |
| 7069 | |
| 7070 | typedef sword (*OCICallbackStmtCache)(void *ctx, OCIStmt *stmt, ub4 mode); |
| 7071 | |
| 7072 | /*--------------------------HA Callback Structure ---------------------*/ |
| 7073 | typedef void (*OCIEventCallback)(void *evtctx, OCIEvent *eventhp); |
| 7074 | |
| 7075 | |
| 7076 | /*------------------------- Round Trip Callback Structure --------------------*/ |
| 7077 | typedef sword (*OCIRoundTripCallback)(void *rtctx, OCISvcCtx *svch, |
| 7078 | OCISession *userh); |
| 7079 | |
| 7080 | |
| 7081 | /***************************************************************************** |
| 7082 | ACTUAL PROTOTYPE DECLARATIONS |
| 7083 | ******************************************************************************/ |
| 7084 | |
| 7085 | sword OCIInitialize (ub4 mode, void *ctxp, |
| 7086 | void *(*malocfp)(void *ctxp, size_t size), |
| 7087 | void *(*ralocfp)(void *ctxp, void *memptr, size_t newsize), |
| 7088 | void (*mfreefp)(void *ctxp, void *memptr) ); |
| 7089 | |
| 7090 | sword OCITerminate( ub4 mode); |
| 7091 | |
| 7092 | sword OCIEnvCreate (OCIEnv **envp, ub4 mode, void *ctxp, |
| 7093 | void *(*malocfp)(void *ctxp, size_t size), |
| 7094 | void *(*ralocfp)(void *ctxp, void *memptr, size_t newsize), |
| 7095 | void (*mfreefp)(void *ctxp, void *memptr), |
| 7096 | size_t xtramem_sz, void **usrmempp); |
| 7097 | |
| 7098 | sword OCIEnvNlsCreate (OCIEnv **envp, ub4 mode, void *ctxp, |
| 7099 | void *(*malocfp)(void *ctxp, size_t size), |
| 7100 | void *(*ralocfp)(void *ctxp, void *memptr, size_t newsize), |
| 7101 | void (*mfreefp)(void *ctxp, void *memptr), |
| 7102 | size_t xtramem_sz, void **usrmempp, |
| 7103 | ub2 charset, ub2 ncharset); |
| 7104 | |
| 7105 | sword OCIFEnvCreate (OCIEnv **envp, ub4 mode, void *ctxp, |
| 7106 | void *(*malocfp)(void *ctxp, size_t size), |
| 7107 | void *(*ralocfp)(void *ctxp, void *memptr, size_t newsize), |
| 7108 | void (*mfreefp)(void *ctxp, void *memptr), |
| 7109 | size_t xtramem_sz, void **usrmempp, void *fupg); |
| 7110 | |
| 7111 | sword OCIHandleAlloc(const void *parenth, void **hndlpp, const ub4 type, |
| 7112 | const size_t xtramem_sz, void **usrmempp); |
| 7113 | |
| 7114 | sword OCIHandleFree(void *hndlp, const ub4 type); |
| 7115 | |
| 7116 | |
| 7117 | sword OCIDescriptorAlloc(const void *parenth, void **descpp, |
| 7118 | const ub4 type, const size_t xtramem_sz, |
| 7119 | void **usrmempp); |
| 7120 | |
| 7121 | sword OCIArrayDescriptorAlloc(const void *parenth, void **descpp, |
| 7122 | const ub4 type, ub4 array_size, |
| 7123 | const size_t xtramem_sz, void **usrmempp); |
| 7124 | |
| 7125 | sword OCIDescriptorFree(void *descp, const ub4 type); |
| 7126 | |
| 7127 | sword OCIArrayDescriptorFree(void **descp, const ub4 type); |
| 7128 | |
| 7129 | sword OCIEnvInit (OCIEnv **envp, ub4 mode, |
| 7130 | size_t xtramem_sz, void **usrmempp); |
| 7131 | |
| 7132 | sword OCIServerAttach (OCIServer *srvhp, OCIError *errhp, |
| 7133 | const OraText *dblink, sb4 dblink_len, ub4 mode); |
| 7134 | |
| 7135 | sword OCIServerDetach (OCIServer *srvhp, OCIError *errhp, ub4 mode); |
| 7136 | |
| 7137 | sword OCISessionBegin (OCISvcCtx *svchp, OCIError *errhp, OCISession *usrhp, |
| 7138 | ub4 credt, ub4 mode); |
| 7139 | |
| 7140 | sword OCISessionEnd (OCISvcCtx *svchp, OCIError *errhp, OCISession *usrhp, |
| 7141 | ub4 mode); |
| 7142 | |
| 7143 | sword OCILogon (OCIEnv *envhp, OCIError *errhp, OCISvcCtx **svchp, |
| 7144 | const OraText *username, ub4 uname_len, |
| 7145 | const OraText *password, ub4 passwd_len, |
| 7146 | const OraText *dbname, ub4 dbname_len); |
| 7147 | |
| 7148 | sword OCILogon2 (OCIEnv *envhp, OCIError *errhp, OCISvcCtx **svchp, |
| 7149 | const OraText *username, ub4 uname_len, |
| 7150 | const OraText *password, ub4 passwd_len, |
| 7151 | const OraText *dbname, ub4 dbname_len, |
| 7152 | ub4 mode); |
| 7153 | |
| 7154 | sword OCILogoff (OCISvcCtx *svchp, OCIError *errhp); |
| 7155 | |
| 7156 | |
| 7157 | sword OCIPasswordChange (OCISvcCtx *svchp, OCIError *errhp, |
| 7158 | const OraText *user_name, ub4 usernm_len, |
| 7159 | const OraText *opasswd, ub4 opasswd_len, |
| 7160 | const OraText *npasswd, ub4 npasswd_len, |
| 7161 | ub4 mode); |
| 7162 | |
| 7163 | sword OCIStmtPrepare (OCIStmt *stmtp, OCIError *errhp, const OraText *stmt, |
| 7164 | ub4 stmt_len, ub4 language, ub4 mode); |
| 7165 | |
| 7166 | sword OCIStmtPrepare2 ( OCISvcCtx *svchp, OCIStmt **stmtp, OCIError *errhp, |
| 7167 | const OraText *stmt, ub4 stmt_len, const OraText *key, |
| 7168 | ub4 key_len, ub4 language, ub4 mode); |
| 7169 | |
| 7170 | sword OCIStmtRelease ( OCIStmt *stmtp, OCIError *errhp, const OraText *key, |
| 7171 | ub4 key_len, ub4 mode); |
| 7172 | |
| 7173 | sword OCIBindByPos (OCIStmt *stmtp, OCIBind **bindp, OCIError *errhp, |
| 7174 | ub4 position, void *valuep, sb4 value_sz, |
| 7175 | ub2 dty, void *indp, ub2 *alenp, ub2 *rcodep, |
| 7176 | ub4 maxarr_len, ub4 *curelep, ub4 mode); |
| 7177 | |
| 7178 | sword OCIBindByName (OCIStmt *stmtp, OCIBind **bindp, OCIError *errhp, |
| 7179 | const OraText *placeholder, sb4 placeh_len, |
| 7180 | void *valuep, sb4 value_sz, ub2 dty, |
| 7181 | void *indp, ub2 *alenp, ub2 *rcodep, |
| 7182 | ub4 maxarr_len, ub4 *curelep, ub4 mode); |
| 7183 | |
| 7184 | sword OCIBindObject (OCIBind *bindp, OCIError *errhp, const OCIType *type, |
| 7185 | void **pgvpp, ub4 *pvszsp, void **indpp, |
| 7186 | ub4 *indszp); |
| 7187 | |
| 7188 | sword OCIBindDynamic (OCIBind *bindp, OCIError *errhp, void *ictxp, |
| 7189 | OCICallbackInBind icbfp, void *octxp, |
| 7190 | OCICallbackOutBind ocbfp); |
| 7191 | |
| 7192 | sword OCIBindArrayOfStruct (OCIBind *bindp, OCIError *errhp, |
| 7193 | ub4 pvskip, ub4 indskip, |
| 7194 | ub4 alskip, ub4 rcskip); |
| 7195 | |
| 7196 | sword OCIStmtGetPieceInfo (OCIStmt *stmtp, OCIError *errhp, |
| 7197 | void **hndlpp, ub4 *typep, |
| 7198 | ub1 *in_outp, ub4 *iterp, ub4 *idxp, |
| 7199 | ub1 *piecep); |
| 7200 | |
| 7201 | sword OCIStmtSetPieceInfo (void *hndlp, ub4 type, OCIError *errhp, |
| 7202 | const void *bufp, ub4 *alenp, ub1 piece, |
| 7203 | const void *indp, ub2 *rcodep); |
| 7204 | |
| 7205 | sword OCIStmtExecute (OCISvcCtx *svchp, OCIStmt *stmtp, OCIError *errhp, |
| 7206 | ub4 iters, ub4 rowoff, const OCISnapshot *snap_in, |
| 7207 | OCISnapshot *snap_out, ub4 mode); |
| 7208 | |
| 7209 | sword OCIDefineByPos (OCIStmt *stmtp, OCIDefine **defnp, OCIError *errhp, |
| 7210 | ub4 position, void *valuep, sb4 value_sz, ub2 dty, |
| 7211 | void *indp, ub2 *rlenp, ub2 *rcodep, ub4 mode); |
| 7212 | |
| 7213 | sword OCIDefineObject (OCIDefine *defnp, OCIError *errhp, |
| 7214 | const OCIType *type, void **pgvpp, |
| 7215 | ub4 *pvszsp, void **indpp, ub4 *indszp); |
| 7216 | |
| 7217 | sword OCIDefineDynamic (OCIDefine *defnp, OCIError *errhp, void *octxp, |
| 7218 | OCICallbackDefine ocbfp); |
| 7219 | |
| 7220 | sword OCIRowidToChar (OCIRowid *rowidDesc, OraText *outbfp, ub2 *outbflp, |
| 7221 | OCIError *errhp); |
| 7222 | |
| 7223 | sword OCIDefineArrayOfStruct (OCIDefine *defnp, OCIError *errhp, ub4 pvskip, |
| 7224 | ub4 indskip, ub4 rlskip, ub4 rcskip); |
| 7225 | |
| 7226 | sword OCIStmtFetch (OCIStmt *stmtp, OCIError *errhp, ub4 nrows, |
| 7227 | ub2 orientation, ub4 mode); |
| 7228 | |
| 7229 | sword OCIStmtFetch2 (OCIStmt *stmtp, OCIError *errhp, ub4 nrows, |
| 7230 | ub2 orientation, sb4 scrollOffset, ub4 mode); |
| 7231 | |
| 7232 | sword OCIStmtGetBindInfo (OCIStmt *stmtp, OCIError *errhp, ub4 size, |
| 7233 | ub4 startloc, |
| 7234 | sb4 *found, OraText *bvnp[], ub1 bvnl[], |
| 7235 | OraText *invp[], ub1 inpl[], ub1 dupl[], |
| 7236 | OCIBind **hndl); |
| 7237 | |
| 7238 | sword OCIDescribeAny (OCISvcCtx *svchp, OCIError *errhp, |
| 7239 | void *objptr, |
| 7240 | ub4 objnm_len, ub1 objptr_typ, ub1 info_level, |
| 7241 | ub1 objtyp, OCIDescribe *dschp); |
| 7242 | |
| 7243 | sword OCIParamGet (const void *hndlp, ub4 htype, OCIError *errhp, |
| 7244 | void **parmdpp, ub4 pos); |
| 7245 | |
| 7246 | sword OCIParamSet(void *hdlp, ub4 htyp, OCIError *errhp, const void *dscp, |
| 7247 | ub4 dtyp, ub4 pos); |
| 7248 | |
| 7249 | sword OCITransStart (OCISvcCtx *svchp, OCIError *errhp, |
| 7250 | uword timeout, ub4 flags ); |
| 7251 | |
| 7252 | sword OCITransDetach (OCISvcCtx *svchp, OCIError *errhp, ub4 flags ); |
| 7253 | |
| 7254 | sword OCITransCommit (OCISvcCtx *svchp, OCIError *errhp, ub4 flags); |
| 7255 | |
| 7256 | sword OCITransRollback (OCISvcCtx *svchp, OCIError *errhp, ub4 flags); |
| 7257 | |
| 7258 | sword OCITransPrepare (OCISvcCtx *svchp, OCIError *errhp, ub4 flags); |
| 7259 | |
| 7260 | sword OCITransMultiPrepare (OCISvcCtx *svchp, ub4 numBranches, |
| 7261 | OCITrans **txns, OCIError **errhp); |
| 7262 | |
| 7263 | sword OCITransForget (OCISvcCtx *svchp, OCIError *errhp, ub4 flags); |
| 7264 | |
| 7265 | sword OCIErrorGet (void *hndlp, ub4 recordno, OraText *sqlstate, |
| 7266 | sb4 *errcodep, OraText *bufp, ub4 bufsiz, ub4 type); |
| 7267 | |
| 7268 | sword OCILobAppend (OCISvcCtx *svchp, OCIError *errhp, |
| 7269 | OCILobLocator *dst_locp, |
| 7270 | OCILobLocator *src_locp); |
| 7271 | |
| 7272 | sword OCILobAssign (OCIEnv *envhp, OCIError *errhp, |
| 7273 | const OCILobLocator *src_locp, |
| 7274 | OCILobLocator **dst_locpp); |
| 7275 | |
| 7276 | sword OCILobCharSetForm (OCIEnv *envhp, OCIError *errhp, |
| 7277 | const OCILobLocator *locp, ub1 *csfrm); |
| 7278 | |
| 7279 | sword OCILobCharSetId (OCIEnv *envhp, OCIError *errhp, |
| 7280 | const OCILobLocator *locp, ub2 *csid); |
| 7281 | |
| 7282 | sword OCILobCopy (OCISvcCtx *svchp, OCIError *errhp, OCILobLocator *dst_locp, |
| 7283 | OCILobLocator *src_locp, ub4 amount, ub4 dst_offset, |
| 7284 | ub4 src_offset); |
| 7285 | |
| 7286 | sword OCILobCreateTemporary(OCISvcCtx *svchp, |
| 7287 | OCIError *errhp, |
| 7288 | OCILobLocator *locp, |
| 7289 | ub2 csid, |
| 7290 | ub1 csfrm, |
| 7291 | ub1 lobtype, |
| 7292 | boolean cache, |
| 7293 | OCIDuration duration); |
| 7294 | |
| 7295 | |
| 7296 | sword OCILobClose( OCISvcCtx *svchp, |
| 7297 | OCIError *errhp, |
| 7298 | OCILobLocator *locp ); |
| 7299 | |
| 7300 | |
| 7301 | sword OCILobDisableBuffering (OCISvcCtx *svchp, |
| 7302 | OCIError *errhp, |
| 7303 | OCILobLocator *locp); |
| 7304 | |
| 7305 | sword OCILobEnableBuffering (OCISvcCtx *svchp, |
| 7306 | OCIError *errhp, |
| 7307 | OCILobLocator *locp); |
| 7308 | |
| 7309 | sword OCILobErase (OCISvcCtx *svchp, OCIError *errhp, OCILobLocator *locp, |
| 7310 | ub4 *amount, ub4 offset); |
| 7311 | |
| 7312 | sword OCILobFileClose (OCISvcCtx *svchp, OCIError *errhp, |
| 7313 | OCILobLocator *filep); |
| 7314 | |
| 7315 | sword OCILobFileCloseAll (OCISvcCtx *svchp, OCIError *errhp); |
| 7316 | |
| 7317 | sword OCILobFileExists (OCISvcCtx *svchp, OCIError *errhp, |
| 7318 | OCILobLocator *filep, |
| 7319 | boolean *flag); |
| 7320 | |
| 7321 | sword OCILobFileGetName (OCIEnv *envhp, OCIError *errhp, |
| 7322 | const OCILobLocator *filep, |
| 7323 | OraText *dir_alias, ub2 *d_length, |
| 7324 | OraText *filename, ub2 *f_length); |
| 7325 | |
| 7326 | sword OCILobFileIsOpen (OCISvcCtx *svchp, OCIError *errhp, |
| 7327 | OCILobLocator *filep, |
| 7328 | boolean *flag); |
| 7329 | |
| 7330 | sword OCILobFileOpen (OCISvcCtx *svchp, OCIError *errhp, |
| 7331 | OCILobLocator *filep, |
| 7332 | ub1 mode); |
| 7333 | |
| 7334 | sword OCILobFileSetName (OCIEnv *envhp, OCIError *errhp, |
| 7335 | OCILobLocator **filepp, |
| 7336 | const OraText *dir_alias, ub2 d_length, |
| 7337 | const OraText *filename, ub2 f_length); |
| 7338 | |
| 7339 | sword OCILobFlushBuffer (OCISvcCtx *svchp, |
| 7340 | OCIError *errhp, |
| 7341 | OCILobLocator *locp, |
| 7342 | ub4 flag); |
| 7343 | |
| 7344 | sword OCILobFreeTemporary(OCISvcCtx *svchp, |
| 7345 | OCIError *errhp, |
| 7346 | OCILobLocator *locp); |
| 7347 | |
| 7348 | sword OCILobGetChunkSize(OCISvcCtx *svchp, |
| 7349 | OCIError *errhp, |
| 7350 | OCILobLocator *locp, |
| 7351 | ub4 *chunksizep); |
| 7352 | |
| 7353 | sword OCILobGetLength (OCISvcCtx *svchp, OCIError *errhp, |
| 7354 | OCILobLocator *locp, |
| 7355 | ub4 *lenp); |
| 7356 | |
| 7357 | sword OCILobIsEqual (OCIEnv *envhp, const OCILobLocator *x, |
| 7358 | const OCILobLocator *y, |
| 7359 | boolean *is_equal); |
| 7360 | |
| 7361 | sword OCILobIsOpen( OCISvcCtx *svchp, |
| 7362 | OCIError *errhp, |
| 7363 | OCILobLocator *locp, |
| 7364 | boolean *flag); |
| 7365 | |
| 7366 | sword OCILobIsTemporary(OCIEnv *envp, |
| 7367 | OCIError *errhp, |
| 7368 | OCILobLocator *locp, |
| 7369 | boolean *is_temporary); |
| 7370 | |
| 7371 | sword OCILobLoadFromFile (OCISvcCtx *svchp, OCIError *errhp, |
| 7372 | OCILobLocator *dst_locp, |
| 7373 | OCILobLocator *src_filep, |
| 7374 | ub4 amount, ub4 dst_offset, |
| 7375 | ub4 src_offset); |
| 7376 | |
| 7377 | sword OCILobLocatorAssign (OCISvcCtx *svchp, OCIError *errhp, |
| 7378 | const OCILobLocator *src_locp, |
| 7379 | OCILobLocator **dst_locpp); |
| 7380 | |
| 7381 | |
| 7382 | sword OCILobLocatorIsInit (OCIEnv *envhp, OCIError *errhp, |
| 7383 | const OCILobLocator *locp, |
| 7384 | boolean *is_initialized); |
| 7385 | |
| 7386 | sword OCILobOpen( OCISvcCtx *svchp, |
| 7387 | OCIError *errhp, |
| 7388 | OCILobLocator *locp, |
| 7389 | ub1 mode ); |
| 7390 | |
| 7391 | sword OCILobRead (OCISvcCtx *svchp, OCIError *errhp, OCILobLocator *locp, |
| 7392 | ub4 *amtp, ub4 offset, void *bufp, ub4 bufl, void *ctxp, |
| 7393 | OCICallbackLobRead cbfp, ub2 csid, ub1 csfrm); |
| 7394 | |
| 7395 | sword OCILobTrim (OCISvcCtx *svchp, OCIError *errhp, OCILobLocator *locp, |
| 7396 | ub4 newlen); |
| 7397 | |
| 7398 | sword OCILobWrite (OCISvcCtx *svchp, OCIError *errhp, OCILobLocator *locp, |
| 7399 | ub4 *amtp, ub4 offset, void *bufp, ub4 buflen, |
| 7400 | ub1 piece, void *ctxp, OCICallbackLobWrite cbfp, |
| 7401 | ub2 csid, ub1 csfrm); |
| 7402 | |
| 7403 | sword OCILobGetDeduplicateRegions(OCISvcCtx *svchp, OCIError *errhp, |
| 7404 | OCILobLocator *locp, |
| 7405 | OCILobRegion *regp, ub4 *count, ub1 piece, |
| 7406 | void *ctxp, |
| 7407 | OCICallbackLobGetDeduplicateRegions cbfp); |
| 7408 | |
| 7409 | sword OCILobWriteAppend(OCISvcCtx *svchp, OCIError *errhp, OCILobLocator *lobp, |
| 7410 | ub4 *amtp, void *bufp, ub4 bufl, ub1 piece, |
| 7411 | void *ctxp, OCICallbackLobWrite cbfp, ub2 csid, |
| 7412 | ub1 csfrm); |
| 7413 | |
| 7414 | sword OCIBreak (void *hndlp, OCIError *errhp); |
| 7415 | |
| 7416 | sword OCIReset (void *hndlp, OCIError *errhp); |
| 7417 | |
| 7418 | sword OCIServerVersion (void *hndlp, OCIError *errhp, OraText *bufp, |
| 7419 | ub4 bufsz, |
| 7420 | ub1 hndltype); |
| 7421 | |
| 7422 | sword OCIServerRelease (void *hndlp, OCIError *errhp, OraText *bufp, |
| 7423 | ub4 bufsz, |
| 7424 | ub1 hndltype, ub4 *version); |
| 7425 | |
| 7426 | sword OCIAttrGet (const void *trgthndlp, ub4 trghndltyp, |
| 7427 | void *attributep, ub4 *sizep, ub4 attrtype, |
| 7428 | OCIError *errhp); |
| 7429 | |
| 7430 | sword OCIAttrSet (void *trgthndlp, ub4 trghndltyp, void *attributep, |
| 7431 | ub4 size, ub4 attrtype, OCIError *errhp); |
| 7432 | |
| 7433 | sword OCISvcCtxToLda (OCISvcCtx *svchp, OCIError *errhp, Lda_Def *ldap); |
| 7434 | |
| 7435 | sword OCILdaToSvcCtx (OCISvcCtx **svchpp, OCIError *errhp, Lda_Def *ldap); |
| 7436 | |
| 7437 | sword OCIResultSetToStmt (OCIResult *rsetdp, OCIError *errhp); |
| 7438 | |
| 7439 | sword OCIFileClose ( void *hndl, OCIError *err, OCIFileObject *filep ); |
| 7440 | |
| 7441 | sword OCIUserCallbackRegister(void *hndlp, ub4 type, void *ehndlp, |
| 7442 | OCIUserCallback callback, void *ctxp, |
| 7443 | ub4 fcode, ub4 when, OCIUcb *ucbDesc); |
| 7444 | |
| 7445 | sword OCIUserCallbackGet(void *hndlp, ub4 type, void *ehndlp, |
| 7446 | ub4 fcode, ub4 when, OCIUserCallback *callbackp, |
| 7447 | void **ctxpp, OCIUcb *ucbDesc); |
| 7448 | |
| 7449 | sword OCISharedLibInit(void *metaCtx, void *libCtx, ub4 argfmt, sword argc, |
| 7450 | void **argv, OCIEnvCallbackType envCallback); |
| 7451 | |
| 7452 | sword OCIFileExists ( void *hndl, OCIError *err, OraText *filename, |
| 7453 | OraText *path, ub1 *flag ); |
| 7454 | |
| 7455 | sword OCIFileFlush( void *hndl, OCIError *err, OCIFileObject *filep ); |
| 7456 | |
| 7457 | |
| 7458 | sword OCIFileGetLength( void *hndl, OCIError *err, OraText *filename, |
| 7459 | OraText *path, ubig_ora *lenp ); |
| 7460 | |
| 7461 | sword OCIFileInit ( void *hndl, OCIError *err ); |
| 7462 | |
| 7463 | sword OCIFileOpen ( void *hndl, OCIError *err, OCIFileObject **filep, |
| 7464 | OraText *filename, OraText *path, ub4 mode, ub4 create, |
| 7465 | ub4 type ); |
| 7466 | |
| 7467 | sword OCIFileRead ( void *hndl, OCIError *err, OCIFileObject *filep, |
| 7468 | void *bufp, ub4 bufl, ub4 *bytesread ); |
| 7469 | |
| 7470 | sword OCIFileSeek ( void *hndl, OCIError *err, OCIFileObject *filep, |
| 7471 | uword origin, ubig_ora offset, sb1 dir ); |
| 7472 | |
| 7473 | sword OCIFileTerm ( void *hndl, OCIError *err ); |
| 7474 | |
| 7475 | |
| 7476 | sword OCIFileWrite ( void *hndl, OCIError *err, OCIFileObject *filep, |
| 7477 | void *bufp, ub4 buflen, ub4 *byteswritten ); |
| 7478 | |
| 7479 | |
| 7480 | #ifdef ORAXB8_DEFINED |
| 7481 | |
| 7482 | sword OCILobCopy2 (OCISvcCtx *svchp, OCIError *errhp, |
| 7483 | OCILobLocator *dst_locp, |
| 7484 | OCILobLocator *src_locp, oraub8 amount, |
| 7485 | oraub8 dst_offset, |
| 7486 | oraub8 src_offset); |
| 7487 | |
| 7488 | sword OCILobErase2 (OCISvcCtx *svchp, OCIError *errhp, OCILobLocator *locp, |
| 7489 | oraub8 *amount, oraub8 offset); |
| 7490 | |
| 7491 | sword OCILobGetLength2 (OCISvcCtx *svchp, OCIError *errhp, |
| 7492 | OCILobLocator *locp, oraub8 *lenp); |
| 7493 | |
| 7494 | sword OCILobLoadFromFile2 (OCISvcCtx *svchp, OCIError *errhp, |
| 7495 | OCILobLocator *dst_locp, |
| 7496 | OCILobLocator *src_filep, |
| 7497 | oraub8 amount, oraub8 dst_offset, |
| 7498 | oraub8 src_offset); |
| 7499 | |
| 7500 | sword OCILobRead2 (OCISvcCtx *svchp, OCIError *errhp, OCILobLocator *locp, |
| 7501 | oraub8 *byte_amtp, oraub8 *char_amtp, oraub8 offset, |
| 7502 | void *bufp, oraub8 bufl, ub1 piece, void *ctxp, |
| 7503 | OCICallbackLobRead2 cbfp, ub2 csid, ub1 csfrm); |
| 7504 | |
| 7505 | sword OCILobArrayRead (OCISvcCtx *svchp, OCIError *errhp, ub4 *array_iter, |
| 7506 | OCILobLocator **lobp_arr, oraub8 *byte_amt_arr, |
| 7507 | oraub8 *char_amt_arr, oraub8 *offset_arr, |
| 7508 | void **bufp_arr, oraub8 *bufl_arr, ub1 piece, |
| 7509 | void *ctxp, OCICallbackLobArrayRead cbfp, ub2 csid, |
| 7510 | ub1 csfrm); |
| 7511 | |
| 7512 | sword OCILobTrim2 (OCISvcCtx *svchp, OCIError *errhp, OCILobLocator *locp, |
| 7513 | oraub8 newlen); |
| 7514 | |
| 7515 | sword OCILobWrite2 (OCISvcCtx *svchp, OCIError *errhp, OCILobLocator *locp, |
| 7516 | oraub8 *byte_amtp, oraub8 *char_amtp, oraub8 offset, |
| 7517 | void *bufp, oraub8 buflen, ub1 piece, void *ctxp, |
| 7518 | OCICallbackLobWrite2 cbfp, ub2 csid, ub1 csfrm); |
| 7519 | |
| 7520 | sword OCILobArrayWrite (OCISvcCtx *svchp, OCIError *errhp, ub4 *array_iter, |
| 7521 | OCILobLocator **lobp_arr, oraub8 *byte_amt_arr, |
| 7522 | oraub8 *char_amt_arr, oraub8 *offset_arr, |
| 7523 | void **bufp_arr, oraub8 *bufl_arr, ub1 piece, |
| 7524 | void *ctxp, OCICallbackLobArrayWrite cbfp, ub2 csid, |
| 7525 | ub1 csfrm); |
| 7526 | |
| 7527 | sword OCILobWriteAppend2 (OCISvcCtx *svchp, OCIError *errhp, |
| 7528 | OCILobLocator *lobp, |
| 7529 | oraub8 *byte_amtp, oraub8 *char_amtp, void *bufp, |
| 7530 | oraub8 bufl, ub1 piece, void *ctxp, |
| 7531 | OCICallbackLobWrite2 cbfp, ub2 csid, ub1 csfrm); |
| 7532 | |
| 7533 | sword OCILobGetStorageLimit (OCISvcCtx *svchp, OCIError *errhp, |
| 7534 | OCILobLocator *lobp, oraub8 *limitp); |
| 7535 | |
| 7536 | sword OCILobGetOptions (OCISvcCtx *svchp, OCIError *errhp, |
| 7537 | OCILobLocator *lobp, |
| 7538 | ub4 optypes, void *optionsp, ub4 *optionslenp, |
| 7539 | ub4 mode); |
| 7540 | |
| 7541 | sword OCILobSetOptions (OCISvcCtx *svchp, OCIError *errhp, |
| 7542 | OCILobLocator *lobp, |
| 7543 | ub4 optypes, void *optionsp, ub4 optionslen, |
| 7544 | ub4 mode); |
| 7545 | |
| 7546 | sword OCILobGetContentType (OCISvcCtx *svchp, |
| 7547 | OCIError *errhp, OCILobLocator *lobp, |
| 7548 | oratext *contenttypep, ub4 *contenttypelenp, |
| 7549 | ub4 mode); |
| 7550 | |
| 7551 | sword OCILobSetContentType (OCISvcCtx *svchp, |
| 7552 | OCIError *errhp, OCILobLocator *lobp, |
| 7553 | const oratext *contenttypep, ub4 contenttypelen, |
| 7554 | ub4 mode); |
| 7555 | |
| 7556 | #endif |
| 7557 | |
| 7558 | /* |
| 7559 | ** Initialize the security package |
| 7560 | */ |
| 7561 | sword OCISecurityInitialize (OCISecurity *sechandle, OCIError *error_handle); |
| 7562 | |
| 7563 | sword OCISecurityTerminate (OCISecurity *sechandle, OCIError *error_handle); |
| 7564 | |
| 7565 | sword OCISecurityOpenWallet(OCISecurity *osshandle, |
| 7566 | OCIError *error_handle, |
| 7567 | size_t wrllen, |
| 7568 | OraText *wallet_resource_locator, |
| 7569 | size_t pwdlen, |
| 7570 | OraText *password, |
| 7571 | nzttWallet *wallet); |
| 7572 | |
| 7573 | sword OCISecurityCloseWallet(OCISecurity *osshandle, |
| 7574 | OCIError *error_handle, |
| 7575 | nzttWallet *wallet); |
| 7576 | |
| 7577 | sword OCISecurityCreateWallet(OCISecurity *osshandle, |
| 7578 | OCIError *error_handle, |
| 7579 | size_t wrllen, |
| 7580 | OraText *wallet_resource_locator, |
| 7581 | size_t pwdlen, |
| 7582 | OraText *password, |
| 7583 | nzttWallet *wallet); |
| 7584 | |
| 7585 | sword OCISecurityDestroyWallet(OCISecurity *osshandle, |
| 7586 | OCIError *error_handle, |
| 7587 | size_t wrllen, |
| 7588 | OraText *wallet_resource_locator, |
| 7589 | size_t pwdlen, |
| 7590 | OraText *password); |
| 7591 | |
| 7592 | sword OCISecurityStorePersona(OCISecurity *osshandle, |
| 7593 | OCIError *error_handle, |
| 7594 | nzttPersona **persona, |
| 7595 | nzttWallet *wallet); |
| 7596 | |
| 7597 | sword OCISecurityOpenPersona(OCISecurity *osshandle, |
| 7598 | OCIError *error_handle, |
| 7599 | nzttPersona *persona); |
| 7600 | |
| 7601 | sword OCISecurityClosePersona(OCISecurity *osshandle, |
| 7602 | OCIError *error_handle, |
| 7603 | nzttPersona *persona); |
| 7604 | |
| 7605 | sword OCISecurityRemovePersona(OCISecurity *osshandle, |
| 7606 | OCIError *error_handle, |
| 7607 | nzttPersona **persona); |
| 7608 | |
| 7609 | sword OCISecurityCreatePersona(OCISecurity *osshandle, |
| 7610 | OCIError *error_handle, |
| 7611 | nzttIdentType identity_type, |
| 7612 | nzttCipherType cipher_type, |
| 7613 | nzttPersonaDesc *desc, |
| 7614 | nzttPersona **persona); |
| 7615 | |
| 7616 | sword OCISecuritySetProtection(OCISecurity *osshandle, |
| 7617 | OCIError *error_handle, |
| 7618 | nzttPersona *persona, |
| 7619 | nzttcef crypto_engine_function, |
| 7620 | nztttdufmt data_unit_format, |
| 7621 | nzttProtInfo *protection_info); |
| 7622 | |
| 7623 | sword OCISecurityGetProtection(OCISecurity *osshandle, |
| 7624 | OCIError *error_handle, |
| 7625 | nzttPersona *persona, |
| 7626 | nzttcef crypto_engine_function, |
| 7627 | nztttdufmt * data_unit_format_ptr, |
| 7628 | nzttProtInfo *protection_info); |
| 7629 | |
| 7630 | sword OCISecurityRemoveIdentity(OCISecurity *osshandle, |
| 7631 | OCIError *error_handle, |
| 7632 | nzttIdentity **identity_ptr); |
| 7633 | |
| 7634 | sword OCISecurityCreateIdentity(OCISecurity *osshandle, |
| 7635 | OCIError *error_handle, |
| 7636 | nzttIdentType type, |
| 7637 | nzttIdentityDesc *desc, |
| 7638 | nzttIdentity **identity_ptr); |
| 7639 | |
| 7640 | sword OCISecurityAbortIdentity(OCISecurity *osshandle, |
| 7641 | OCIError *error_handle, |
| 7642 | nzttIdentity **identity_ptr); |
| 7643 | |
| 7644 | sword OCISecurityFreeIdentity(OCISecurity *osshandle, |
| 7645 | OCIError *error_handle, |
| 7646 | nzttIdentity **identity_ptr); |
| 7647 | |
| 7648 | |
| 7649 | sword OCISecurityStoreTrustedIdentity(OCISecurity *osshandle, |
| 7650 | OCIError *error_handle, |
| 7651 | nzttIdentity **identity_ptr, |
| 7652 | nzttPersona *persona); |
| 7653 | |
| 7654 | sword OCISecuritySign(OCISecurity *osshandle, |
| 7655 | OCIError *error_handle, |
| 7656 | nzttPersona *persona, |
| 7657 | nzttces signature_state, |
| 7658 | size_t input_length, |
| 7659 | ub1 *input, |
| 7660 | nzttBufferBlock *buffer_block); |
| 7661 | |
| 7662 | sword OCISecuritySignExpansion(OCISecurity *osshandle, |
| 7663 | OCIError *error_handle, |
| 7664 | nzttPersona *persona, |
| 7665 | size_t inputlen, |
| 7666 | size_t *signature_length); |
| 7667 | |
| 7668 | sword OCISecurityVerify(OCISecurity *osshandle, |
| 7669 | OCIError *error_handle, |
| 7670 | nzttPersona *persona, |
| 7671 | nzttces signature_state, |
| 7672 | size_t siglen, |
| 7673 | ub1 *signature, |
| 7674 | nzttBufferBlock *extracted_message, |
| 7675 | boolean *verified, |
| 7676 | boolean *validated, |
| 7677 | nzttIdentity **signing_party_identity); |
| 7678 | |
| 7679 | sword OCISecurityValidate(OCISecurity *osshandle, |
| 7680 | OCIError *error_handle, |
| 7681 | nzttPersona *persona, |
| 7682 | nzttIdentity *identity, |
| 7683 | boolean *validated); |
| 7684 | |
| 7685 | sword OCISecuritySignDetached(OCISecurity *osshandle, |
| 7686 | OCIError *error_handle, |
| 7687 | nzttPersona *persona, |
| 7688 | nzttces signature_state, |
| 7689 | size_t input_length, |
| 7690 | ub1 * input, |
| 7691 | nzttBufferBlock *signature); |
| 7692 | |
| 7693 | sword OCISecuritySignDetExpansion(OCISecurity *osshandle, |
| 7694 | OCIError *error_handle, |
| 7695 | nzttPersona *persona, |
| 7696 | size_t input_length, |
| 7697 | size_t *required_buffer_length); |
| 7698 | |
| 7699 | sword OCISecurityVerifyDetached(OCISecurity *osshandle, |
| 7700 | OCIError *error_handle, |
| 7701 | nzttPersona *persona, |
| 7702 | nzttces signature_state, |
| 7703 | size_t data_length, |
| 7704 | ub1 *data, |
| 7705 | size_t siglen, |
| 7706 | ub1 *signature, |
| 7707 | boolean *verified, |
| 7708 | boolean *validated, |
| 7709 | nzttIdentity **signing_party_identity); |
| 7710 | |
| 7711 | sword OCISecurity_PKEncrypt(OCISecurity *osshandle, |
| 7712 | OCIError *error_handle, |
| 7713 | nzttPersona *persona, |
| 7714 | size_t number_of_recipients, |
| 7715 | nzttIdentity *recipient_list, |
| 7716 | nzttces encryption_state, |
| 7717 | size_t input_length, |
| 7718 | ub1 *input, |
| 7719 | nzttBufferBlock *encrypted_data); |
| 7720 | |
| 7721 | sword OCISecurityPKEncryptExpansion(OCISecurity *osshandle, |
| 7722 | OCIError *error_handle, |
| 7723 | nzttPersona *persona, |
| 7724 | size_t number_recipients, |
| 7725 | size_t input_length, |
| 7726 | size_t *buffer_length_required); |
| 7727 | |
| 7728 | sword OCISecurityPKDecrypt(OCISecurity *osshandle, |
| 7729 | OCIError *error_handle, |
| 7730 | nzttPersona *persona, |
| 7731 | nzttces encryption_state, |
| 7732 | size_t input_length, |
| 7733 | ub1 *input, |
| 7734 | nzttBufferBlock *encrypted_data); |
| 7735 | |
| 7736 | sword OCISecurityEncrypt(OCISecurity *osshandle, |
| 7737 | OCIError *error_handle, |
| 7738 | nzttPersona *persona, |
| 7739 | nzttces encryption_state, |
| 7740 | size_t input_length, |
| 7741 | ub1 *input, |
| 7742 | nzttBufferBlock *encrypted_data); |
| 7743 | |
| 7744 | sword OCISecurityEncryptExpansion(OCISecurity *osshandle, |
| 7745 | OCIError *error_handle, |
| 7746 | nzttPersona *persona, |
| 7747 | size_t input_length, |
| 7748 | size_t *encrypted_data_length); |
| 7749 | |
| 7750 | sword OCISecurityDecrypt(OCISecurity *osshandle, |
| 7751 | OCIError *error_handle, |
| 7752 | nzttPersona *persona, |
| 7753 | nzttces decryption_state, |
| 7754 | size_t input_length, |
| 7755 | ub1 *input, |
| 7756 | nzttBufferBlock *decrypted_data); |
| 7757 | |
| 7758 | sword OCISecurityEnvelope(OCISecurity *osshandle, |
| 7759 | OCIError *error_handle, |
| 7760 | nzttPersona *persona, |
| 7761 | size_t number_of_recipients, |
| 7762 | nzttIdentity *identity, |
| 7763 | nzttces encryption_state, |
| 7764 | size_t input_length, |
| 7765 | ub1 *input, |
| 7766 | nzttBufferBlock *enveloped_data); |
| 7767 | |
| 7768 | sword OCISecurityDeEnvelope(OCISecurity *osshandle, |
| 7769 | OCIError *error_handle, |
| 7770 | nzttPersona *persona, |
| 7771 | nzttces decryption_state, |
| 7772 | size_t input_length, |
| 7773 | ub1 *input, |
| 7774 | nzttBufferBlock *output_message, |
| 7775 | boolean *verified, |
| 7776 | boolean *validated, |
| 7777 | nzttIdentity **sender_identity); |
| 7778 | |
| 7779 | sword OCISecurityKeyedHash(OCISecurity *osshandle, |
| 7780 | OCIError *error_handle, |
| 7781 | nzttPersona *persona, |
| 7782 | nzttces hash_state, |
| 7783 | size_t input_length, |
| 7784 | ub1 *input, |
| 7785 | nzttBufferBlock *keyed_hash); |
| 7786 | |
| 7787 | sword OCISecurityKeyedHashExpansion(OCISecurity *osshandle, |
| 7788 | OCIError *error_handle, |
| 7789 | nzttPersona *persona, |
| 7790 | size_t input_length, |
| 7791 | size_t *required_buffer_length); |
| 7792 | |
| 7793 | sword OCISecurityHash(OCISecurity *osshandle, |
| 7794 | OCIError *error_handle, |
| 7795 | nzttPersona *persona, |
| 7796 | nzttces hash_state, |
| 7797 | size_t input, |
| 7798 | ub1 *input_length, |
| 7799 | nzttBufferBlock *hash); |
| 7800 | |
| 7801 | sword OCISecurityHashExpansion(OCISecurity *osshandle, |
| 7802 | OCIError *error_handle, |
| 7803 | nzttPersona *persona, |
| 7804 | size_t input_length, |
| 7805 | size_t *required_buffer_length); |
| 7806 | |
| 7807 | sword OCISecuritySeedRandom(OCISecurity *osshandle, |
| 7808 | OCIError *error_handle, |
| 7809 | nzttPersona *persona, |
| 7810 | size_t seed_length, |
| 7811 | ub1 *seed); |
| 7812 | |
| 7813 | sword OCISecurityRandomBytes(OCISecurity *osshandle, |
| 7814 | OCIError *error_handle, |
| 7815 | nzttPersona *persona, |
| 7816 | size_t number_of_bytes_desired, |
| 7817 | nzttBufferBlock *random_bytes); |
| 7818 | |
| 7819 | sword OCISecurityRandomNumber(OCISecurity *osshandle, |
| 7820 | OCIError *error_handle, |
| 7821 | nzttPersona *persona, |
| 7822 | uword *random_number_ptr); |
| 7823 | |
| 7824 | sword OCISecurityInitBlock(OCISecurity *osshandle, |
| 7825 | OCIError *error_handle, |
| 7826 | nzttBufferBlock *buffer_block); |
| 7827 | |
| 7828 | sword OCISecurityReuseBlock(OCISecurity *osshandle, |
| 7829 | OCIError *error_handle, |
| 7830 | nzttBufferBlock *buffer_block); |
| 7831 | |
| 7832 | sword OCISecurityPurgeBlock(OCISecurity *osshandle, |
| 7833 | OCIError *error_handle, |
| 7834 | nzttBufferBlock *buffer_block); |
| 7835 | |
| 7836 | sword OCISecuritySetBlock(OCISecurity *osshandle, |
| 7837 | OCIError *error_handle, |
| 7838 | uword flags_to_set, |
| 7839 | size_t buffer_length, |
| 7840 | size_t used_buffer_length, |
| 7841 | ub1 *buffer, |
| 7842 | nzttBufferBlock *buffer_block); |
| 7843 | |
| 7844 | sword OCISecurityGetIdentity(OCISecurity *osshandle, |
| 7845 | OCIError *error_handle, |
| 7846 | size_t namelen, |
| 7847 | OraText *distinguished_name, |
| 7848 | nzttIdentity **identity); |
| 7849 | |
| 7850 | sword OCIAQEnq(OCISvcCtx *svchp, OCIError *errhp, OraText *queue_name, |
| 7851 | OCIAQEnqOptions *enqopt, OCIAQMsgProperties *msgprop, |
| 7852 | OCIType *payload_tdo, void **payload, void **payload_ind, |
| 7853 | OCIRaw **msgid, ub4 flags); |
| 7854 | |
| 7855 | sword OCIAQDeq(OCISvcCtx *svchp, OCIError *errhp, OraText *queue_name, |
| 7856 | OCIAQDeqOptions *deqopt, OCIAQMsgProperties *msgprop, |
| 7857 | OCIType *payload_tdo, void **payload, void **payload_ind, |
| 7858 | OCIRaw **msgid, ub4 flags); |
| 7859 | |
| 7860 | sword OCIAQEnqArray(OCISvcCtx *svchp, OCIError *errhp, OraText *queue_name, |
| 7861 | OCIAQEnqOptions *enqopt, ub4 *iters, |
| 7862 | OCIAQMsgProperties **msgprop, OCIType *payload_tdo, |
| 7863 | void **payload, void **payload_ind, OCIRaw **msgid, |
| 7864 | void *ctxp, OCICallbackAQEnq enqcbfp, ub4 flags); |
| 7865 | |
| 7866 | sword OCIAQEnqStreaming(OCISvcCtx *svchp, OCIError *errhp, OraText *queue_name, |
| 7867 | OCIAQEnqOptions *enqopt, OCIType *payload_tdo, |
| 7868 | void *ctxp, OCICallbackAQEnqStreaming enqcbfp, |
| 7869 | ub4 flags); |
| 7870 | |
| 7871 | sword OCIAQDeqArray(OCISvcCtx *svchp, OCIError *errhp, OraText *queue_name, |
| 7872 | OCIAQDeqOptions *deqopt, ub4 *iters, |
| 7873 | OCIAQMsgProperties **msgprop, OCIType *payload_tdo, |
| 7874 | void **payload, void **payload_ind, OCIRaw **msgid, |
| 7875 | void *ctxp, OCICallbackAQDeq deqcbfp, ub4 flags); |
| 7876 | |
| 7877 | sword OCIAQListen(OCISvcCtx *svchp, OCIError *errhp, |
| 7878 | OCIAQAgent **agent_list, ub4 num_agents, |
| 7879 | sb4 wait, OCIAQAgent **agent, |
| 7880 | ub4 flags); |
| 7881 | |
| 7882 | sword OCIAQListen2(OCISvcCtx *svchp, OCIError *errhp, |
| 7883 | OCIAQAgent **agent_list, ub4 num_agents, |
| 7884 | OCIAQListenOpts *lopts, OCIAQAgent **agent, |
| 7885 | OCIAQLisMsgProps *lmops, ub4 flags); |
| 7886 | |
| 7887 | sword OCIAQGetReplayInfo(OCISvcCtx *svchp, OCIError *errhp, |
| 7888 | OraText *queue_name, OCIAQAgent *sender, |
| 7889 | ub4 replay_attribute, OraText *correlation, |
| 7890 | ub2 *corr_len); |
| 7891 | |
| 7892 | sword OCIAQResetReplayInfo(OCISvcCtx *svchp, OCIError *errhp, |
| 7893 | OraText *queue_name, OCIAQAgent *sender, |
| 7894 | ub4 replay_attribute); |
| 7895 | |
| 7896 | sword OCIExtractInit(void *hndl, OCIError *err); |
| 7897 | |
| 7898 | sword OCIExtractTerm(void *hndl, OCIError *err); |
| 7899 | |
| 7900 | sword OCIExtractReset(void *hndl, OCIError *err); |
| 7901 | |
| 7902 | sword OCIExtractSetNumKeys(void *hndl, OCIError *err, uword numkeys); |
| 7903 | |
| 7904 | sword OCIExtractSetKey(void *hndl, OCIError *err, const OraText *name, |
| 7905 | ub1 type, ub4 flag, const void *defval, |
| 7906 | const sb4 *intrange, const OraText *const *strlist); |
| 7907 | |
| 7908 | sword OCIExtractFromFile(void *hndl, OCIError *err, ub4 flag, |
| 7909 | OraText *filename); |
| 7910 | |
| 7911 | sword OCIExtractFromStr(void *hndl, OCIError *err, ub4 flag, OraText *input); |
| 7912 | |
| 7913 | sword OCIExtractToInt(void *hndl, OCIError *err, OraText *keyname, |
| 7914 | uword valno, sb4 *retval); |
| 7915 | |
| 7916 | sword OCIExtractToBool(void *hndl, OCIError *err, OraText *keyname, |
| 7917 | uword valno, ub1 *retval); |
| 7918 | |
| 7919 | sword OCIExtractToStr(void *hndl, OCIError *err, OraText *keyname, |
| 7920 | uword valno, OraText *retval, uword buflen); |
| 7921 | |
| 7922 | sword OCIExtractToOCINum(void *hndl, OCIError *err, OraText *keyname, |
| 7923 | uword valno, OCINumber *retval); |
| 7924 | |
| 7925 | sword OCIExtractToList(void *hndl, OCIError *err, uword *numkeys); |
| 7926 | |
| 7927 | sword OCIExtractFromList(void *hndl, OCIError *err, uword index, |
| 7928 | OraText **name, |
| 7929 | ub1 *type, uword *numvals, void ***values); |
| 7930 | |
| 7931 | /* Memory Related Service Interfaces */ |
| 7932 | |
| 7933 | sword OCIMemoryAlloc(void *hdl, OCIError *err, void **mem, |
| 7934 | OCIDuration dur, ub4 size, ub4 flags); |
| 7935 | |
| 7936 | sword OCIMemoryResize(void *hdl, OCIError *err, void **mem, |
| 7937 | ub4 newsize, ub4 flags); |
| 7938 | |
| 7939 | sword OCIMemoryFree(void *hdl, OCIError *err, void *mem); |
| 7940 | |
| 7941 | sword OCIContextSetValue(void *hdl, OCIError *err, OCIDuration duration, |
| 7942 | ub1 *key, ub1 keylen, void *ctx_value); |
| 7943 | |
| 7944 | sword OCIContextGetValue(void *hdl, OCIError *err, ub1 *key, |
| 7945 | ub1 keylen, void **ctx_value); |
| 7946 | |
| 7947 | sword OCIContextClearValue(void *hdl, OCIError *err, ub1 *key, |
| 7948 | ub1 keylen); |
| 7949 | |
| 7950 | sword OCIContextGenerateKey(void *hdl, OCIError *err, ub4 *key); |
| 7951 | |
| 7952 | sword OCIMemorySetCurrentIDs(void *hdl, OCIError *err, |
| 7953 | ub4 curr_session_id, ub4 curr_trans_id, |
| 7954 | ub4 curr_stmt_id); |
| 7955 | |
| 7956 | sword OCIPicklerTdsCtxInit(OCIEnv *env, OCIError *err, |
| 7957 | OCIPicklerTdsCtx **tdsc); |
| 7958 | |
| 7959 | sword OCIPicklerTdsCtxFree(OCIEnv *env, OCIError *err, OCIPicklerTdsCtx *tdsc); |
| 7960 | |
| 7961 | sword OCIPicklerTdsInit(OCIEnv *env, OCIError *err, OCIPicklerTdsCtx *tdsc, |
| 7962 | OCIPicklerTds **tdsh); |
| 7963 | |
| 7964 | sword OCIPicklerTdsFree(OCIEnv *env, OCIError *err, OCIPicklerTds *tdsh); |
| 7965 | |
| 7966 | sword OCIPicklerTdsCreateElementNumber(OCIEnv *env, OCIError *err, |
| 7967 | OCIPicklerTds *tdsh, ub1 prec, |
| 7968 | sb1 scale, OCIPicklerTdsElement *elt); |
| 7969 | |
| 7970 | sword OCIPicklerTdsCreateElementChar(OCIEnv *env, OCIError *err, |
| 7971 | OCIPicklerTds *tdsh, ub2 len, |
| 7972 | OCIPicklerTdsElement *elt); |
| 7973 | |
| 7974 | sword OCIPicklerTdsCreateElementVarchar(OCIEnv *env, OCIError *err, |
| 7975 | OCIPicklerTds *tdsh, ub2 len, |
| 7976 | OCIPicklerTdsElement *elt); |
| 7977 | |
| 7978 | sword OCIPicklerTdsCreateElementRaw(OCIEnv *env, OCIError *err, |
| 7979 | OCIPicklerTds *tdsh, ub2 len, |
| 7980 | OCIPicklerTdsElement *elt); |
| 7981 | |
| 7982 | sword OCIPicklerTdsCreateElement(OCIEnv *env, OCIError *err, |
| 7983 | OCIPicklerTds *tdsh, OCITypeCode dty, |
| 7984 | OCIPicklerTdsElement *elt); |
| 7985 | |
| 7986 | sword OCIPicklerTdsAddAttr(OCIEnv *env, OCIError *err, |
| 7987 | OCIPicklerTds *tdsh, OCIPicklerTdsElement elt); |
| 7988 | |
| 7989 | sword OCIPicklerTdsGenerate(OCIEnv *env, OCIError *err, |
| 7990 | OCIPicklerTds *tdsh); |
| 7991 | |
| 7992 | sword OCIPicklerTdsGetAttr(OCIEnv *env, OCIError *err, |
| 7993 | const OCIPicklerTds *tdsh, ub1 attrno, |
| 7994 | OCITypeCode *typ, ub2 *len); |
| 7995 | |
| 7996 | sword OCIPicklerFdoInit(OCIEnv *env, OCIError *err, |
| 7997 | OCIPicklerFdo **fdoh); |
| 7998 | |
| 7999 | sword OCIPicklerFdoFree(OCIEnv *env, OCIError *err, |
| 8000 | OCIPicklerFdo *fdoh); |
| 8001 | |
| 8002 | sword OCIPicklerImageInit(OCIEnv *env, OCIError *err, |
| 8003 | OCIPicklerFdo *fdoh, |
| 8004 | OCIPicklerTds *tdsh, |
| 8005 | OCIPicklerImage **imgh); |
| 8006 | |
| 8007 | sword OCIPicklerImageFree(OCIEnv *env, OCIError *err, |
| 8008 | OCIPicklerImage *imgh); |
| 8009 | |
| 8010 | sword OCIPicklerImageAddScalar(OCIEnv *env, OCIError *err, |
| 8011 | OCIPicklerImage *imgh, |
| 8012 | void *scalar, ub4 len); |
| 8013 | |
| 8014 | sword OCIPicklerImageAddNullScalar(OCIEnv *env, OCIError *err, |
| 8015 | OCIPicklerImage *imgh); |
| 8016 | |
| 8017 | sword OCIPicklerImageGenerate(OCIEnv *env, OCIError *err, |
| 8018 | OCIPicklerImage *imgh); |
| 8019 | |
| 8020 | sword OCIPicklerImageGetScalarSize(OCIEnv *env, OCIError *err, |
| 8021 | OCIPicklerImage *imgh, |
| 8022 | ub4 attrno, ub4 *size); |
| 8023 | |
| 8024 | sword OCIPicklerImageGetScalar(OCIEnv *env, OCIError *err, |
| 8025 | OCIPicklerImage *imgh, ub4 attrno, |
| 8026 | void *buf, ub4 *len, OCIInd *ind); |
| 8027 | |
| 8028 | sword OCIPicklerImageCollBegin(OCIEnv *env, OCIError *err, |
| 8029 | OCIPicklerImage *imgh, const OCIPicklerTds *colltdsh); |
| 8030 | |
| 8031 | sword OCIPicklerImageCollAddScalar( OCIEnv *env, OCIError *err, |
| 8032 | OCIPicklerImage *imgh, void *scalar, |
| 8033 | ub4 buflen, OCIInd ind); |
| 8034 | |
| 8035 | sword OCIPicklerImageCollEnd(OCIEnv *env, OCIError *err, |
| 8036 | OCIPicklerImage *imgh); |
| 8037 | |
| 8038 | /* should take svcctx for locator stuff */ |
| 8039 | sword OCIPicklerImageCollBeginScan(OCIEnv *env, OCIError *err, |
| 8040 | OCIPicklerImage *imgh, const OCIPicklerTds *coll_tdsh, |
| 8041 | ub4 attrnum, ub4 startidx, OCIInd *ind); |
| 8042 | |
| 8043 | sword OCIPicklerImageCollGetScalarSize(OCIEnv *env, OCIError *err, |
| 8044 | const OCIPicklerTds *coll_tdsh, ub4 *size); |
| 8045 | |
| 8046 | sword OCIPicklerImageCollGetScalar(OCIEnv *env, OCIError *err, |
| 8047 | OCIPicklerImage *imgh, void *buf, |
| 8048 | ub4 *buflen, OCIInd *ind); |
| 8049 | |
| 8050 | sword OCIAnyDataGetType(OCISvcCtx *svchp, OCIError *errhp, OCIAnyData *sdata, |
| 8051 | OCITypeCode *tc, OCIType **type); |
| 8052 | |
| 8053 | sword OCIAnyDataIsNull(OCISvcCtx *svchp, OCIError *errhp, OCIAnyData *sdata, |
| 8054 | boolean *isnull); |
| 8055 | |
| 8056 | sword OCIAnyDataConvert(OCISvcCtx *svchp, OCIError *errhp, OCITypeCode tc, |
| 8057 | OCIType *type, OCIDuration dur, void *ind, void *data_val, |
| 8058 | ub4 len, OCIAnyData **sdata); |
| 8059 | |
| 8060 | sword OCIAnyDataBeginCreate(OCISvcCtx *svchp, OCIError *errhp, OCITypeCode tc, |
| 8061 | OCIType *type, OCIDuration dur, OCIAnyData **sdata); |
| 8062 | |
| 8063 | sword OCIAnyDataDestroy(OCISvcCtx *svchp, OCIError *errhp, OCIAnyData *sdata); |
| 8064 | |
| 8065 | sword OCIAnyDataAttrSet(OCISvcCtx *svchp, OCIError *errhp, OCIAnyData *sdata, |
| 8066 | OCITypeCode tc, OCIType *type, void *ind, void *attr_val, |
| 8067 | ub4 length, boolean is_any); |
| 8068 | |
| 8069 | sword OCIAnyDataCollAddElem(OCISvcCtx *svchp, OCIError *errhp, |
| 8070 | OCIAnyData *sdata, OCITypeCode tc, OCIType *type, void *ind, |
| 8071 | void *attr_val, ub4 length, boolean is_any, boolean last_elem); |
| 8072 | |
| 8073 | sword OCIAnyDataEndCreate(OCISvcCtx *svchp, OCIError *errhp, |
| 8074 | OCIAnyData *sdata); |
| 8075 | |
| 8076 | sword OCIAnyDataAccess(OCISvcCtx *svchp, OCIError *errhp, OCIAnyData *sdata, |
| 8077 | OCITypeCode tc, OCIType *type, void *ind, void *attr_val, |
| 8078 | ub4 *length); |
| 8079 | |
| 8080 | sword OCIAnyDataGetCurrAttrNum(OCISvcCtx *svchp, OCIError *errhp, |
| 8081 | OCIAnyData *sdata, ub4 *attrnum); |
| 8082 | |
| 8083 | sword OCIAnyDataAttrGet(OCISvcCtx *svchp, OCIError *errhp, OCIAnyData *sdata, |
| 8084 | OCITypeCode tc, OCIType *type, void *ind, void *attr_val, |
| 8085 | ub4 *length, boolean is_any); |
| 8086 | |
| 8087 | sword OCIAnyDataCollGetElem(OCISvcCtx *svchp, OCIError *errhp, |
| 8088 | OCIAnyData *sdata, |
| 8089 | OCITypeCode tc, OCIType *type, void *ind, void *celem_val, |
| 8090 | ub4 *length, boolean is_any); |
| 8091 | |
| 8092 | |
| 8093 | /*------------------------ OCIAnyDataSet interfaces -------------------------*/ |
| 8094 | |
| 8095 | /* |
| 8096 | NAME |
| 8097 | OCIAnyDataSetBeginCreate - OCIAnyDataSet Begin Creation |
| 8098 | PARAMETERS |
| 8099 | svchp (IN/OUT) - The OCI service context. |
| 8100 | errhp (IN/OUT) - The OCI error handle. If there is an error, it is |
| 8101 | recorded in errhp and this function returns OCI_ERROR. |
| 8102 | Diagnostic information can be obtained by calling |
| 8103 | OCIErrorGet(). |
| 8104 | typecode - typecode corresponding to the OCIAnyDataSet. |
| 8105 | type (IN) - type corresponding to the OCIAnyDataSet. If the typecode |
| 8106 | corresponds to a built-in type (OCI_TYPECODE_NUMBER etc.) |
| 8107 | , this parameter can be NULL. It should be non NULL for |
| 8108 | user defined types (OCI_TYPECODE_OBJECT, |
| 8109 | OCI_TYPECODE_REF, collection types etc.) |
| 8110 | dur (IN) - duration for which OCIAnyDataSet is allocated. |
| 8111 | data_set (OUT) - Initialized OCIAnyDataSet. |
| 8112 | RETURNS - error code |
| 8113 | NOTES |
| 8114 | This call allocates an OCIAnyDataSet for the duration of dur and |
| 8115 | initializes it with the type information. The OCIAnyDataSet can hold |
| 8116 | multiple instances of the given type. For performance reasons, the |
| 8117 | OCIAnyDataSet will end up pointing to the passed in OCIType parameter. |
| 8118 | It is the responsibility of the caller to ensure that the OCIType is |
| 8119 | longer lived (has allocation duration >= the duration of the OCIAnyData |
| 8120 | if the OCIType is a transient one, allocation/pin duration >= duration of |
| 8121 | the OCIAnyData if the OCIType is a persistent one). |
| 8122 | |
| 8123 | */ |
| 8124 | sword OCIAnyDataSetBeginCreate(OCISvcCtx *svchp, OCIError *errhp, |
| 8125 | OCITypeCode typecode, const OCIType *type, OCIDuration dur, |
| 8126 | OCIAnyDataSet ** data_set); |
| 8127 | |
| 8128 | /* |
| 8129 | NAME |
| 8130 | OCIAnyDataSetDestroy - OCIAnyDataSet Destroy |
| 8131 | DESCRIPTION |
| 8132 | This call frees the OCIAnyDataSet allocated using |
| 8133 | OCIAnyDataSetBeginCreate(). |
| 8134 | RETURNS |
| 8135 | error code. |
| 8136 | PARAMETERS |
| 8137 | svchp (IN/OUT) - The OCI service context. |
| 8138 | errhp (IN/OUT) - The OCI Error handle. |
| 8139 | data_set (IN/OUT) - OCIAnyDataSet to be freed. |
| 8140 | */ |
| 8141 | sword OCIAnyDataSetDestroy(OCISvcCtx *svchp, OCIError *errhp, |
| 8142 | OCIAnyDataSet *data_set); |
| 8143 | |
| 8144 | |
| 8145 | /* |
| 8146 | NAME |
| 8147 | OCIAnyDataSetAddInstance - OCIAnyDataSet Add an instance |
| 8148 | DESCRIPTION |
| 8149 | This call adds a new skeleton instance to the OCIAnyDataSet and all the |
| 8150 | attributes of the instance are set to NULL. It returns this skeleton |
| 8151 | instance through the OCIAnyData parameter which can be constructed |
| 8152 | subsequently by invoking the OCIAnyData API. |
| 8153 | RETURNS |
| 8154 | error code. |
| 8155 | PARAMETERS |
| 8156 | svchp (IN/OUT) - The OCI service context. |
| 8157 | errhp (IN/OUT) - The OCI Error handle. |
| 8158 | data_set (IN/OUT) - OCIAnyDataSet to which a new instance is added. |
| 8159 | data (IN/OUT) - OCIAnyData corresponding to the newly added |
| 8160 | instance. If (*data) is NULL, a new OCIAnyData will |
| 8161 | be allocated for same duration as the OCIAnyDataSet. |
| 8162 | If (*data) is not NULL, it will get reused. This |
| 8163 | OCIAnyData can be subseqently constructed using the |
| 8164 | OCIAnyDataConvert() call or it can be constructed |
| 8165 | piece-wise using the OCIAnyDataAttrSet and |
| 8166 | OCIAnyDataCollAddElem calls. |
| 8167 | NOTES |
| 8168 | No Destruction of the old value is done here. It is the responsibility of |
| 8169 | the caller to destroy the old value pointed to by (*data) and set (*data) |
| 8170 | to a null pointer before beginning to make a sequence of this call. No |
| 8171 | deep copying (of OCIType information nor the data part.) is done in the |
| 8172 | returned OCIAnyData. This OCIAnyData cannot be used beyond the allocation |
| 8173 | duration of the OCIAnyDataSet (it is like a reference into the |
| 8174 | OCIAnyDataSet). The returned OCIAnyData can be reused on subsequent calls |
| 8175 | to this function, to sequentially add new data instances to the |
| 8176 | OCIAnyDataSet. |
| 8177 | */ |
| 8178 | sword OCIAnyDataSetAddInstance(OCISvcCtx *svchp, OCIError *errhp, |
| 8179 | OCIAnyDataSet *data_set, OCIAnyData **data); |
| 8180 | |
| 8181 | /* |
| 8182 | NAME |
| 8183 | OCIAnyDataSetEndCreate - OCIAnyDataSet End Creation process. |
| 8184 | DESCRIPTION |
| 8185 | This call marks the end of OCIAnyDataSet creation. It should be called |
| 8186 | after constructing all of its instance(s). |
| 8187 | RETURNS |
| 8188 | error code. |
| 8189 | PARAMETERS |
| 8190 | svchp (IN/OUT) - The OCI service context. |
| 8191 | errhp (IN/OUT) - The OCI error handle. If there is an error, it is |
| 8192 | recorded in errhp and this function returns |
| 8193 | OCI_ERROR. Diagnostic information can be obtained |
| 8194 | by calling OCIErrorGet(). |
| 8195 | data_set (IN/OUT) - OCIAnyDataSet that has been fully constructed. |
| 8196 | */ |
| 8197 | sword OCIAnyDataSetEndCreate(OCISvcCtx *svchp, OCIError *errhp, |
| 8198 | OCIAnyDataSet *data_set); |
| 8199 | |
| 8200 | /* |
| 8201 | NAME |
| 8202 | OCIAnyDataSetGetType - OCIAnyDataSet Get Type of an OCIAnyDataSet |
| 8203 | DESCRIPTION |
| 8204 | Gets the Type corresponding to an OCIAnyDataSet. It returns the actual |
| 8205 | pointer to the type maintained inside an OCIAnyDataSet. No copying is |
| 8206 | done for performance reasons. The client is responsible for not using |
| 8207 | this type once the OCIAnyDataSet is freed (or its duration ends). |
| 8208 | RETURNS |
| 8209 | error code. |
| 8210 | PARAMETERS |
| 8211 | svchp (IN/OUT) - The OCI service context. |
| 8212 | errhp (IN/OUT) - The OCI Error handle. |
| 8213 | data_set (IN) - Initialized OCIAnyDataSet. |
| 8214 | tc (OUT) - The typecode of the type. |
| 8215 | type (OUT) - The type corresponding to the OCIAnyDataSet. This |
| 8216 | could be null if the OCIAnyData corresponds to a |
| 8217 | built-in type. |
| 8218 | */ |
| 8219 | sword OCIAnyDataSetGetType (OCISvcCtx *svchp, OCIError *errhp, |
| 8220 | OCIAnyDataSet *data_set, OCITypeCode *tc, OCIType **type); |
| 8221 | |
| 8222 | /* |
| 8223 | NAME |
| 8224 | OCIAnyDataSetGetCount - OCIAnyDataSet Get Count of instances. |
| 8225 | DESCRIPTION |
| 8226 | This call gets the number of instances in the OCIAnyDataSet. |
| 8227 | RETURNS |
| 8228 | error code. |
| 8229 | PARAMETERS |
| 8230 | svchp (IN/OUT) - OCI Service Context |
| 8231 | errhp (IN/OUT) - OCI Error handle |
| 8232 | data_set (IN) - Well formed OCIAnyDataSet. |
| 8233 | count (OUT) - number of instances in OCIAnyDataSet |
| 8234 | */ |
| 8235 | sword OCIAnyDataSetGetCount(OCISvcCtx *svchp, OCIError *errhp, |
| 8236 | OCIAnyDataSet *data_set, ub4 *count); |
| 8237 | |
| 8238 | /* |
| 8239 | NAME |
| 8240 | OCIAnyDataSetGetInstance - OCIAnyDataSet Get next instance. |
| 8241 | DESCRIPTION |
| 8242 | Only sequential access to the instances in an OCIAnyDataSet is allowed. |
| 8243 | This call returns the OCIAnyData corresponding to an instance at the |
| 8244 | current position and updates the current position. Subsequently, the |
| 8245 | OCIAnyData access routines may be used to access the instance. |
| 8246 | RETURNS |
| 8247 | error code. Returns OCI_NO_DATA if the current position is at the end of |
| 8248 | the set, OCI_SUCCESS otherwise. |
| 8249 | PARAMETERS |
| 8250 | svchp (IN/OUT) - OCI Service Context |
| 8251 | errhp (IN/OUT) - OCI Error handle |
| 8252 | data_set (IN) - Well formed OCIAnyDataSet |
| 8253 | data (IN/OUT) - OCIAnyData corresponding to the instance. If (*data) |
| 8254 | is NULL, a new OCIAnyData will be allocated for same |
| 8255 | duration as the OCIAnyDataSet. If (*data) is not NULL |
| 8256 | , it will get reused. This OCIAnyData can be |
| 8257 | subsequently accessed using the OCIAnyDataAccess() |
| 8258 | call or piece-wise by using the OCIAnyDataAttrGet() |
| 8259 | call. |
| 8260 | NOTE |
| 8261 | No Destruction of the old value is done here. It is the responsibility of |
| 8262 | the caller to destroy the old value pointed to by (*data) and set (*data) |
| 8263 | to a null pointer before beginning to make a sequence of this call. No deep |
| 8264 | copying (of OCIType information nor the data part.) is done in the returned |
| 8265 | OCIAnyData. This OCIAnyData cannot be used beyond the allocation duration |
| 8266 | of the OCIAnyDataSet (it is like a reference into the OCIAnyDataSet). The |
| 8267 | returned OCIAnyData can be reused on subsequent calls to this function to |
| 8268 | sequentially access the OCIAnyDataSet. |
| 8269 | */ |
| 8270 | sword OCIAnyDataSetGetInstance(OCISvcCtx *svchp, OCIError *errhp, |
| 8271 | OCIAnyDataSet *data_set, OCIAnyData **data); |
| 8272 | |
| 8273 | /*--------------------- End of OCIAnyDataSet interfaces ---------------------*/ |
| 8274 | |
| 8275 | sword OCIFormatInit(void *hndl, OCIError *err); |
| 8276 | |
| 8277 | sword OCIFormatString(void *hndl, OCIError *err, OraText *buffer, |
| 8278 | sbig_ora bufferLength, sbig_ora *returnLength, |
| 8279 | const OraText *formatString, ...); |
| 8280 | |
| 8281 | sword OCIFormatTerm(void *hndl, OCIError *err); |
| 8282 | |
| 8283 | sword OCIFormatTUb1(void); |
| 8284 | sword OCIFormatTUb2(void); |
| 8285 | sword OCIFormatTUb4(void); |
| 8286 | sword OCIFormatTUword(void); |
| 8287 | sword OCIFormatTUbig_ora(void); |
| 8288 | sword OCIFormatTSb1(void); |
| 8289 | sword OCIFormatTSb2(void); |
| 8290 | sword OCIFormatTSb4(void); |
| 8291 | sword OCIFormatTSword(void); |
| 8292 | sword OCIFormatTSbig_ora(void); |
| 8293 | sword OCIFormatTEb1(void); |
| 8294 | sword OCIFormatTEb2(void); |
| 8295 | sword OCIFormatTEb4(void); |
| 8296 | sword OCIFormatTEword(void); |
| 8297 | sword OCIFormatTChar(void); |
| 8298 | sword OCIFormatTText(void); |
| 8299 | sword OCIFormatTDouble(void); |
| 8300 | sword OCIFormatTDvoid(void); |
| 8301 | sword OCIFormatTEnd(void); |
| 8302 | |
| 8303 | /*-------------------------- Extensions to XA interface ---------------------*/ |
| 8304 | /* ------------------------- xaosvch ----------------------------------------*/ |
| 8305 | /* |
| 8306 | NAME |
| 8307 | xaosvch - XA Oracle get SerViCe Handle |
| 8308 | DESCRIPTION |
| 8309 | Given a database name return the service handle that is used by the |
| 8310 | XA library |
| 8311 | NOTE |
| 8312 | This macro has been provided for backward compatibilty with 8.0.2 |
| 8313 | */ |
| 8314 | OCISvcCtx *xaosvch(OraText *dbname); |
| 8315 | |
| 8316 | /* ------------------------- xaoSvcCtx --------------------------------------*/ |
| 8317 | /* |
| 8318 | NAME |
| 8319 | xaoSvcCtx - XA Oracle get SerViCe ConTeXt |
| 8320 | DESCRIPTION |
| 8321 | Given a database name return the service handle that is used by the |
| 8322 | XA library |
| 8323 | NOTE |
| 8324 | This routine has been provided for APs to get access to the service |
| 8325 | handle that XA library uses. Without this routine APs must use SQLLIB |
| 8326 | routine sqlld2 to get access to the Logon data area registered by the |
| 8327 | XA library |
| 8328 | */ |
| 8329 | OCISvcCtx *xaoSvcCtx(OraText *dbname); |
| 8330 | |
| 8331 | /* ------------------------- xaoEnv -----------------------------------------*/ |
| 8332 | /* |
| 8333 | NAME |
| 8334 | xaoEnv - XA Oracle get ENvironment Handle |
| 8335 | DESCRIPTION |
| 8336 | Given a database name return the environment handle that is used by the |
| 8337 | XA library |
| 8338 | NOTE |
| 8339 | This routine has been provided for APs to get access to the environment |
| 8340 | handle that XA library uses. Without this routine APs must use SQLLIB |
| 8341 | routine sqlld2 to get access to the Logon data area registered by the |
| 8342 | XA library |
| 8343 | */ |
| 8344 | OCIEnv *xaoEnv(OraText *dbname); |
| 8345 | |
| 8346 | /* ------------------------- xaosterr ---------------------------------------*/ |
| 8347 | /* |
| 8348 | NAME |
| 8349 | xaosterr - XA Oracle get xa STart ERRor code |
| 8350 | DESCRIPTION |
| 8351 | Given an oracle error code return the XA error code |
| 8352 | */ |
| 8353 | int xaosterr(OCISvcCtx *svch, sb4 error); |
| 8354 | /*-------------------------- End Extensions ---------------------------------*/ |
| 8355 | /*---------------------- Extensions to NLS cartridge service ----------------*/ |
| 8356 | /* ----------------------- OCINlsGetInfo ------------------------------------*/ |
| 8357 | /* |
| 8358 | NAME |
| 8359 | OCINlsGetInfo - Get NLS info from OCI environment handle |
| 8360 | REMARKS |
| 8361 | This function generates language information specified by item from OCI |
| 8362 | environment handle envhp into an array pointed to by buf within size |
| 8363 | limitation as buflen. |
| 8364 | RETURNS |
| 8365 | OCI_SUCCESS, OCI_INVALID_HANDLE, or OCI_ERROR on wrong item. |
| 8366 | envhp(IN/OUT) |
| 8367 | OCI environment handle. |
| 8368 | errhp(IN/OUT) |
| 8369 | The OCI error handle. If there is an error, it is record in errhp and |
| 8370 | this function returns a NULL pointer. Diagnostic information can be |
| 8371 | obtained by calling OCIErrorGet(). |
| 8372 | buf(OUT) |
| 8373 | Pointer to the destination buffer. |
| 8374 | buflen(IN) |
| 8375 | The size of destination buffer. The maximum length for each information |
| 8376 | is 32 bytes. |
| 8377 | item(IN) |
| 8378 | It specifies to get which item in OCI environment handle and can be one |
| 8379 | of following values: |
| 8380 | OCI_NLS_DAYNAME1 : Native name for Monday. |
| 8381 | OCI_NLS_DAYNAME2 : Native name for Tuesday. |
| 8382 | OCI_NLS_DAYNAME3 : Native name for Wednesday. |
| 8383 | OCI_NLS_DAYNAME4 : Native name for Thursday. |
| 8384 | OCI_NLS_DAYNAME5 : Native name for Friday. |
| 8385 | OCI_NLS_DAYNAME6 : Native name for for Saturday. |
| 8386 | OCI_NLS_DAYNAME7 : Native name for for Sunday. |
| 8387 | OCI_NLS_ABDAYNAME1 : Native abbreviated name for Monday. |
| 8388 | OCI_NLS_ABDAYNAME2 : Native abbreviated name for Tuesday. |
| 8389 | OCI_NLS_ABDAYNAME3 : Native abbreviated name for Wednesday. |
| 8390 | OCI_NLS_ABDAYNAME4 : Native abbreviated name for Thursday. |
| 8391 | OCI_NLS_ABDAYNAME5 : Native abbreviated name for Friday. |
| 8392 | OCI_NLS_ABDAYNAME6 : Native abbreviated name for for Saturday. |
| 8393 | OCI_NLS_ABDAYNAME7 : Native abbreviated name for for Sunday. |
| 8394 | OCI_NLS_MONTHNAME1 : Native name for January. |
| 8395 | OCI_NLS_MONTHNAME2 : Native name for February. |
| 8396 | OCI_NLS_MONTHNAME3 : Native name for March. |
| 8397 | OCI_NLS_MONTHNAME4 : Native name for April. |
| 8398 | OCI_NLS_MONTHNAME5 : Native name for May. |
| 8399 | OCI_NLS_MONTHNAME6 : Native name for June. |
| 8400 | OCI_NLS_MONTHNAME7 : Native name for July. |
| 8401 | OCI_NLS_MONTHNAME8 : Native name for August. |
| 8402 | OCI_NLS_MONTHNAME9 : Native name for September. |
| 8403 | OCI_NLS_MONTHNAME10 : Native name for October. |
| 8404 | OCI_NLS_MONTHNAME11 : Native name for November. |
| 8405 | OCI_NLS_MONTHNAME12 : Native name for December. |
| 8406 | OCI_NLS_ABMONTHNAME1 : Native abbreviated name for January. |
| 8407 | OCI_NLS_ABMONTHNAME2 : Native abbreviated name for February. |
| 8408 | OCI_NLS_ABMONTHNAME3 : Native abbreviated name for March. |
| 8409 | OCI_NLS_ABMONTHNAME4 : Native abbreviated name for April. |
| 8410 | OCI_NLS_ABMONTHNAME5 : Native abbreviated name for May. |
| 8411 | OCI_NLS_ABMONTHNAME6 : Native abbreviated name for June. |
| 8412 | OCI_NLS_ABMONTHNAME7 : Native abbreviated name for July. |
| 8413 | OCI_NLS_ABMONTHNAME8 : Native abbreviated name for August. |
| 8414 | OCI_NLS_ABMONTHNAME9 : Native abbreviated name for September. |
| 8415 | OCI_NLS_ABMONTHNAME10 : Native abbreviated name for October. |
| 8416 | OCI_NLS_ABMONTHNAME11 : Native abbreviated name for November. |
| 8417 | OCI_NLS_ABMONTHNAME12 : Native abbreviated name for December. |
| 8418 | OCI_NLS_YES : Native string for affirmative response. |
| 8419 | OCI_NLS_NO : Native negative response. |
| 8420 | OCI_NLS_AM : Native equivalent string of AM. |
| 8421 | OCI_NLS_PM : Native equivalent string of PM. |
| 8422 | OCI_NLS_AD : Native equivalent string of AD. |
| 8423 | OCI_NLS_BC : Native equivalent string of BC. |
| 8424 | OCI_NLS_DECIMAL : decimal character. |
| 8425 | OCI_NLS_GROUP : group separator. |
| 8426 | OCI_NLS_DEBIT : Native symbol of debit. |
| 8427 | OCI_NLS_CREDIT : Native sumbol of credit. |
| 8428 | OCI_NLS_DATEFORMAT : Oracle date format. |
| 8429 | OCI_NLS_INT_CURRENCY: International currency symbol. |
| 8430 | OCI_NLS_LOC_CURRENCY : Locale currency symbol. |
| 8431 | OCI_NLS_LANGUAGE : Language name. |
| 8432 | OCI_NLS_ABLANGUAGE : Abbreviation for language name. |
| 8433 | OCI_NLS_TERRITORY : Territory name. |
| 8434 | OCI_NLS_CHARACTER_SET : Character set name. |
| 8435 | OCI_NLS_LINGUISTIC : Linguistic name. |
| 8436 | OCI_NLS_CALENDAR : Calendar name. |
| 8437 | OCI_NLS_DUAL_CURRENCY : Dual currency symbol. |
| 8438 | */ |
| 8439 | sword OCINlsGetInfo(void *envhp, OCIError *errhp, OraText *buf, |
| 8440 | size_t buflen, ub2 item); |
| 8441 | |
| 8442 | /* ----------------------- OCINlsNumericInfoGet -----------------------------*/ |
| 8443 | /* |
| 8444 | NAME |
| 8445 | OCINlsNumericInfoGet - Get NLS numeric info from OCI environment handle |
| 8446 | REMARKS |
| 8447 | This function generates numeric language information specified by item |
| 8448 | from OCI environment handle envhp into an output number variable. |
| 8449 | RETURNS |
| 8450 | OCI_SUCCESS, OCI_INVALID_HANDLE, or OCI_ERROR on wrong item. |
| 8451 | envhp(IN/OUT) |
| 8452 | OCI environment handle. If handle invalid, returns OCI_INVALID_HANDLE. |
| 8453 | errhp(IN/OUT) |
| 8454 | The OCI error handle. If there is an error, it is record in errhp and |
| 8455 | this function returns a NULL pointer. Diagnostic information can be |
| 8456 | obtained by calling OCIErrorGet(). |
| 8457 | val(OUT) |
| 8458 | Pointer to the output number variable. On OCI_SUCCESS return, it will |
| 8459 | contain the requested NLS numeric info. |
| 8460 | item(IN) |
| 8461 | It specifies to get which item in OCI environment handle and can be one |
| 8462 | of following values: |
| 8463 | OCI_NLS_CHARSET_MAXBYTESZ : Maximum character byte size for OCI |
| 8464 | environment or session handle charset |
| 8465 | OCI_NLS_CHARSET_FIXEDWIDTH: Character byte size for fixed-width charset; |
| 8466 | 0 for variable-width charset |
| 8467 | */ |
| 8468 | sword OCINlsNumericInfoGet(void *envhp, OCIError *errhp, sb4 *val, ub2 item); |
| 8469 | |
| 8470 | /* ----------------------- OCINlsCharSetNameToId ----------------------------*/ |
| 8471 | /* |
| 8472 | NAME |
| 8473 | OCINlsCharSetNameToId - Get Oracle charset id given Oracle charset name |
| 8474 | REMARKS |
| 8475 | This function will get the Oracle character set id corresponding to |
| 8476 | the given Oracle character set name. |
| 8477 | RETURNS |
| 8478 | Oracle character set id for the given Oracle character set name if |
| 8479 | character set name and OCI handle are valid; otherwise returns 0. |
| 8480 | envhp(IN/OUT) |
| 8481 | OCI environment handle. |
| 8482 | name(IN) |
| 8483 | Pointer to a null-terminated Oracle character set name whose id |
| 8484 | will be returned. |
| 8485 | */ |
| 8486 | ub2 OCINlsCharSetNameToId(void *envhp, const oratext *name); |
| 8487 | |
| 8488 | /* ----------------------- OCINlsCharSetIdToName ----------------------------*/ |
| 8489 | /* |
| 8490 | NAME |
| 8491 | OCINlsCharSetIdToName - Get Oracle charset name given Oracle charset id |
| 8492 | REMARKS |
| 8493 | This function will get the Oracle character set name corresponding to |
| 8494 | the given Oracle character set id. |
| 8495 | RETURNS |
| 8496 | OCI_SUCCESS, OCI_INVALID_HANDLE, or OCI_ERROR |
| 8497 | envhp(IN/OUT) |
| 8498 | OCI environment handle. If handle invalid, returns OCI_INVALID_HANDLE. |
| 8499 | buf(OUT) |
| 8500 | Pointer to the destination buffer. On OCI_SUCCESS return, it will contain |
| 8501 | the null-terminated string for character set name. |
| 8502 | buflen(IN) |
| 8503 | Size of destination buffer. Recommended size is OCI_NLS_MAXBUFSZ for |
| 8504 | guarantee to store an Oracle character set name. If it's smaller than |
| 8505 | the length of the character set name, the function will return OCI_ERROR. |
| 8506 | id(IN) |
| 8507 | Oracle character set id. |
| 8508 | */ |
| 8509 | sword OCINlsCharSetIdToName(void *envhp, oratext *buf, size_t buflen, ub2 id); |
| 8510 | |
| 8511 | /* ----------------------- OCINlsNameMap ------------------------------------*/ |
| 8512 | /* |
| 8513 | NAME |
| 8514 | OCINlsNameMap - Map NLS naming from Oracle to other standards and vice |
| 8515 | versa |
| 8516 | REMARKS |
| 8517 | This function will map NLS naming from Oracle to other standards (such |
| 8518 | as ISO, IANA) and vice versa. |
| 8519 | RETURNS |
| 8520 | OCI_SUCCESS, OCI_INVALID_HANDLE, or OCI_ERROR |
| 8521 | envhp(IN/OUT) |
| 8522 | OCI environment handle. If handle invalid, returns OCI_INVALID_HANDLE. |
| 8523 | buf(OUT) |
| 8524 | Pointer to the destination buffer. On OCI_SUCCESS return, it will |
| 8525 | contain null-terminated string for requested mapped name. |
| 8526 | buflen(IN) |
| 8527 | The size of destination buffer. Recommended size is OCI_NLS_MAXBUFSZ |
| 8528 | for guarantee to store an NLS name. If it is smaller than the length |
| 8529 | of the name, the function will return OCI_ERROR. |
| 8530 | srcbuf(IN) |
| 8531 | Pointer to null-terminated NLS name. If it is not a valid name in its |
| 8532 | define scope, the function will return OCI_ERROR. |
| 8533 | flag(IN) |
| 8534 | It specifies name mapping direction and can take the following values: |
| 8535 | OCI_NLS_CS_IANA_TO_ORA : Map character set name from IANA to Oracle |
| 8536 | OCI_NLS_CS_ORA_TO_IANA : Map character set name from Oracle to IANA |
| 8537 | OCI_NLS_LANG_ISO_TO_ORA : Map language name from ISO to Oracle |
| 8538 | OCI_NLS_LANG_ORA_TO_ISO : Map language name from Oracle to ISO |
| 8539 | OCI_NLS_TERR_ISO_TO_ORA : Map territory name from ISO to Oracle |
| 8540 | OCI_NLS_TERR_ORA_TO_ISO : Map territory name from Oracle to ISO |
| 8541 | OCI_NLS_TERR_ISO3_TO_ORA : Map territory name from 3-letter ISO |
| 8542 | abbreviation to Oracle |
| 8543 | OCI_NLS_TERR_ORA_TO_ISO3 : Map territory name from Oracle to 3-letter |
| 8544 | ISO abbreviation |
| 8545 | */ |
| 8546 | sword OCINlsNameMap(void *envhp, oratext *buf, size_t buflen, |
| 8547 | const oratext *srcbuf, ub4 flag); |
| 8548 | |
| 8549 | /* -------------------- OCIMultiByteToWideChar ------------------------------*/ |
| 8550 | /* |
| 8551 | NAME |
| 8552 | OCIMultiByteToWideChar - Convert a null terminated multibyte string into |
| 8553 | wchar |
| 8554 | REMARKS |
| 8555 | This routine converts an entire null-terminated string into the wchar |
| 8556 | format. The wchar output buffer will be null-terminated. |
| 8557 | RETURNS |
| 8558 | OCI_SUCCESS, OCI_INVALID_HANDLE or OCI_ERROR |
| 8559 | envhp(IN/OUT) |
| 8560 | OCI environment handle to determine the character set of string. |
| 8561 | dst (OUT) |
| 8562 | Destination buffer for wchar. |
| 8563 | src (IN) |
| 8564 | Source string to be converted. |
| 8565 | rsize (OUT) |
| 8566 | Number of characters converted including null-terminator. |
| 8567 | If it is a NULL pointer, no number return |
| 8568 | */ |
| 8569 | sword OCIMultiByteToWideChar(void *envhp, OCIWchar *dst, const OraText *src, |
| 8570 | size_t *rsize); |
| 8571 | |
| 8572 | |
| 8573 | /* --------------------- OCIMultiByteInSizeToWideChar -----------------------*/ |
| 8574 | /* |
| 8575 | NAME |
| 8576 | OCIMultiByteInSizeToWideChar - Convert a mulitbyte string in length into |
| 8577 | wchar |
| 8578 | REMARKS |
| 8579 | This routine converts part of string into the wchar format. It will |
| 8580 | convert as many complete characters as it can until it reaches output |
| 8581 | buffer size or input buffer size or it reaches a null-terminator in |
| 8582 | source string. The output buffer will be null-terminated if space permits. |
| 8583 | If dstsz is zero, this function will only return number of characters not |
| 8584 | including ending null terminator for converted string. |
| 8585 | RETURNS |
| 8586 | OCI_SUCCESS, OCI_INVALID_HANDLE or OCI_ERROR |
| 8587 | envhp(IN/OUT) |
| 8588 | OCI environment handle to determine the character set of string. |
| 8589 | dst (OUT) |
| 8590 | Pointer to a destination buffer for wchar. It can be NULL pointer when |
| 8591 | dstsz is zero. |
| 8592 | dstsz(IN) |
| 8593 | Destination buffer size in character. If it is zero, this function just |
| 8594 | returns number of characters will be need for the conversion. |
| 8595 | src (IN) |
| 8596 | Source string to be converted. |
| 8597 | srcsz(IN) |
| 8598 | Length of source string in byte. |
| 8599 | rsize(OUT) |
| 8600 | Number of characters written into destination buffer, or number of |
| 8601 | characters for converted string is dstsz is zero. |
| 8602 | If it is NULL pointer, nothing to return. |
| 8603 | */ |
| 8604 | sword OCIMultiByteInSizeToWideChar(void *envhp, OCIWchar *dst, |
| 8605 | size_t dstsz, const OraText *src, |
| 8606 | size_t srcsz, size_t *rsize); |
| 8607 | |
| 8608 | |
| 8609 | /* ---------------------- OCIWideCharToMultiByte ----------------------------*/ |
| 8610 | /* |
| 8611 | NAME |
| 8612 | OCIWideCharToMultiByte - Convert a null terminated wchar string into |
| 8613 | multibyte |
| 8614 | REMARKS |
| 8615 | This routine converts an entire null-terminated wide character string into |
| 8616 | multi-byte string. The output buffer will be null-terminated. |
| 8617 | RETURNS |
| 8618 | OCI_SUCCESS, OCI_INVALID_HANDLE or OCI_ERROR |
| 8619 | envhp(IN/OUT) |
| 8620 | OCI environment handle to determine the character set of string. |
| 8621 | dst (OUT) |
| 8622 | Destination buffer for multi-byte string. |
| 8623 | src (IN) |
| 8624 | Source wchar string to be converted. |
| 8625 | rsize (OUT) |
| 8626 | Number of bytes written into the destination buffer. |
| 8627 | If it is NULL pointer, nothing to return. |
| 8628 | */ |
| 8629 | sword OCIWideCharToMultiByte(void *envhp, OraText *dst, const OCIWchar *src, |
| 8630 | size_t *rsize); |
| 8631 | |
| 8632 | |
| 8633 | /* ---------------------- OCIWideCharInSizeToMultiByte ----------------------*/ |
| 8634 | /* |
| 8635 | NAME |
| 8636 | OCIWideCharInSizeToMultiByte - Convert a wchar string in length into |
| 8637 | mulitbyte |
| 8638 | REMARKS |
| 8639 | This routine converts part of wchar string into the multi-byte format. |
| 8640 | It will convert as many complete characters as it can until it reaches |
| 8641 | output buffer size or input buffer size or it reaches a null-terminator |
| 8642 | in source string. The output buffer will be null-terminated if space |
| 8643 | permits. If dstsz is zero, the function just returns the size of byte not |
| 8644 | including ending null-terminator need to store the converted string. |
| 8645 | RETURNS |
| 8646 | OCI_SUCCESS, OCI_INVALID_HANDLE or OCI_ERROR |
| 8647 | envhp(IN/OUT) |
| 8648 | OCI environment handle to determine the character set of string. |
| 8649 | dst (OUT) |
| 8650 | Destination buffer for multi-byte. It can be NULL pointer if dstsz is |
| 8651 | zero. |
| 8652 | dstsz(IN) |
| 8653 | Destination buffer size in byte. If it is zero, it just returns the size |
| 8654 | of bytes need for converted string. |
| 8655 | src (IN) |
| 8656 | Source wchar string to be converted. |
| 8657 | srcsz(IN) |
| 8658 | Length of source string in character. |
| 8659 | rsize(OUT) |
| 8660 | Number of bytes written into destination buffer, or number of bytes need |
| 8661 | to store the converted string if dstsz is zero. |
| 8662 | If it is NULL pointer, nothing to return. |
| 8663 | */ |
| 8664 | sword OCIWideCharInSizeToMultiByte(void *envhp, OraText *dst, |
| 8665 | size_t dstsz, const OCIWchar *src, |
| 8666 | size_t srcsz, size_t *rsize); |
| 8667 | |
| 8668 | |
| 8669 | |
| 8670 | /* ----------------------- OCIWideCharIsAlnum -------------------------------*/ |
| 8671 | /* |
| 8672 | NAME |
| 8673 | OCIWideCharIsAlnum - test whether wc is a letter or decimal digit |
| 8674 | REMARKS |
| 8675 | It tests whether wc is a letter or decimal digit. |
| 8676 | RETURNS |
| 8677 | TRUE or FLASE. |
| 8678 | envhp(IN/OUT) |
| 8679 | OCI environment handle to determine the character set . |
| 8680 | wc(IN) |
| 8681 | Wchar for testing. |
| 8682 | */ |
| 8683 | boolean OCIWideCharIsAlnum(void *envhp, OCIWchar wc); |
| 8684 | |
| 8685 | |
| 8686 | /* ----------------------- OCIWideCharIsAlpha -------------------------------*/ |
| 8687 | /* |
| 8688 | NAME |
| 8689 | OCIWideCharIsAlpha - test whether wc is an alphabetic letter |
| 8690 | REMARKS |
| 8691 | It tests whether wc is an alphabetic letter |
| 8692 | RETURNS |
| 8693 | TRUE or FLASE. |
| 8694 | envhp(IN/OUT) |
| 8695 | OCI environment handle to determine the character set . |
| 8696 | wc(IN) |
| 8697 | Wchar for testing. |
| 8698 | */ |
| 8699 | boolean OCIWideCharIsAlpha(void *envhp, OCIWchar wc); |
| 8700 | |
| 8701 | |
| 8702 | /* --------------------- OCIWideCharIsCntrl ---------------------------------*/ |
| 8703 | /* |
| 8704 | NAME |
| 8705 | OCIWideCharIsCntrl - test whether wc is a control character |
| 8706 | REMARKS |
| 8707 | It tests whether wc is a control character. |
| 8708 | RETURNS |
| 8709 | TRUE or FLASE. |
| 8710 | envhp(IN/OUT) |
| 8711 | OCI environment handle to determine the character set . |
| 8712 | wc(IN) |
| 8713 | Wchar for testing. |
| 8714 | */ |
| 8715 | boolean OCIWideCharIsCntrl(void *envhp, OCIWchar wc); |
| 8716 | |
| 8717 | |
| 8718 | /* ----------------------- OCIWideCharIsDigit -------------------------------*/ |
| 8719 | /* |
| 8720 | NAME |
| 8721 | OCIWideCharIsDigit - test whether wc is a decimal digit character |
| 8722 | REMARKS |
| 8723 | It tests whether wc is a decimal digit character. |
| 8724 | RETURNS |
| 8725 | TRUE or FLASE. |
| 8726 | envhp(IN/OUT) |
| 8727 | OCI environment handle to determine the character set . |
| 8728 | wc(IN) |
| 8729 | Wchar for testing. |
| 8730 | */ |
| 8731 | boolean OCIWideCharIsDigit(void *envhp, OCIWchar wc); |
| 8732 | |
| 8733 | |
| 8734 | /* ----------------------- OCIWideCharIsGraph -------------------------------*/ |
| 8735 | /* |
| 8736 | NAME |
| 8737 | OCIWideCharIsGraph - test whether wc is a graph character |
| 8738 | REMARKS |
| 8739 | It tests whether wc is a graph character. A graph character is character |
| 8740 | with a visible representation and normally includes alphabetic letter, |
| 8741 | decimal digit, and punctuation. |
| 8742 | RETURNS |
| 8743 | TRUE or FLASE. |
| 8744 | envhp(IN/OUT) |
| 8745 | OCI environment handle to determine the character set . |
| 8746 | wc(IN) |
| 8747 | Wchar for testing. |
| 8748 | */ |
| 8749 | boolean OCIWideCharIsGraph(void *envhp, OCIWchar wc); |
| 8750 | |
| 8751 | |
| 8752 | /* ----------------------- OCIWideCharIsLower -------------------------------*/ |
| 8753 | /* |
| 8754 | NAME |
| 8755 | OCIWideCharIsLower - test whether wc is a lowercase letter |
| 8756 | REMARKS |
| 8757 | It tests whether wc is a lowercase letter. |
| 8758 | RETURNS |
| 8759 | TRUE or FLASE. |
| 8760 | envhp(IN/OUT) |
| 8761 | OCI environment handle to determine the character set . |
| 8762 | wc(IN) |
| 8763 | Wchar for testing. |
| 8764 | */ |
| 8765 | boolean OCIWideCharIsLower(void *envhp, OCIWchar wc); |
| 8766 | |
| 8767 | |
| 8768 | /* ----------------------- OCIWideCharIsPrint -------------------------------*/ |
| 8769 | /* |
| 8770 | NAME |
| 8771 | OCIWideCharIsPrint - test whether wc is a printable character |
| 8772 | REMARKS |
| 8773 | It tests whether wc is a printable character. |
| 8774 | RETURNS |
| 8775 | TRUE or FLASE. |
| 8776 | envhp(IN/OUT) |
| 8777 | OCI environment handle to determine the character set . |
| 8778 | wc(IN) |
| 8779 | Wchar for testing. |
| 8780 | */ |
| 8781 | boolean OCIWideCharIsPrint(void *envhp, OCIWchar wc); |
| 8782 | |
| 8783 | |
| 8784 | /* ----------------------- OCIWideCharIsPunct -------------------------------*/ |
| 8785 | /* |
| 8786 | NAME |
| 8787 | OCIWideCharIsPunct - test whether wc is a punctuation character |
| 8788 | REMARKS |
| 8789 | It tests whether wc is a punctuation character. |
| 8790 | RETURNS |
| 8791 | TRUE or FLASE. |
| 8792 | envhp(IN/OUT) |
| 8793 | OCI environment handle to determine the character set . |
| 8794 | wc(IN) |
| 8795 | Wchar for testing. |
| 8796 | */ |
| 8797 | boolean OCIWideCharIsPunct(void *envhp, OCIWchar wc); |
| 8798 | |
| 8799 | |
| 8800 | /* ----------------------- OCIWideCharIsSpace -------------------------------*/ |
| 8801 | /* |
| 8802 | NAME |
| 8803 | OCIWideCharIsSpace - test whether wc is a space character |
| 8804 | REMARKS |
| 8805 | It tests whether wc is a space character. A space character only causes |
| 8806 | white space in displayed text(for example, space, tab, carriage return, |
| 8807 | newline, vertical tab or form feed). |
| 8808 | RETURNS |
| 8809 | TRUE or FLASE. |
| 8810 | envhp(IN/OUT) |
| 8811 | OCI environment handle to determine the character set . |
| 8812 | wc(IN) |
| 8813 | Wchar for testing. |
| 8814 | */ |
| 8815 | boolean OCIWideCharIsSpace(void *envhp, OCIWchar wc); |
| 8816 | |
| 8817 | |
| 8818 | /* ----------------------- OCIWideCharIsUpper -------------------------------*/ |
| 8819 | /* |
| 8820 | NAME |
| 8821 | OCIWideCharIsUpper - test whether wc is a uppercase letter |
| 8822 | REMARKS |
| 8823 | It tests whether wc is a uppercase letter. |
| 8824 | RETURNS |
| 8825 | TRUE or FLASE. |
| 8826 | envhp(IN/OUT) |
| 8827 | OCI environment handle to determine the character set . |
| 8828 | wc(IN) |
| 8829 | Wchar for testing. |
| 8830 | */ |
| 8831 | boolean OCIWideCharIsUpper(void *envhp, OCIWchar wc); |
| 8832 | |
| 8833 | |
| 8834 | /*----------------------- OCIWideCharIsXdigit -------------------------------*/ |
| 8835 | /* |
| 8836 | NAME |
| 8837 | OCIWideCharIsXdigit - test whether wc is a hexadecimal digit |
| 8838 | REMARKS |
| 8839 | It tests whether wc is a hexadecimal digit ( 0-9, A-F, a-f ). |
| 8840 | RETURNS |
| 8841 | TRUE or FLASE. |
| 8842 | envhp(IN/OUT) |
| 8843 | OCI environment handle to determine the character set . |
| 8844 | wc(IN) |
| 8845 | Wchar for testing. |
| 8846 | */ |
| 8847 | boolean OCIWideCharIsXdigit(void *envhp, OCIWchar wc); |
| 8848 | |
| 8849 | |
| 8850 | /* --------------------- OCIWideCharIsSingleByte ----------------------------*/ |
| 8851 | /* |
| 8852 | NAME |
| 8853 | OCIWideCharIsSingleByte - test whether wc is a single-byte character |
| 8854 | REMARKS |
| 8855 | It tests whether wc is a single-byte character when converted into |
| 8856 | multi-byte. |
| 8857 | RETURNS |
| 8858 | TRUE or FLASE. |
| 8859 | envhp(IN/OUT) |
| 8860 | OCI environment handle to determine the character set . |
| 8861 | wc(IN) |
| 8862 | Wchar for testing. |
| 8863 | */ |
| 8864 | boolean OCIWideCharIsSingleByte(void *envhp, OCIWchar wc); |
| 8865 | |
| 8866 | |
| 8867 | /* ----------------------- OCIWideCharToLower -------------------------------*/ |
| 8868 | /* |
| 8869 | NAME |
| 8870 | OCIWideCharToLower - Convert a wchar into the lowercase |
| 8871 | REMARKS |
| 8872 | If there is a lower-case character mapping for wc in the specified locale, |
| 8873 | it will return the lower-case in wchar, else return wc itself. |
| 8874 | RETURNS |
| 8875 | A wchar |
| 8876 | envhp(IN/OUT) |
| 8877 | OCI environment handle to determine the character set . |
| 8878 | wc(IN) |
| 8879 | Wchar for lowercase mapping. |
| 8880 | */ |
| 8881 | OCIWchar OCIWideCharToLower(void *envhp, OCIWchar wc); |
| 8882 | |
| 8883 | |
| 8884 | /* ----------------------- OCIWideCharToUpper -------------------------------*/ |
| 8885 | /* |
| 8886 | NAME |
| 8887 | OCIWideCharToUpper - Convert a wchar into the uppercase |
| 8888 | REMARKS |
| 8889 | If there is a upper-case character mapping for wc in the specified locale, |
| 8890 | it will return the upper-case in wchar, else return wc itself. |
| 8891 | RETURNS |
| 8892 | A wchar |
| 8893 | envhp(IN/OUT) |
| 8894 | OCI environment handle to determine the character set . |
| 8895 | wc(IN) |
| 8896 | Wchar for uppercase mapping. |
| 8897 | */ |
| 8898 | OCIWchar OCIWideCharToUpper(void *envhp, OCIWchar wc); |
| 8899 | |
| 8900 | |
| 8901 | /* ----------------------- OCIWideCharStrcmp --------------------------------*/ |
| 8902 | /* |
| 8903 | NAME |
| 8904 | OCIWideCharStrcmp - compare two null terminated wchar string |
| 8905 | REMARKS |
| 8906 | It compares two wchar string in binary ( based on wchar encoding value ), |
| 8907 | linguistic, or case-insensitive. |
| 8908 | RETURNS |
| 8909 | 0, if wstr1 == wstr2. |
| 8910 | Positive, if wstr1 > wstr2. |
| 8911 | Negative, if wstr1 < wstr2. |
| 8912 | envhp(IN/OUT) |
| 8913 | OCI environment handle to determine the character set. |
| 8914 | wstr1(IN) |
| 8915 | Pointer to a null-terminated wchar string. |
| 8916 | wstr2(IN) |
| 8917 | Pointer to a null-terminated wchar string. |
| 8918 | flag(IN) |
| 8919 | It is used to decide the comparison method. It can be taken one of the |
| 8920 | following values: |
| 8921 | OCI_NLS_BINARY : for the binary comparison, this is default value. |
| 8922 | OCI_NLS_LINGUISTIC : for linguistic comparison specified in the locale. |
| 8923 | This flag can be ORed with OCI_NLS_CASE_INSENSITIVE for case-insensitive |
| 8924 | comparison. |
| 8925 | */ |
| 8926 | int OCIWideCharStrcmp(void *envhp, const OCIWchar *wstr1, |
| 8927 | const OCIWchar *wstr2, int flag); |
| 8928 | |
| 8929 | |
| 8930 | /* ----------------------- OCIWideCharStrncmp -------------------------------*/ |
| 8931 | /* |
| 8932 | NAME |
| 8933 | OCIWideCharStrncmp - compare twe wchar string in length |
| 8934 | REMARKS |
| 8935 | This function is similar to OCIWideCharStrcmp(), except that at most len1 |
| 8936 | characters from wstr1 and len2 characters from wstr1 are compared. The |
| 8937 | null-terminator will be taken into the comparison. |
| 8938 | RETURNS |
| 8939 | 0, if wstr1 = wstr2 |
| 8940 | Positive, if wstr1 > wstr2 |
| 8941 | Negative, if wstr1 < wstr2 |
| 8942 | envhp(IN/OUT) |
| 8943 | OCI environment handle to determine the character set . |
| 8944 | wstr1(IN) |
| 8945 | Pointer to the first wchar string |
| 8946 | len1(IN) |
| 8947 | The length for the first string for comparison |
| 8948 | wstr2(IN) |
| 8949 | Pointer to the second wchar string |
| 8950 | len2(IN) |
| 8951 | The length for the second string for comparison. |
| 8952 | flag(IN) |
| 8953 | It is used to decide the comparison method. It can be taken one of the |
| 8954 | following values: |
| 8955 | OCI_NLS_BINARY : for the binary comparison, this is default value. |
| 8956 | OCI_NLS_LINGUISTIC : for linguistic comparison specified in the locale. |
| 8957 | This flag can be ORed with OCI_NLS_CASE_INSENSITIVE for case-insensitive |
| 8958 | comparison. |
| 8959 | */ |
| 8960 | int OCIWideCharStrncmp(void *envhp, const OCIWchar *wstr1, size_t len1, |
| 8961 | const OCIWchar *wstr2, size_t len2, int flag); |
| 8962 | |
| 8963 | |
| 8964 | /* ----------------------- OCIWideCharStrcat --------------------------------*/ |
| 8965 | /* |
| 8966 | NAME |
| 8967 | OCIWideCharStrcat - concatenate two wchar strings |
| 8968 | REMARKS |
| 8969 | This function appends a copy of the wchar string pointed to by wsrcstr, |
| 8970 | including the null-terminator to the end of wchar string pointed to by |
| 8971 | wdststr. It returns the number of character in the result string not |
| 8972 | including the ending null-terminator. |
| 8973 | RETURNS |
| 8974 | number of characters in the result string not including the ending |
| 8975 | null-terminator. |
| 8976 | envhp(IN/OUT) |
| 8977 | OCI environment handle to determine the character set . |
| 8978 | wdststr(IN/OUT) |
| 8979 | Pointer to the destination wchar string for appending. |
| 8980 | wsrcstr(IN) |
| 8981 | Pointer to the source wchar string to append. |
| 8982 | */ |
| 8983 | size_t OCIWideCharStrcat(void *envhp, OCIWchar *wdststr, |
| 8984 | const OCIWchar *wsrcstr); |
| 8985 | |
| 8986 | |
| 8987 | /* ----------------------- OCIWideCharStrchr --------------------------------*/ |
| 8988 | /* |
| 8989 | NAME |
| 8990 | OCIWideCharStrchr - Search the first occurrence of wchar in a wchar string |
| 8991 | REMARKS |
| 8992 | This function searchs for the first occurrence of wc in the wchar string |
| 8993 | pointed to by wstr. It returns a pointer to the whcar if successful, or |
| 8994 | a null pointer. |
| 8995 | RETURNS |
| 8996 | wchar pointer if successful, otherwise a null pointer. |
| 8997 | envhp(IN/OUT) |
| 8998 | OCI environment handle to determine the character set . |
| 8999 | wstr(IN) |
| 9000 | Pointer to the wchar string to search |
| 9001 | wc(IN) |
| 9002 | Wchar to search for. |
| 9003 | */ |
| 9004 | OCIWchar *OCIWideCharStrchr(void *envhp, const OCIWchar *wstr, |
| 9005 | OCIWchar wc); |
| 9006 | |
| 9007 | |
| 9008 | /* ----------------------- OCIWideCharStrcpy --------------------------------*/ |
| 9009 | /* |
| 9010 | NAME |
| 9011 | OCIWideCharStrcpy - copy a wchar string |
| 9012 | REMARKS |
| 9013 | This function copies the wchar string pointed to by wsrcstr, including the |
| 9014 | null-terminator, into the array pointed to by wdststr. It returns the |
| 9015 | number of character copied not including the ending null-terminator. |
| 9016 | RETURNS |
| 9017 | number of characters copied not including the ending null-terminator. |
| 9018 | envhp(IN/OUT) |
| 9019 | OCI environment handle to determine the character set . |
| 9020 | wdststr(OUT) |
| 9021 | Pointer to the destination wchar buffer. |
| 9022 | wsrcstr(IN) |
| 9023 | Pointer to the source wchar string. |
| 9024 | */ |
| 9025 | size_t OCIWideCharStrcpy(void *envhp, OCIWchar *wdststr, |
| 9026 | const OCIWchar *wsrcstr); |
| 9027 | |
| 9028 | |
| 9029 | /* ----------------------- OCIWideCharStrlen --------------------------------*/ |
| 9030 | /* |
| 9031 | NAME |
| 9032 | OCIWideCharStrlen - Return number of character in a wchar string |
| 9033 | REMARKS |
| 9034 | This function computes the number of characters in the wchar string |
| 9035 | pointed to by wstr, not including the null-terminator, and returns |
| 9036 | this number. |
| 9037 | RETURNS |
| 9038 | number of characters not including ending null-terminator. |
| 9039 | envhp(IN/OUT) |
| 9040 | OCI environment handle to determine the character set . |
| 9041 | wstr(IN) |
| 9042 | Pointer to the source wchar string. |
| 9043 | */ |
| 9044 | size_t OCIWideCharStrlen(void *envhp, const OCIWchar *wstr); |
| 9045 | |
| 9046 | |
| 9047 | /* ----------------------- OCIWideCharStrncat -------------------------------*/ |
| 9048 | /* |
| 9049 | NAME |
| 9050 | OCIWideCharStrncat - Concatenate wchar string in length |
| 9051 | REMARKS |
| 9052 | This function is similar to OCIWideCharStrcat(), except that at most n |
| 9053 | characters from wsrcstr are appended to wdststr. Note that the |
| 9054 | null-terminator in wsrcstr will stop appending. wdststr will be |
| 9055 | null-terminated.. |
| 9056 | RETURNS |
| 9057 | Number of characters in the result string not including the ending |
| 9058 | null-terminator. |
| 9059 | envhp(IN/OUT) |
| 9060 | OCI environment handle to determine the character set . |
| 9061 | wdststr(IN/OUT) |
| 9062 | Pointer to the destination wchar string for appending. |
| 9063 | wsrcstr(IN) |
| 9064 | Pointer to the source wchar string to append. |
| 9065 | n(IN) |
| 9066 | Number of characters from wsrcstr to append. |
| 9067 | */ |
| 9068 | size_t OCIWideCharStrncat(void *envhp, OCIWchar *wdststr, |
| 9069 | const OCIWchar *wsrcstr, size_t n); |
| 9070 | |
| 9071 | |
| 9072 | /* ----------------------- OCIWideCharStrncpy -------------------------------*/ |
| 9073 | /* |
| 9074 | NAME |
| 9075 | OCIWideCharStrncpy - Copy wchar string in length |
| 9076 | REMARKS |
| 9077 | This function is similar to OCIWideCharStrcpy(), except that at most n |
| 9078 | characters are copied from the array pointed to by wsrcstr to the array |
| 9079 | pointed to by wdststr. Note that the null-terminator in wdststr will |
| 9080 | stop coping and result string will be null-terminated. |
| 9081 | RETURNS |
| 9082 | number of characters copied not including the ending null-terminator. |
| 9083 | envhp(IN/OUT) |
| 9084 | OCI environment handle to determine the character set . |
| 9085 | wdststr(OUT) |
| 9086 | Pointer to the destination wchar buffer. |
| 9087 | wsrcstr(IN) |
| 9088 | Pointer to the source wchar string. |
| 9089 | n(IN) |
| 9090 | Number of characters from wsrcstr to copy. |
| 9091 | */ |
| 9092 | size_t OCIWideCharStrncpy(void *envhp, OCIWchar *wdststr, |
| 9093 | const OCIWchar *wsrcstr, size_t n); |
| 9094 | |
| 9095 | |
| 9096 | /* ----------------------- OCIWideCharStrrchr -------------------------------*/ |
| 9097 | /* |
| 9098 | NAME |
| 9099 | OCIWideCharStrrchr - search the last occurrence of a wchar in wchar string |
| 9100 | REMARKS |
| 9101 | This function searchs for the last occurrence of wc in the wchar string |
| 9102 | pointed to by wstr. It returns a pointer to the whcar if successful, or |
| 9103 | a null pointer. |
| 9104 | RETURNS |
| 9105 | wchar pointer if successful, otherwise a null pointer. |
| 9106 | envhp(IN/OUT) |
| 9107 | OCI environment handle to determine the character set . |
| 9108 | wstr(IN) |
| 9109 | Pointer to the wchar string to search |
| 9110 | wc(IN) |
| 9111 | Wchar to search for. |
| 9112 | */ |
| 9113 | OCIWchar *OCIWideCharStrrchr(void *envhp, const OCIWchar *wstr, |
| 9114 | OCIWchar wc); |
| 9115 | |
| 9116 | |
| 9117 | /* --------------------- OCIWideCharStrCaseConversion -----------------------*/ |
| 9118 | /* |
| 9119 | NAME |
| 9120 | OCIWideCharStrCaseConversion - convert a wchar string into lowercase or |
| 9121 | uppercase |
| 9122 | REMARKS |
| 9123 | This function convert the wide char string pointed to by wsrcstr into the |
| 9124 | uppercase or lowercase specified by flag and copies the result into the |
| 9125 | array pointed to by wdststr. The result string will be null-terminated. |
| 9126 | RETURNS |
| 9127 | number of characters for result string not including null-terminator. |
| 9128 | envhp(IN/OUT) |
| 9129 | OCI environment handle. |
| 9130 | wdststr(OUT) |
| 9131 | Pointer to destination array. |
| 9132 | wsrcstr(IN) |
| 9133 | Pointer to source string. |
| 9134 | flag(IN) |
| 9135 | Specify the case to convert: |
| 9136 | OCI_NLS_UPPERCASE : convert to uppercase. |
| 9137 | OCI_NLS_LOWERCASE: convert to lowercase. |
| 9138 | This flag can be ORed with OCI_NLS_LINGUISTIC to specify that the |
| 9139 | linguistic setting in the locale will be used for case conversion. |
| 9140 | */ |
| 9141 | size_t OCIWideCharStrCaseConversion(void *envhp, OCIWchar *wdststr, |
| 9142 | const OCIWchar *wsrcstr, ub4 flag); |
| 9143 | |
| 9144 | |
| 9145 | /*---------------------- OCIWideCharDisplayLength ---------------------------*/ |
| 9146 | /* |
| 9147 | NAME |
| 9148 | OCIWideCharDisplayLength - Calculate the display length for a wchar |
| 9149 | REMARKS |
| 9150 | This function determines the number of column positions required for wc |
| 9151 | in display. It returns number of column positions, or 0 if wc is |
| 9152 | null-terminator. |
| 9153 | RETURNS |
| 9154 | Number of display positions. |
| 9155 | envhp(IN/OUT) |
| 9156 | OCI environment handle to determine the character set . |
| 9157 | wc(IN) |
| 9158 | Wchar character. |
| 9159 | */ |
| 9160 | size_t OCIWideCharDisplayLength(void *envhp, OCIWchar wc ); |
| 9161 | |
| 9162 | |
| 9163 | /*---------------------- OCIWideCharMultiByteLength -------------------------*/ |
| 9164 | /* |
| 9165 | NAME |
| 9166 | OCIWideCharMultiByteLength - Determine byte size in multi-byte encoding |
| 9167 | REMARKS |
| 9168 | This function determines the number of byte required for wc in multi-byte |
| 9169 | encoding. It returns number of bytes in multi-byte for wc. |
| 9170 | RETURNS |
| 9171 | Number of bytes. |
| 9172 | envhp(IN/OUT) |
| 9173 | OCI environment handle to determine the character set . |
| 9174 | wc(IN) |
| 9175 | Wchar character. |
| 9176 | */ |
| 9177 | size_t OCIWideCharMultiByteLength(void *envhp, OCIWchar wc); |
| 9178 | |
| 9179 | |
| 9180 | /* ----------------------- OCIMultiByteStrcmp -------------------------------*/ |
| 9181 | /* |
| 9182 | NAME |
| 9183 | OCIMultiByteStrcmp - Compare two multi-byte strings |
| 9184 | REMARKS |
| 9185 | It compares two multi-byte strings in binary ( based on encoding value ), |
| 9186 | linguistic, or case-insensitive. |
| 9187 | RETURNS |
| 9188 | 0, if str1 == str2. |
| 9189 | Positive, if str1 > str2. |
| 9190 | Negative, if str1 < str2. |
| 9191 | envhp(IN/OUT) |
| 9192 | OCI environment handle to determine the character set. |
| 9193 | str1(IN) |
| 9194 | Pointer to a null-terminated string. |
| 9195 | str2(IN) |
| 9196 | Pointer to a null-terminated string. |
| 9197 | flag(IN) |
| 9198 | It is used to decide the comparison method. It can be taken one of the |
| 9199 | following values: |
| 9200 | OCI_NLS_BINARY: for the binary comparison, this is default value. |
| 9201 | OCI_NLS_LINGUISTIC: for linguistic comparison specified in the locale. |
| 9202 | This flag can be ORed with OCI_NLS_CASE_INSENSITIVE for case-insensitive |
| 9203 | comparison. |
| 9204 | */ |
| 9205 | int OCIMultiByteStrcmp(void *envhp, const OraText *str1, |
| 9206 | const OraText *str2, int flag); |
| 9207 | |
| 9208 | |
| 9209 | /*----------------------- OCIMultiByteStrncmp -------------------------------*/ |
| 9210 | /* |
| 9211 | NAME |
| 9212 | OCIMultiByteStrncmp - compare two strings in length |
| 9213 | REMARKS |
| 9214 | This function is similar to OCIMultiBytestrcmp(), except that at most |
| 9215 | len1 bytes from str1 and len2 bytes from str2 are compared. The |
| 9216 | null-terminator will be taken into the comparison. |
| 9217 | RETURNS |
| 9218 | 0, if str1 = str2 |
| 9219 | Positive, if str1 > str2 |
| 9220 | Negative, if str1 < str2 |
| 9221 | envhp(IN/OUT) |
| 9222 | OCI environment handle to determine the character set. |
| 9223 | str1(IN) |
| 9224 | Pointer to the first string |
| 9225 | len1(IN) |
| 9226 | The length for the first string for comparison |
| 9227 | str2(IN) |
| 9228 | Pointer to the second string |
| 9229 | len2(IN) |
| 9230 | The length for the second string for comparison. |
| 9231 | flag(IN) |
| 9232 | It is used to decide the comparison method. It can be taken one of the |
| 9233 | following values: |
| 9234 | OCI_NLS_BINARY: for the binary comparison, this is default value. |
| 9235 | OCI_NLS_LINGUISTIC: for linguistic comparison specified in the locale. |
| 9236 | This flag can be ORed with OCI_NLS_CASE_INSENSITIVE for case-insensitive |
| 9237 | comparison. |
| 9238 | */ |
| 9239 | int OCIMultiByteStrncmp(void *envhp, const OraText *str1, size_t len1, |
| 9240 | OraText *str2, size_t len2, int flag); |
| 9241 | |
| 9242 | |
| 9243 | /*----------------------- OCIMultiByteStrcat --------------------------------*/ |
| 9244 | /* |
| 9245 | NAME |
| 9246 | OCIMultiByteStrcat - concatenate multibyte strings |
| 9247 | REMARKS |
| 9248 | This function appends a copy of the multi-byte string pointed to by |
| 9249 | srcstr, including the null-terminator to the end of string pointed to by |
| 9250 | dststr. It returns the number of bytes in the result string not including |
| 9251 | the ending null-terminator. |
| 9252 | RETURNS |
| 9253 | number of bytes in the result string not including the ending |
| 9254 | null-terminator. |
| 9255 | envhp(IN/OUT) |
| 9256 | Pointer to OCI environment handle |
| 9257 | dststr(IN/OUT) |
| 9258 | Pointer to the destination multi-byte string for appending. |
| 9259 | srcstr(IN) |
| 9260 | Pointer to the source string to append. |
| 9261 | */ |
| 9262 | size_t OCIMultiByteStrcat(void *envhp, OraText *dststr, |
| 9263 | const OraText *srcstr); |
| 9264 | |
| 9265 | |
| 9266 | /*------------------------- OCIMultiByteStrcpy ------------------------------*/ |
| 9267 | /* |
| 9268 | NAME |
| 9269 | OCIMultiByteStrcpy - copy multibyte string |
| 9270 | REMARKS |
| 9271 | This function copies the multi-byte string pointed to by srcstr, |
| 9272 | including the null-terminator, into the array pointed to by dststr. It |
| 9273 | returns the number of bytes copied not including the ending |
| 9274 | null-terminator. |
| 9275 | RETURNS |
| 9276 | number of bytes copied not including the ending null-terminator. |
| 9277 | envhp(IN/OUT) |
| 9278 | Pointer to the OCI environment handle. |
| 9279 | srcstr(OUT) |
| 9280 | Pointer to the destination buffer. |
| 9281 | dststr(IN) |
| 9282 | Pointer to the source multi-byte string. |
| 9283 | */ |
| 9284 | size_t OCIMultiByteStrcpy(void *envhp, OraText *dststr, |
| 9285 | const OraText *srcstr); |
| 9286 | |
| 9287 | |
| 9288 | /*----------------------- OCIMultiByteStrlen --------------------------------*/ |
| 9289 | /* |
| 9290 | NAME |
| 9291 | OCIMultiByteStrlen - Calculate multibyte string length |
| 9292 | REMARKS |
| 9293 | This function computes the number of bytes in the multi-byte string |
| 9294 | pointed to by str, not including the null-terminator, and returns this |
| 9295 | number. |
| 9296 | RETURNS |
| 9297 | number of bytes not including ending null-terminator. |
| 9298 | str(IN) |
| 9299 | Pointer to the source multi-byte string. |
| 9300 | */ |
| 9301 | size_t OCIMultiByteStrlen(void *envhp, const OraText *str); |
| 9302 | |
| 9303 | |
| 9304 | /*----------------------- OCIMultiByteStrncat -------------------------------*/ |
| 9305 | /* |
| 9306 | NAME |
| 9307 | OCIMultiByteStrncat - concatenate string in length |
| 9308 | REMARKS |
| 9309 | This function is similar to OCIMultiBytestrcat(), except that at most n |
| 9310 | bytes from srcstr are appended to dststr. Note that the null-terminator in |
| 9311 | srcstr will stop appending and the function will append as many character |
| 9312 | as possible within n bytes. dststr will be null-terminated. |
| 9313 | RETURNS |
| 9314 | Number of bytes in the result string not including the ending |
| 9315 | null-terminator. |
| 9316 | envhp(IN/OUT) |
| 9317 | Pointer to OCI environment handle. |
| 9318 | srcstr(IN/OUT) |
| 9319 | Pointer to the destination multi-byte string for appending. |
| 9320 | dststr(IN) |
| 9321 | Pointer to the source multi-byte string to append. |
| 9322 | n(IN) |
| 9323 | Number of bytes from srcstr to append. |
| 9324 | */ |
| 9325 | size_t OCIMultiByteStrncat(void *envhp, OraText *dststr, |
| 9326 | const OraText *srcstr, size_t n); |
| 9327 | |
| 9328 | |
| 9329 | /*----------------------- OCIMultiByteStrncpy -------------------------------*/ |
| 9330 | /* |
| 9331 | NAME |
| 9332 | OCIMultiByteStrncpy - copy multibyte string in length |
| 9333 | REMARKS |
| 9334 | This function is similar to OCIMultiBytestrcpy(), except that at most n |
| 9335 | bytes are copied from the array pointed to by srcstr to the array pointed |
| 9336 | to by dststr. Note that the null-terminator in srcstr will stop coping and |
| 9337 | the function will copy as many character as possible within n bytes. The |
| 9338 | result string will be null-terminated. |
| 9339 | RETURNS |
| 9340 | number of bytes copied not including the ending null-terminator. |
| 9341 | envhp(IN/OUT) |
| 9342 | Pointer to a OCI environment handle. |
| 9343 | dststr(IN) |
| 9344 | Pointer to the source multi-byte string. |
| 9345 | srcstr(OUT) |
| 9346 | Pointer to the destination buffer. |
| 9347 | n(IN) |
| 9348 | Number of bytes from srcstr to copy. |
| 9349 | */ |
| 9350 | size_t OCIMultiByteStrncpy(void *envhp, OraText *dststr, |
| 9351 | const OraText *srcstr, size_t n); |
| 9352 | |
| 9353 | |
| 9354 | /*----------------------- OCIMultiByteStrnDisplayLength ---------------------*/ |
| 9355 | /* |
| 9356 | NAME |
| 9357 | OCIMultiByteStrnDisplayLength - calculate the display length for a |
| 9358 | multibyt string |
| 9359 | REMARKS |
| 9360 | This function returns the number of display positions occupied by the |
| 9361 | complete characters within the range of n bytes. |
| 9362 | RETURNS |
| 9363 | number of display positions. |
| 9364 | envhp(IN/OUT) |
| 9365 | OCI environment handle. |
| 9366 | str(IN) |
| 9367 | Pointer to a multi-byte string. |
| 9368 | n(IN) |
| 9369 | Number of bytes to examine. |
| 9370 | */ |
| 9371 | size_t OCIMultiByteStrnDisplayLength(void *envhp, const OraText *str1, |
| 9372 | size_t n); |
| 9373 | |
| 9374 | |
| 9375 | /*---------------------- OCIMultiByteStrCaseConversion ---------------------*/ |
| 9376 | /* |
| 9377 | NAME |
| 9378 | OCIMultiByteStrCaseConversion |
| 9379 | REMARKS |
| 9380 | This function convert the multi-byte string pointed to by srcstr into the |
| 9381 | uppercase or lowercase specified by flag and copies the result into the |
| 9382 | array pointed to by dststr. The result string will be null-terminated. |
| 9383 | RETURNS |
| 9384 | number of bytes for result string not including null-terminator. |
| 9385 | envhp(IN/OUT) |
| 9386 | OCI environment handle. |
| 9387 | dststr(OUT) |
| 9388 | Pointer to destination array. |
| 9389 | srcstr(IN) |
| 9390 | Pointer to source string. |
| 9391 | flag(IN) |
| 9392 | Specify the case to convert: |
| 9393 | OCI_NLS_UPPERCASE: convert to uppercase. |
| 9394 | OCI_NLS_LOWERCASE: convert to lowercase. |
| 9395 | This flag can be ORed with OCI_NLS_LINGUISTIC to specify that the |
| 9396 | linguistic setting in the locale will be used for case conversion. |
| 9397 | */ |
| 9398 | size_t OCIMultiByteStrCaseConversion(void *envhp, OraText *dststr, |
| 9399 | const OraText *srcstr, ub4 flag); |
| 9400 | |
| 9401 | |
| 9402 | /*------------------------- OCICharSetToUnicode -----------------------------*/ |
| 9403 | /* |
| 9404 | NAME |
| 9405 | OCICharSetToUnicode - convert multibyte string into Unicode as UCS2 |
| 9406 | REMARKS |
| 9407 | This function converts a multi-byte string pointed to by src to Unicode |
| 9408 | into the array pointed to by dst. The conversion will stop when it reach |
| 9409 | to the source limitation or destination limitation. |
| 9410 | The function will return number of characters converted into Unicode. |
| 9411 | If dstlen is zero, it will just return the number of characters for the |
| 9412 | result without real conversion. |
| 9413 | RETURNS |
| 9414 | OCI_SUCCESS, OCI_INVALID_HANDLE or OCI_ERROR |
| 9415 | envhp(IN/OUT) |
| 9416 | Pointer to an OCI environment handle |
| 9417 | dst(OUT) |
| 9418 | Pointer to a destination buffer |
| 9419 | dstlen(IN) |
| 9420 | Size of destination buffer in character |
| 9421 | src(IN) |
| 9422 | Pointer to multi-byte source string. |
| 9423 | srclen(IN) |
| 9424 | Size of source string in bytes. |
| 9425 | rsize(OUT) |
| 9426 | Number of characters converted. |
| 9427 | If it is a NULL pointer, nothing to return. |
| 9428 | */ |
| 9429 | sword OCICharSetToUnicode(void *envhp, ub2 *dst, size_t dstlen, |
| 9430 | const OraText *src, size_t srclen, size_t *rsize); |
| 9431 | |
| 9432 | |
| 9433 | /*------------------------- OCIUnicodeToCharSet -----------------------------*/ |
| 9434 | /* |
| 9435 | NAME |
| 9436 | OCIUnicodeToCharSet - convert Unicode into multibyte |
| 9437 | REMARKS |
| 9438 | This function converts a Unicode string pointed to by src to multi-byte |
| 9439 | into the array pointed to by dst. The conversion will stop when it reach |
| 9440 | to the source limitation or destination limitation. The function will |
| 9441 | return number of bytes converted into multi-byte. If dstlen is zero, it |
| 9442 | will just return the number of bytes for the result without real |
| 9443 | conversion. If a Unicode character is not convertible for the character |
| 9444 | set specified in OCI environment handle, a replacement character will be |
| 9445 | used for it. In this case, OCICharSetConversionIsReplacementUsed() will |
| 9446 | return ture. |
| 9447 | RETURNS |
| 9448 | OCI_SUCCESS, OCI_INVALID_HANDLE or OCI_ERROR |
| 9449 | envhp(IN/OUT) |
| 9450 | Pointer to an OCI environment handle. |
| 9451 | dst(OUT) |
| 9452 | Pointer to a destination buffer. |
| 9453 | dstlen(IN) |
| 9454 | Size of destination buffer in byte. |
| 9455 | src(IN) |
| 9456 | Pointer to a Unicode string. |
| 9457 | srclen(IN) |
| 9458 | Size of source string in characters. |
| 9459 | rsize(OUT) |
| 9460 | Number of bytes converted. |
| 9461 | If it is a NULL pointer, nothing to return. |
| 9462 | */ |
| 9463 | sword OCIUnicodeToCharSet(void *envhp, OraText *dst, size_t dstlen, |
| 9464 | const ub2 *src, size_t srclen, size_t *rsize); |
| 9465 | |
| 9466 | /*----------------------- OCINlsCharSetConvert ------------------------------*/ |
| 9467 | /* |
| 9468 | NAME |
| 9469 | OCINlsCharSetConvert - convert between any two character set. |
| 9470 | REMARKS |
| 9471 | This function converts a string pointed to by src in the character set |
| 9472 | specified with srcid to the array pointed to by dst in the character set |
| 9473 | specified with dstid. The conversion will stop when it reaches the source |
| 9474 | limitation or destination limitation. The function will return the number |
| 9475 | of bytes converted into the destination buffer. Even though either source |
| 9476 | or destination character set id is OCI_UTF16ID, given and return data |
| 9477 | length will be represented with the byte length as this function is |
| 9478 | intended for generic purpose. Note the conversion will not stop at null |
| 9479 | data. |
| 9480 | To get character set id from name, OCINlsCharSetNameToId can be used. |
| 9481 | To check if derived data in the destination buffer contains any |
| 9482 | replacement character resulting from conversion failure, |
| 9483 | OCICharSetConversionIsReplacementUsed can be used to get the status. |
| 9484 | Data alignment should be guaranteed by a caller. For example, UTF-16 data |
| 9485 | should be aligned to ub2 type. |
| 9486 | |
| 9487 | RETURNS |
| 9488 | OCI_SUCCESS or OCI_ERROR. |
| 9489 | errhp(IN/OUT) |
| 9490 | OCI error handle. If there is an error, it is recorded in errhp and this |
| 9491 | function returns a NULL pointer. Diagnostic information can be obtained |
| 9492 | by calling OCIErrorGet(). |
| 9493 | dstid(IN) |
| 9494 | Character set id for the destination buffer. |
| 9495 | dstp(OUT) |
| 9496 | Pointer to the destination buffer. |
| 9497 | dstlen(IN) |
| 9498 | The maximum byte size of destination buffer. |
| 9499 | srcid(IN) |
| 9500 | Character set id for the source buffer. |
| 9501 | srcp(IN) |
| 9502 | Pointer to the source buffer. |
| 9503 | srclen(IN) |
| 9504 | The length byte size of source buffer. |
| 9505 | rsize(OUT) |
| 9506 | The number of characters converted. If it is a NULL pointer, nothing to |
| 9507 | return. |
| 9508 | */ |
| 9509 | sword OCINlsCharSetConvert(void *envhp, OCIError *errhp, |
| 9510 | ub2 dstid, void *dstp, size_t dstlen, |
| 9511 | ub2 srcid, const void *srcp, size_t srclen, |
| 9512 | size_t *rsize); |
| 9513 | |
| 9514 | |
| 9515 | /* ------------------- OCICharsetConversionIsReplacementUsed ----------------*/ |
| 9516 | /* |
| 9517 | NAME |
| 9518 | OCICharsetConversionIsReplacementUsed - chech if replacement is used in |
| 9519 | conversion |
| 9520 | REMARKS |
| 9521 | This function indicates whether or not the replacement character was used |
| 9522 | for nonconvertible characters in character set conversion in last invoke |
| 9523 | of OCICharsetUcs2ToMb(). |
| 9524 | RETURNS |
| 9525 | TRUE is the replacement character was used in last OCICharsetUcs2ToMb() |
| 9526 | invoking, else FALSE. |
| 9527 | envhp(IN/OUT) |
| 9528 | OCI environment handle. This should be the first handle passed to |
| 9529 | OCICharsetUcs2ToMb(). |
| 9530 | */ |
| 9531 | boolean OCICharSetConversionIsReplacementUsed(void *envhp); |
| 9532 | |
| 9533 | /*------------------- OCINlsEnvironmentVariableGet -----------------*/ |
| 9534 | /* |
| 9535 | NAME |
| 9536 | OCINlsEnvironmentVariableGet - get a value of NLS environment variable. |
| 9537 | |
| 9538 | DESCRIPTION |
| 9539 | This function retrieves a value of NLS environment variable to the buffer |
| 9540 | pointed to by val. Data type is determined by the parameter specified by |
| 9541 | item. Either numeric data or string data can be retrieved. |
| 9542 | |
| 9543 | RETURNS |
| 9544 | OCI_SUCCESS or OCI_ERROR. |
| 9545 | |
| 9546 | PARAMETERS |
| 9547 | valp(OUT) - |
| 9548 | Pointer to the buffer. |
| 9549 | size(IN) - |
| 9550 | Size of the buffer. This argument is only applicable to string data type, |
| 9551 | but not to numerical data, in such case, it is ignored. |
| 9552 | item(IN) - |
| 9553 | NLS item value, which can be one of following values: |
| 9554 | OCI_NLS_CHARSET_ID - NLS_LANG character set id in ub2 data type. |
| 9555 | OCI_NLS_NCHARSET_ID - NLS_NCHAR character set id in ub2 data type. |
| 9556 | charset(IN) - |
| 9557 | Character set id for retrieved string data. If it is 0, NLS_LANG will be |
| 9558 | used. OCI_UTF16ID is a valid id. In case of numeric data, this argument |
| 9559 | is ignored. |
| 9560 | rsize(OUT) - |
| 9561 | Size of return value. |
| 9562 | |
| 9563 | NOTE |
| 9564 | This functions is mainly used for retrieving character set id from either |
| 9565 | NLS_LANG or NLS_NCHAR environment variables. If NLS_LANG is not set, |
| 9566 | the default character set id is returned. |
| 9567 | For future extension, the buffer is capable for storing other data types. |
| 9568 | */ |
| 9569 | sword OCINlsEnvironmentVariableGet(void *valp, size_t size, ub2 item, |
| 9570 | ub2 charset, size_t *rsize); |
| 9571 | |
| 9572 | |
| 9573 | /*------------------------- OCIMessageOpen ----------------------------------*/ |
| 9574 | /* |
| 9575 | NAME |
| 9576 | OCIMessageOpen - open a locale message file |
| 9577 | REMARKS |
| 9578 | This function opens a message handle for facility of product in a language |
| 9579 | pointed to by envhp. It first try to open the message file corresponding |
| 9580 | to envhp for the facility. If it successes, it will use that file to |
| 9581 | initialize a message handle, else it will use the default message file |
| 9582 | which is for American language for the facility. The function return a |
| 9583 | pointer pointed to a message handle into msghp parameter. |
| 9584 | RETURNS |
| 9585 | OCI_SUCCESS, OCI_INVALID_HANDLE or OCI_ERROR |
| 9586 | envhp(IN/OUT) |
| 9587 | A pointer to OCI environment handle for message language. |
| 9588 | errhp(IN/OUT) |
| 9589 | The OCI error handle. If there is an error, it is record in errhp and this |
| 9590 | function returns a NULL pointer. Diagnostic information can be obtained by |
| 9591 | calling OCIErrorGet(). |
| 9592 | msghp(OUT) |
| 9593 | a message handle for return |
| 9594 | product(IN) |
| 9595 | A pointer to a product name. Product name is used to locate the directory |
| 9596 | for message in a system dependent way. For example, in Solaris, the |
| 9597 | directory of message files for the product `rdbms' is |
| 9598 | `${ORACLE_HOME}/rdbms'. |
| 9599 | facility(IN) |
| 9600 | A pointer to a facility name in the product. It is used to construct a |
| 9601 | message file name. A message file name follows the conversion with |
| 9602 | facility as prefix. For example, the message file name for facility |
| 9603 | `img' in American language will be `imgus.msb' where `us' is the |
| 9604 | abbreviation of American language and `msb' as message binary file |
| 9605 | extension. |
| 9606 | dur(IN) |
| 9607 | Duration for memory allocation for the return message handle. It can be |
| 9608 | the following values: |
| 9609 | OCI_DURATION_CALL |
| 9610 | OCI_DURATION_STATEMENT |
| 9611 | OCI_DURATION_SESSION |
| 9612 | OCI_DURATION_TRANSACTION |
| 9613 | For the detail description, please refer to Memory Related Service |
| 9614 | Interfaces section. |
| 9615 | */ |
| 9616 | sword OCIMessageOpen(void *envhp, OCIError *errhp, OCIMsg **msghp, |
| 9617 | const OraText *product, const OraText *facility, |
| 9618 | OCIDuration dur); |
| 9619 | |
| 9620 | |
| 9621 | /*------------------------- OCIMessageGet -----------------------------------*/ |
| 9622 | /* |
| 9623 | NAME |
| 9624 | OCIMessageGet - get a locale message from a message handle |
| 9625 | REMARKS |
| 9626 | This function will get message with message number identified by msgno and |
| 9627 | if buflen is not zero, the function will copy the message into the buffer |
| 9628 | pointed to by msgbuf. If buflen is zero, the message will be copied into |
| 9629 | a message buffer inside the message handle pointed to by msgh. For both |
| 9630 | cases. it will return the pointer to the null-terminated message string. |
| 9631 | If it cannot get the message required, it will return a NULL pointer. |
| 9632 | RETURNS |
| 9633 | A pointer to a null-terminated message string on success, otherwise a NULL |
| 9634 | pointer. |
| 9635 | msgh(IN/OUT) |
| 9636 | Pointer to a message handle which was previously opened by |
| 9637 | OCIMessageOpen(). |
| 9638 | msgno(IN) |
| 9639 | The message number for getting message. |
| 9640 | msgbuf(OUT) |
| 9641 | Pointer to a destination buffer to the message retrieved. If buflen is |
| 9642 | zero, it can be NULL pointer. |
| 9643 | buflen(IN) |
| 9644 | The size of the above destination buffer. |
| 9645 | */ |
| 9646 | OraText *OCIMessageGet(OCIMsg *msgh, ub4 msgno, OraText *msgbuf, |
| 9647 | size_t buflen); |
| 9648 | |
| 9649 | /*------------------------- OCIMessageClose ---------------------------------*/ |
| 9650 | /* |
| 9651 | NAME |
| 9652 | OCIMessageClose - close a message handle |
| 9653 | REMARKS |
| 9654 | This function closes a message handle pointed to by msgh and frees any |
| 9655 | memory associated with this handle. |
| 9656 | RETURNS |
| 9657 | OCI_SUCCESS, OCI_INVALID_HANDLE or OCI_ERROR |
| 9658 | envhp(IN/OUT) |
| 9659 | A pointer to OCI environment handle for message language. |
| 9660 | errhp(IN/OUT) |
| 9661 | The OCI error handle. If there is an error, it is record in errhp and this |
| 9662 | function returns a NULL pointer. Diagnostic information can be obtained by |
| 9663 | calling OCIErrorGet(). |
| 9664 | msghp(IN/OUT) |
| 9665 | A pointer to a message handle which was previously opened by |
| 9666 | OCIMessageOpen(). |
| 9667 | */ |
| 9668 | sword OCIMessageClose(void *envhp, OCIError *errhp, OCIMsg *msghp); |
| 9669 | |
| 9670 | /*--------------- End of Extensions to NLS cartridge service ----------------*/ |
| 9671 | |
| 9672 | |
| 9673 | /*----------------- Extensions to OCI Thread interface ---------------------*/ |
| 9674 | /***************************************************************************** |
| 9675 | DESCRIPTION |
| 9676 | ****************************************************************************** |
| 9677 | 1 Threads Interface |
| 9678 | |
| 9679 | The OCIThread package provides a number of commonly used threading |
| 9680 | primitives for use by Oracle customers. It offers a portable interface to |
| 9681 | threading capabilities native to various platforms. It does not implement |
| 9682 | threading on platforms which do not have native threading capability. |
| 9683 | |
| 9684 | OCIThread does not provide a portable implementation of multithreaded |
| 9685 | facilities. It only serves as a set of portable covers for native |
| 9686 | multithreaded facilities. Therefore, platforms that do not have native |
| 9687 | support for multi-threading will only be able to support a limited |
| 9688 | implementation of OCIThread. As a result, products that rely on all of |
| 9689 | OCIThread's functionality will not port to all platforms. Products that must |
| 9690 | port to all platforms must use only a subset of OCIThread's functionality. |
| 9691 | This issue is discussed further in later sections of this document. |
| 9692 | |
| 9693 | The OCIThread API is split into four main parts. Each part is described |
| 9694 | briefly here. The following subsections describe each in greater detail. |
| 9695 | |
| 9696 | 1. Initialization and Termination Calls |
| 9697 | |
| 9698 | These calls deal with the initialization and termination of OCIThread. |
| 9699 | Initialization of OCIThread initializes the OCIThread context which is |
| 9700 | a member of the OCI environment or session handle. This context is |
| 9701 | required for other OCIThread calls. |
| 9702 | |
| 9703 | 2. Passive Threading Primitives |
| 9704 | |
| 9705 | The passive threading primitives include primitives to manipulate mutual |
| 9706 | exclusion (mutex) locks, thread ID's, and thread-specific data keys. |
| 9707 | |
| 9708 | The reason that these primitives are described as 'passive' is that while |
| 9709 | their specifications allow for the existence of multiple threads, they do |
| 9710 | not require it. This means that it is possible for these primitives to |
| 9711 | be implemented according to specification in both single-threaded and |
| 9712 | multi-threaded environments. |
| 9713 | |
| 9714 | As a result, OCIThread clients that use only these primitives will not |
| 9715 | require the existence of multiple threads in order to work correctly, |
| 9716 | i.e., they will be able to work in single-threaded environments without |
| 9717 | branching code. |
| 9718 | |
| 9719 | 3. Active Threading Primitives |
| 9720 | |
| 9721 | Active threading primitives include primitives dealing with the creation, |
| 9722 | termination, and other manipulation of threads. |
| 9723 | |
| 9724 | The reason that these primitives are described as 'active' is that they |
| 9725 | can only be used in true multi-threaded environments. Their |
| 9726 | specifications explicitly require that it be possible to have multiple |
| 9727 | threads. If you need to determine at runtime whether or not you are in a |
| 9728 | multi-threaded environment, call OCIThreadIsMulti() before calling an |
| 9729 | OCIThread active primitive. |
| 9730 | |
| 9731 | |
| 9732 | 1.1 Initialization & Termination |
| 9733 | ================================== |
| 9734 | |
| 9735 | The types and functions described in this section are associated with the |
| 9736 | initialization and termination of the OCIThread package. OCIThread must |
| 9737 | be properly initialized before any of its functionality can be used. |
| 9738 | OCIThread's process initialization function, 'OCIThreadProcessInit()', |
| 9739 | must be called with care; see below. |
| 9740 | |
| 9741 | The observed behavior of the initialization and termination functions is the |
| 9742 | same regardless of whether OCIThread is in single-threaded or multi-threaded |
| 9743 | environment. It is OK to call the initialization functions from both generic |
| 9744 | and operating system specific (OSD) code. |
| 9745 | |
| 9746 | 1.1.1 Types |
| 9747 | |
| 9748 | OCIThreadContext - OCIThread Context |
| 9749 | ------------------------------------- |
| 9750 | |
| 9751 | Most calls to OCIThread functions take the OCI environment or session |
| 9752 | handle as a parameter. The OCIThread context is part of the OCI |
| 9753 | environment or session handle and it must be initialized by calling |
| 9754 | 'OCIThreadInit()'. Termination of the OCIThread context occurs by calling |
| 9755 | 'OCIThreadTerm()'. |
| 9756 | |
| 9757 | The OCIThread context is a private data structure. Clients must NEVER |
| 9758 | attempt to examine the contents of the context. |
| 9759 | |
| 9760 | 1.1.2 OCIThreadProcessInit |
| 9761 | |
| 9762 | OCIThreadProcessInit - OCIThread Process INITialization |
| 9763 | -------------------------------------------------------- |
| 9764 | |
| 9765 | Description |
| 9766 | |
| 9767 | This function should be called to perform OCIThread process |
| 9768 | initialization. |
| 9769 | |
| 9770 | Prototype |
| 9771 | |
| 9772 | void OCIThreadProcessInit(); |
| 9773 | |
| 9774 | Returns |
| 9775 | |
| 9776 | Nothing. |
| 9777 | |
| 9778 | Notes |
| 9779 | |
| 9780 | Whether or not this function needs to be called depends on how OCI |
| 9781 | Thread is going to be used. |
| 9782 | |
| 9783 | * In a single-threaded application, calling this function is optional. |
| 9784 | If it is called at all, the first call to it must occur before calls |
| 9785 | to any other OCIThread functions. Subsequent calls can be made |
| 9786 | without restriction; they will not have any effect. |
| 9787 | |
| 9788 | * In a multi-threaded application, this function MUST be called. The |
| 9789 | first call to it MUST occur 'strictly before' any other OCIThread |
| 9790 | calls; i.e., no other calls to OCIThread functions (including other |
| 9791 | calls to this one) can be concurrent with the first call. |
| 9792 | Subsequent calls to this function can be made without restriction; |
| 9793 | they will not have any effect. |
| 9794 | |
| 9795 | |
| 9796 | 1.1.3 OCIThreadInit |
| 9797 | |
| 9798 | OCIThreadInit - OCIThread INITialize |
| 9799 | ------------------------------------- |
| 9800 | |
| 9801 | Description |
| 9802 | |
| 9803 | This initializes OCIThread context. |
| 9804 | |
| 9805 | Prototype |
| 9806 | |
| 9807 | sword OCIThreadInit(void *hndl, OCIError *err); |
| 9808 | |
| 9809 | hndl(IN/OUT): The OCI environment or session handle. |
| 9810 | |
| 9811 | err(IN/OUT): The OCI error handle. If there is an error and OCI_ERROR |
| 9812 | is returned, the error is recorded in err and diagnostic |
| 9813 | information can be obtained by calling OCIErrorGet(). |
| 9814 | |
| 9815 | Returns |
| 9816 | |
| 9817 | OCI_SUCCESS, OCI_ERROR or OCI_INVALID_HANDLE. |
| 9818 | |
| 9819 | Notes |
| 9820 | |
| 9821 | It is illegal for OCIThread clients to try an examine the memory |
| 9822 | pointed to by the returned pointer. |
| 9823 | |
| 9824 | It is safe to make concurrent calls to 'OCIThreadInit()'. Unlike |
| 9825 | 'OCIThreadProcessInit()', there is no need to have a first call |
| 9826 | that occurs before all the others. |
| 9827 | |
| 9828 | The first time 'OCIThreadInit()' is called, it initilaizes the OCI |
| 9829 | Thread context. It also saves a pointer to the context in some system |
| 9830 | dependent manner. Subsequent calls to 'OCIThreadInit()' will return |
| 9831 | the same context. |
| 9832 | |
| 9833 | Each call to 'OCIThreadInit()' must eventually be matched by a call to |
| 9834 | 'OCIThreadTerm()'. |
| 9835 | |
| 9836 | OCIThreadTerm - OCIThread TERMinate |
| 9837 | ------------------------------------ |
| 9838 | |
| 9839 | Description |
| 9840 | |
| 9841 | This should be called to release the OCIThread context. It should be |
| 9842 | called exactly once for each call made to 'OCIThreadInit()'. |
| 9843 | |
| 9844 | Prototype |
| 9845 | |
| 9846 | sword OCIThreadTerm(void *hndl, OCIError *err); |
| 9847 | |
| 9848 | hndl(IN/OUT): The OCI environment or session handle. |
| 9849 | |
| 9850 | err(IN/OUT): The OCI error handle. If there is an error and OCI_ERROR |
| 9851 | is returned, the error is recorded in err and diagnostic |
| 9852 | information can be obtained by calling OCIErrorGet(). |
| 9853 | |
| 9854 | Returns |
| 9855 | |
| 9856 | OCI_SUCCESS, OCI_ERROR or OCI_INVALID_HANDLE. |
| 9857 | |
| 9858 | Notes |
| 9859 | |
| 9860 | It is safe to make concurrent calls to 'OCIThreadTerm()'. |
| 9861 | |
| 9862 | 'OCIThreadTerm()' will not do anything until it has been called as |
| 9863 | many times as 'OCIThreadInit()' has been called. When that happens, |
| 9864 | it terminates the OCIThread layer and frees the memory allocated for |
| 9865 | the context. Once this happens, the context should not be re-used. |
| 9866 | It will be necessary to obtain a new one by calling 'OCIThreadInit()'. |
| 9867 | |
| 9868 | |
| 9869 | OCIThreadIsMulti - OCIThread Is Multi-Threaded? |
| 9870 | ------------------------------------------------ |
| 9871 | |
| 9872 | Description |
| 9873 | |
| 9874 | This tells the caller whether the application is running in a |
| 9875 | multi-threaded environment or a single-threaded environment. |
| 9876 | |
| 9877 | Prototype |
| 9878 | boolean OCIThreadIsMulti(void); |
| 9879 | |
| 9880 | Returns |
| 9881 | |
| 9882 | TRUE if the environment is multi-threaded; |
| 9883 | FALSE if the environment is single-threaded. |
| 9884 | |
| 9885 | |
| 9886 | 1.2 Passive Threading Primitives |
| 9887 | ================================== |
| 9888 | |
| 9889 | 1.2.1 Types |
| 9890 | |
| 9891 | The passive threading primitives deal with the manipulation of mutex, |
| 9892 | thread ID's, and thread-specific data. Since the specifications of these |
| 9893 | primitives do not require the existence of multiple threads, they can be |
| 9894 | used both on multithreaded and single-threaded platforms. |
| 9895 | |
| 9896 | 1.2.1.1 OCIThreadMutex - OCIThread Mutual Exclusion Lock |
| 9897 | ----------------------------------------------------------- |
| 9898 | |
| 9899 | The type 'OCIThreadMutex' is used to represent a mutual exclusion lock |
| 9900 | (mutex). A mutex is typically used for one of two purposes: (i) to |
| 9901 | ensure that only one thread accesses a given set of data at a time, or |
| 9902 | (ii) to ensure that only one thread executes a given critical section of |
| 9903 | code at a time. |
| 9904 | |
| 9905 | Mutexes pointer can be declared as parts of client structures or as |
| 9906 | stand-alone variables. Before they can be used, they must be initialized |
| 9907 | using 'OCIThreadMutexInit()'. Once they are no longer needed, they must be |
| 9908 | destroyed using 'OCIThreadMutexDestroy()'. A mutex pointer must NOT be |
| 9909 | used after it is destroyed. |
| 9910 | |
| 9911 | A thread can acquire a mutex by using either 'OCIThreadMutexAcquire()' or |
| 9912 | 'OCIThreadMutexTry()'. They both ensure that only one thread at a time is |
| 9913 | allowed to hold a given mutex. A thread that holds a mutex can release it |
| 9914 | by calling 'OCIThreadMutexRelease()'. |
| 9915 | |
| 9916 | |
| 9917 | 1.2.1.2 OCIThreadKey - OCIThread Key for Thread-Specific Data |
| 9918 | ---------------------------------------------------------------- |
| 9919 | |
| 9920 | A key can be thought of as a process-wide variable that has a |
| 9921 | thread-specific value. What this means is that all the threads in a |
| 9922 | process can use any given key. However, each thread can examine or modify |
| 9923 | that key independently of the other threads. The value that a thread sees |
| 9924 | when it examines the key will always be the same as the value that it last |
| 9925 | set for the key. It will not see any values set for the key by the other |
| 9926 | threads. |
| 9927 | |
| 9928 | The type of the value held by a key is a 'void *' generic pointer. |
| 9929 | |
| 9930 | Keys can be created using 'OCIThreadKeyInit()'. When a key is created, its |
| 9931 | value is initialized to 'NULL' for all threads. |
| 9932 | |
| 9933 | A thread can set a key's value using 'OCIThreadKeySet()'. A thread can |
| 9934 | get a key's value using 'OCIThreadKeyGet()'. |
| 9935 | |
| 9936 | The OCIThread key functions will save and retrieve data SPECIFIC TO THE |
| 9937 | THREAD. When clients maintain a pool of threads and assign the threads to |
| 9938 | different tasks, it *may not* be appropriate for a task to use OCIThread |
| 9939 | key functions to save data associated with it. Here is a scenario of how |
| 9940 | things can fail: A thread is assigned to execute the initialization of a |
| 9941 | task. During the initialization, the task stored some data related to it |
| 9942 | in the thread using OCIThread key functions. After the initialization, |
| 9943 | the thread is returned back to the threads pool. Later, the threads pool |
| 9944 | manager assigned another thread to perform some operations on the task, |
| 9945 | and the task needs to retrieve those data it stored earlier in |
| 9946 | initialization. Since the task is running in another thread, it will not |
| 9947 | be able to retrieve the same data back! Applications that use thread |
| 9948 | pools should be aware of this and be cautious when using OCIThread key |
| 9949 | functions. |
| 9950 | |
| 9951 | |
| 9952 | 1.2.1.3 OCIThreadKeyDestFunc - OCIThread Key Destructor Function Type |
| 9953 | ------------------------------------------------------------------------ |
| 9954 | |
| 9955 | This is the type of a pointer to a key's destructor routine. Keys can be |
| 9956 | associated with a destructor routine when they are created (see |
| 9957 | 'OCIThreadKeyInit()'). |
| 9958 | |
| 9959 | A key's destructor routine will be called whenever a thread that has a |
| 9960 | non-NULL value for the key terminates. |
| 9961 | |
| 9962 | The destructor routine returns nothing and takes one parameter. The |
| 9963 | parameter will be the value that was set for key when the thread |
| 9964 | terminated. |
| 9965 | |
| 9966 | The destructor routine is guaranteed to be called on a thread's value |
| 9967 | in the key after the termination of the thread and before process |
| 9968 | termination. No more precise guarantee can be made about the timing |
| 9969 | of the destructor routine call; thus no code in the process may assume |
| 9970 | any post-condition of the destructor routine. In particular, the |
| 9971 | destructor is not guaranteed to execute before a join call on the |
| 9972 | terminated thread returns. |
| 9973 | |
| 9974 | |
| 9975 | 1.2.1.4 OCIThreadId - OCIThread Thread ID |
| 9976 | -------------------------------------------- |
| 9977 | |
| 9978 | Type 'OCIThreadId' is the type that will be used to identify a thread. |
| 9979 | At any given time, no two threads will ever have the same 'OCIThreadId'. |
| 9980 | However, 'OCIThreadId' values can be recycled; i.e., once a thread dies, |
| 9981 | a new thread may be created that has the same 'OCIThreadId' as the one |
| 9982 | that died. In particular, the thread ID must uniquely identify a thread |
| 9983 | T within a process, and it must be consistent and valid in all threads U |
| 9984 | of the process for which it can be guaranteed that T is running |
| 9985 | concurrently with U. The thread ID for a thread T must be retrievable |
| 9986 | within thread T. This will be done via OCIThreadIdGet(). |
| 9987 | |
| 9988 | The 'OCIThreadId' type supports the concept of a NULL thread ID: the NULL |
| 9989 | thread ID will never be the same as the ID of an actual thread. |
| 9990 | |
| 9991 | |
| 9992 | |
| 9993 | 1.2.2 Function prototypes for passive primitives |
| 9994 | -------------------------------------------------- |
| 9995 | |
| 9996 | 1.2.2.1 Mutex functions |
| 9997 | ------------------------- |
| 9998 | |
| 9999 | OCIThreadMutexInit - OCIThread MuteX Initialize |
| 10000 | ----------------------------------------------- |
| 10001 | |
| 10002 | Description |
| 10003 | |
| 10004 | This allocate and initializes a mutex. All mutexes must be |
| 10005 | initialized prior to use. |
| 10006 | |
| 10007 | Prototype |
| 10008 | |
| 10009 | sword OCIThreadMutexInit(void *hndl, OCIError *err, |
| 10010 | OCIThreadMutex **mutex); |
| 10011 | |
| 10012 | hndl(IN/OUT): The OCI environment or session handle. |
| 10013 | |
| 10014 | err(IN/OUT): The OCI error handle. If there is an error and OCI_ERROR |
| 10015 | is returned, the error is recorded in err and diagnostic |
| 10016 | information can be obtained by calling OCIErrorGet(). |
| 10017 | |
| 10018 | mutex(OUT): The mutex to initialize. |
| 10019 | |
| 10020 | Returns |
| 10021 | |
| 10022 | OCI_SUCCESS, OCI_ERROR or OCI_INVALID_HANDLE. |
| 10023 | |
| 10024 | Notes |
| 10025 | |
| 10026 | Multiple threads must not initialize the same mutex simultaneously. |
| 10027 | Also, a mutex must not be reinitialized until it has been destroyed (see |
| 10028 | 'OCIThreadMutexDestroy()'). |
| 10029 | |
| 10030 | OCIThreadMutexDestroy - OCIThread MuteX Destroy |
| 10031 | ----------------------------------------------- |
| 10032 | |
| 10033 | Description |
| 10034 | |
| 10035 | This destroys and deallocate a mutex. Each mutex must be destroyed |
| 10036 | once it is no longer needed. |
| 10037 | |
| 10038 | Prototype |
| 10039 | |
| 10040 | sword OCIThreadMutexDestroy(void *hndl, OCIError *err, |
| 10041 | OCIThreadMutex **mutex); |
| 10042 | |
| 10043 | hndl(IN/OUT): The OCI environment or session handle. |
| 10044 | |
| 10045 | err(IN/OUT): The OCI error handle. If there is an error and OCI_ERROR |
| 10046 | is returned, the error is recorded in err and diagnostic |
| 10047 | information can be obtained by calling OCIErrorGet(). |
| 10048 | |
| 10049 | mutex(IN/OUT): The mutex to destroy. |
| 10050 | |
| 10051 | Returns |
| 10052 | |
| 10053 | OCI_SUCCESS, OCI_ERROR or OCI_INVALID_HANDLE. |
| 10054 | |
| 10055 | Notes |
| 10056 | |
| 10057 | It is not legal to destroy a mutex that is uninitialized or is currently |
| 10058 | held by a thread. The destruction of a mutex must not occur concurrently |
| 10059 | with any other operations on the mutex. A mutex must not be used after |
| 10060 | it has been destroyed. |
| 10061 | |
| 10062 | |
| 10063 | OCIThreadMutexAcquire - OCIThread MuteX Acquire |
| 10064 | ----------------------------------------------- |
| 10065 | |
| 10066 | Description |
| 10067 | |
| 10068 | This acquires a mutex for the thread in which it is called. If the mutex |
| 10069 | is held by another thread, the calling thread is blocked until it can |
| 10070 | acquire the mutex. |
| 10071 | |
| 10072 | Prototype |
| 10073 | |
| 10074 | sword OCIThreadMutexAcquire(void *hndl, OCIError *err, |
| 10075 | OCIThreadMutex *mutex); |
| 10076 | |
| 10077 | hndl(IN/OUT): The OCI environment or session handle. |
| 10078 | |
| 10079 | err(IN/OUT): The OCI error handle. If there is an error, it is |
| 10080 | recorded in err and this function returns OCI_ERROR. |
| 10081 | Diagnostic information can be obtained by calling |
| 10082 | OCIErrorGet(). |
| 10083 | |
| 10084 | mutex(IN/OUT): The mutex to acquire. |
| 10085 | |
| 10086 | Returns |
| 10087 | |
| 10088 | OCI_SUCCESS, OCI_ERROR or OCI_INVALID_HANDLE. |
| 10089 | |
| 10090 | Notes |
| 10091 | |
| 10092 | It is illegal to attempt to acquire an uninitialized mutex. |
| 10093 | |
| 10094 | This function's behavior is undefined if it is used by a thread to |
| 10095 | acquire a mutex that is already held by that thread. |
| 10096 | |
| 10097 | |
| 10098 | |
| 10099 | OCIThreadMutexRelease - OCIThread MuteX Release |
| 10100 | ----------------------------------------------- |
| 10101 | |
| 10102 | Description |
| 10103 | |
| 10104 | This releases a mutex. If there are any threads blocked on the mutex, |
| 10105 | one of them will acquire it and become unblocked. |
| 10106 | |
| 10107 | Prototype |
| 10108 | |
| 10109 | sword OCIThreadMutexRelease(void *hndl, OCIError *err, |
| 10110 | OCIThreadMutex *mutex); |
| 10111 | |
| 10112 | hndl(IN/OUT): The OCI environment or session handle. |
| 10113 | |
| 10114 | err(IN/OUT): The OCI error handle. If there is an error and OCI_ERROR |
| 10115 | is returned, the error is recorded in err and diagnostic |
| 10116 | information can be obtained by calling OCIErrorGet(). |
| 10117 | |
| 10118 | mutex(IN/OUT): The mutex to release. |
| 10119 | |
| 10120 | Returns |
| 10121 | |
| 10122 | OCI_SUCCESS, OCI_ERROR or OCI_INVALID_HANDLE. |
| 10123 | |
| 10124 | Notes |
| 10125 | |
| 10126 | It is illegal to attempt to release an uninitialized mutex. It is also |
| 10127 | illegal for a thread to release a mutex that it does not hold. |
| 10128 | |
| 10129 | |
| 10130 | OCIThreadKeyInit - OCIThread KeY Initialize |
| 10131 | ------------------------------------------- |
| 10132 | |
| 10133 | Description |
| 10134 | |
| 10135 | This creates a key. Each call to this routine allocate and generates |
| 10136 | a new key that is distinct from all other keys. |
| 10137 | |
| 10138 | Prototype |
| 10139 | |
| 10140 | sword OCIThreadKeyInit(void *hndl, OCIError *err, OCIThreadKey **key, |
| 10141 | OCIThreadKeyDestFunc destFn); |
| 10142 | |
| 10143 | hndl(IN/OUT): The OCI environment or session handle. |
| 10144 | |
| 10145 | err(IN/OUT): The OCI error handle. If there is an error and OCI_ERROR |
| 10146 | is returned, the error is recorded in err and diagnostic |
| 10147 | information can be obtained by calling OCIErrorGet(). |
| 10148 | |
| 10149 | key(OUT): The 'OCIThreadKey' in which to create the new key. |
| 10150 | |
| 10151 | destFn(IN): The destructor for the key. NULL is permitted. |
| 10152 | |
| 10153 | Returns |
| 10154 | |
| 10155 | OCI_SUCCESS, OCI_ERROR or OCI_INVALID_HANDLE. |
| 10156 | |
| 10157 | Notes |
| 10158 | |
| 10159 | Once this function executes successfully, a pointer to an allocated and |
| 10160 | initialized key is return. That key can be used with 'OCIThreadKeyGet()' |
| 10161 | and 'OCIThreadKeySet()'. The initial value of the key will be 'NULL' for |
| 10162 | all threads. |
| 10163 | |
| 10164 | It is illegal for this function to be called more than once to create the |
| 10165 | same key (i.e., to be called more than once with the same value for the |
| 10166 | 'key' parameter). |
| 10167 | |
| 10168 | If the 'destFn' parameter is not NULL, the routine pointed to by 'destFn' |
| 10169 | will be called whenever a thread that has a non-NULL value for the key |
| 10170 | terminates. The routine will be called with one parameter. The |
| 10171 | parameter will be the key's value for the thread at the time at which the |
| 10172 | thread terminated. |
| 10173 | If the key does not need a destructor function, pass NULL for 'destFn'. |
| 10174 | |
| 10175 | |
| 10176 | OCIThreadKeyDestroy - OCIThread KeY DESTROY |
| 10177 | ------------------------------------------- |
| 10178 | |
| 10179 | Description |
| 10180 | |
| 10181 | Destroy and deallocate the key pointed to by 'key'. |
| 10182 | |
| 10183 | Prototype |
| 10184 | |
| 10185 | sword OCIThreadKeyDestroy(void *hndl, OCIError *err, |
| 10186 | OCIThreadKey **key); |
| 10187 | |
| 10188 | hndl(IN/OUT): The OCI environment or session handle. |
| 10189 | |
| 10190 | err(IN/OUT): The OCI error handle. If there is an error and OCI_ERROR |
| 10191 | is returned, the error is recorded in err and diagnostic |
| 10192 | information can be obtained by calling OCIErrorGet(). |
| 10193 | |
| 10194 | key(IN/OUT): The 'OCIThreadKey' in which to destroy the key. |
| 10195 | |
| 10196 | Returns |
| 10197 | |
| 10198 | OCI_SUCCESS, OCI_ERROR or OCI_INVALID_HANDLE. |
| 10199 | |
| 10200 | Notes |
| 10201 | |
| 10202 | This is different from the destructor function callback passed to the |
| 10203 | key create routine. This new destroy function 'OCIThreadKeyDestroy' is |
| 10204 | used to terminate any resources OCI THREAD acquired when it created |
| 10205 | 'key'. [The 'OCIThreadKeyDestFunc' callback type is a key VALUE |
| 10206 | destructor; it does in no way operate on the key itself.] |
| 10207 | |
| 10208 | This must be called once the user has finished using the key. Not |
| 10209 | calling the key destroy function may result in memory leaks. |
| 10210 | |
| 10211 | |
| 10212 | |
| 10213 | |
| 10214 | 1.2.2.2 Thread Key operations |
| 10215 | ------------------------------- |
| 10216 | |
| 10217 | OCIThreadKeyGet - OCIThread KeY Get value |
| 10218 | ----------------------------------------- |
| 10219 | |
| 10220 | Description |
| 10221 | |
| 10222 | This gets the calling thread's current value for a key. |
| 10223 | |
| 10224 | Prototype |
| 10225 | |
| 10226 | sword OCIThreadKeyGet(void *hndl, OCIError *err, OCIThreadKey *key, |
| 10227 | void **pValue); |
| 10228 | |
| 10229 | hndl(IN/OUT): The OCI environment or session handle. |
| 10230 | |
| 10231 | err(IN/OUT): The OCI error handle. If there is an error and OCI_ERROR |
| 10232 | is returned, the error is recorded in err and diagnostic |
| 10233 | information can be obtained by calling OCIErrorGet(). |
| 10234 | |
| 10235 | key(IN): The key. |
| 10236 | |
| 10237 | pValue(IN/OUT): The location in which to place the thread-specific |
| 10238 | key value. |
| 10239 | |
| 10240 | Returns |
| 10241 | |
| 10242 | OCI_SUCCESS, OCI_ERROR or OCI_INVALID_HANDLE. |
| 10243 | |
| 10244 | Notes |
| 10245 | |
| 10246 | It is illegal to use this function on a key that has not been created |
| 10247 | using 'OCIThreadKeyInit()'. |
| 10248 | |
| 10249 | If the calling thread has not yet assigned a value to the key, 'NULL' is |
| 10250 | placed in the location pointed to by 'pValue'. |
| 10251 | |
| 10252 | |
| 10253 | OCIThreadKeySet - OCIThread KeY Set value |
| 10254 | ----------------------------------------- |
| 10255 | |
| 10256 | Description |
| 10257 | |
| 10258 | This sets the calling thread's value for a key. |
| 10259 | |
| 10260 | Prototype |
| 10261 | |
| 10262 | sword OCIThreadKeySet(void *hndl, OCIError *err, OCIThreadKey *key, |
| 10263 | void *value); |
| 10264 | |
| 10265 | hndl(IN/OUT): The OCI environment or session handle. |
| 10266 | |
| 10267 | err(IN/OUT): The OCI error handle. If there is an error and OCI_ERROR |
| 10268 | is returned, the error is recorded in err and diagnostic |
| 10269 | information can be obtained by calling OCIErrorGet(). |
| 10270 | |
| 10271 | key(IN/OUT): The key. |
| 10272 | |
| 10273 | value(IN): The thread-specific value to set in the key. |
| 10274 | |
| 10275 | Returns |
| 10276 | |
| 10277 | OCI_SUCCESS, OCI_ERROR or OCI_INVALID_HANDLE. |
| 10278 | |
| 10279 | Notes |
| 10280 | |
| 10281 | It is illegal to use this function on a key that has not been created |
| 10282 | using 'OCIThreadKeyInit()'. |
| 10283 | |
| 10284 | 1.2.2.3 Thread Id |
| 10285 | -------------------- |
| 10286 | |
| 10287 | OCIThreadIdInit - OCIThread Thread Id INITialize |
| 10288 | -------------------------------------------------- |
| 10289 | |
| 10290 | Description |
| 10291 | |
| 10292 | Allocate and initialize the thread id 'tid'. |
| 10293 | |
| 10294 | Prototype |
| 10295 | |
| 10296 | sword OCIThreadIdInit(void *hndl, OCIError *err, OCIThreadId **tid); |
| 10297 | |
| 10298 | hndl(IN/OUT): The OCI environment or session handle. |
| 10299 | |
| 10300 | err(IN/OUT): The OCI error handle. If there is an error and OCI_ERROR |
| 10301 | is returned, the error is recorded in err and diagnostic |
| 10302 | information can be obtained by calling OCIErrorGet(). |
| 10303 | |
| 10304 | tid (OUT): Pointer to the thread ID to initialize. |
| 10305 | |
| 10306 | Returns |
| 10307 | |
| 10308 | OCI_SUCCESS, OCI_ERROR or OCI_INVALID_HANDLE. |
| 10309 | |
| 10310 | |
| 10311 | OCIThreadIdDestroy - OCIThread Thread Id DESTROY |
| 10312 | -------------------------------------------------- |
| 10313 | |
| 10314 | Description |
| 10315 | |
| 10316 | Destroy and deallocate the thread id 'tid'. |
| 10317 | |
| 10318 | Prototype |
| 10319 | |
| 10320 | sword OCIThreadIdDestroy(void *hndl, OCIError *err, OCIThreadId **tid); |
| 10321 | |
| 10322 | hndl(IN/OUT): The OCI environment or session handle. |
| 10323 | |
| 10324 | err(IN/OUT): The OCI error handle. If there is an error and OCI_ERROR |
| 10325 | is returned, the error is recorded in err and diagnostic |
| 10326 | information can be obtained by calling OCIErrorGet(). |
| 10327 | |
| 10328 | tid(IN/OUT): Pointer to the thread ID to destroy. |
| 10329 | |
| 10330 | Returns |
| 10331 | |
| 10332 | OCI_SUCCESS, OCI_ERROR or OCI_INVALID_HANDLE. |
| 10333 | |
| 10334 | Note |
| 10335 | |
| 10336 | 'tid' should be initialized by OCIThreadIdInit(). |
| 10337 | |
| 10338 | |
| 10339 | OCIThreadIdSet - OCIThread Thread Id Set |
| 10340 | ----------------------------------------- |
| 10341 | |
| 10342 | Description |
| 10343 | |
| 10344 | This sets one 'OCIThreadId' to another. |
| 10345 | |
| 10346 | Prototype |
| 10347 | |
| 10348 | sword OCIThreadIdSet(void *hndl, OCIError *err, |
| 10349 | OCIThreadId *tidDest, |
| 10350 | OCIThreadId *tidSrc); |
| 10351 | |
| 10352 | hndl(IN/OUT): The OCI environment or session handle. |
| 10353 | |
| 10354 | err(IN/OUT): The OCI error handle. If there is an error and OCI_ERROR |
| 10355 | is returned, the error is recorded in err and diagnostic |
| 10356 | information can be obtained by calling OCIErrorGet(). |
| 10357 | |
| 10358 | tidDest(OUT): This should point to the location of the 'OCIThreadId' |
| 10359 | to be set to. |
| 10360 | |
| 10361 | tidSrc(IN): This should point to the 'OCIThreadId' to set from. |
| 10362 | |
| 10363 | Returns |
| 10364 | |
| 10365 | OCI_SUCCESS, OCI_ERROR or OCI_INVALID_HANDLE. |
| 10366 | |
| 10367 | Notes |
| 10368 | |
| 10369 | 'tid' should be initialized by OCIThreadIdInit(). |
| 10370 | |
| 10371 | |
| 10372 | OCIThreadIdSetNull - OCIThread Thread Id Set Null |
| 10373 | --------------------------------------------------------- |
| 10374 | |
| 10375 | Description |
| 10376 | |
| 10377 | This sets the NULL thread ID to a given 'OCIThreadId'. |
| 10378 | |
| 10379 | Prototype |
| 10380 | |
| 10381 | sword OCIThreadIdSetNull(void *hndl, OCIError *err, |
| 10382 | OCIThreadId *tid); |
| 10383 | |
| 10384 | hndl(IN/OUT): The OCI environment or session handle. |
| 10385 | |
| 10386 | err(IN/OUT): The OCI error handle. If there is an error, it is |
| 10387 | recorded in err and this function returns OCI_ERROR. |
| 10388 | Diagnostic information can be obtained by calling |
| 10389 | OCIErrorGet(). |
| 10390 | |
| 10391 | tid(OUT): This should point to the 'OCIThreadId' in which to put |
| 10392 | the NULL thread ID. |
| 10393 | |
| 10394 | Returns |
| 10395 | |
| 10396 | OCI_SUCCESS, OCI_ERROR or OCI_INVALID_HANDLE. |
| 10397 | |
| 10398 | Notes |
| 10399 | |
| 10400 | 'tid' should be initialized by OCIThreadIdInit(). |
| 10401 | |
| 10402 | |
| 10403 | OCIThreadIdGet - OCIThread Thread Id Get |
| 10404 | ------------------------------------------ |
| 10405 | |
| 10406 | Description |
| 10407 | |
| 10408 | This retrieves the 'OCIThreadId' of the thread in which it is called. |
| 10409 | |
| 10410 | Prototype |
| 10411 | |
| 10412 | sword OCIThreadIdGet(void *hndl, OCIError *err, |
| 10413 | OCIThreadId *tid); |
| 10414 | |
| 10415 | hndl(IN/OUT): The OCI environment or session handle. |
| 10416 | |
| 10417 | err(IN/OUT): The OCI error handle. If there is an error and OCI_ERROR |
| 10418 | is returned, the error is recorded in err and diagnostic |
| 10419 | information can be obtained by calling OCIErrorGet(). |
| 10420 | |
| 10421 | tid(OUT): This should point to the location in which to place the |
| 10422 | ID of the calling thread. |
| 10423 | |
| 10424 | Returns |
| 10425 | |
| 10426 | OCI_SUCCESS, OCI_ERROR or OCI_INVALID_HANDLE. |
| 10427 | |
| 10428 | Notes |
| 10429 | |
| 10430 | 'tid' should be initialized by OCIThreadIdInit(). |
| 10431 | |
| 10432 | When OCIThread is used in a single-threaded environment, |
| 10433 | OCIThreadIdGet() will always place the same value in the location |
| 10434 | pointed to by 'tid'. The exact value itself is not important. The |
| 10435 | important thing is that it is not the same as the NULL thread ID and |
| 10436 | that it is always the same value. |
| 10437 | |
| 10438 | |
| 10439 | OCIThreadIdSame - OCIThread Thread Ids Same? |
| 10440 | ---------------------------------------------- |
| 10441 | |
| 10442 | Description |
| 10443 | |
| 10444 | This determines whether or not two 'OCIThreadId's represent the same |
| 10445 | thread. |
| 10446 | |
| 10447 | Prototype |
| 10448 | |
| 10449 | sword OCIThreadIdSame(void *hndl, OCIError *err, |
| 10450 | OCIThreadId *tid1, OCIThreadId *tid2, |
| 10451 | boolean *result); |
| 10452 | |
| 10453 | hndl(IN/OUT): The OCI environment or session handle. |
| 10454 | |
| 10455 | err(IN/OUT): The OCI error handle. If there is an error and OCI_ERROR |
| 10456 | is returned, the error is recorded in err and diagnostic |
| 10457 | information can be obtained by calling OCIErrorGet(). |
| 10458 | |
| 10459 | tid1(IN): Pointer to the first 'OCIThreadId'. |
| 10460 | |
| 10461 | tid2(IN): Pointer to the second 'OCIThreadId'. |
| 10462 | |
| 10463 | result(IN/OUT): Pointer to the result. |
| 10464 | |
| 10465 | Returns |
| 10466 | |
| 10467 | OCI_SUCCESS, OCI_ERROR or OCI_INVALID_HANDLE. |
| 10468 | |
| 10469 | Notes |
| 10470 | |
| 10471 | If 'tid1' and 'tid2' represent the same thread, 'result' is set to TRUE. |
| 10472 | Otherwise, 'result' is set to FALSE. |
| 10473 | |
| 10474 | 'result' is set to TRUE if both 'tid1' and 'tid2' are the NULL thread ID. |
| 10475 | |
| 10476 | 'ti1d' and 'tid2' should be initialized by OCIThreadIdInit(). |
| 10477 | |
| 10478 | |
| 10479 | OCIThreadIdNull - OCIThread Thread Id NULL? |
| 10480 | --------------------------------------------- |
| 10481 | |
| 10482 | Description |
| 10483 | |
| 10484 | This determines whether or not a given 'OCIThreadId' is the NULL thread |
| 10485 | ID. |
| 10486 | |
| 10487 | Prototype |
| 10488 | |
| 10489 | sword OCIThreadIdNull(void *hndl, OCIError *err, |
| 10490 | OCIThreadId *tid, |
| 10491 | boolean *result); |
| 10492 | |
| 10493 | hndl(IN/OUT): The OCI environment or session handle. |
| 10494 | |
| 10495 | err(IN/OUT): The OCI error handle. If there is an error and OCI_ERROR |
| 10496 | is returned, the error is recorded in err and diagnostic |
| 10497 | information can be obtained by calling OCIErrorGet(). |
| 10498 | |
| 10499 | tid(IN): Pointer to the 'OCIThreadId' to check. |
| 10500 | |
| 10501 | result(IN/OUT): Pointer to the result. |
| 10502 | |
| 10503 | Returns |
| 10504 | |
| 10505 | OCI_SUCCESS, OCI_ERROR or OCI_INVALID_HANDLE. |
| 10506 | |
| 10507 | Notes |
| 10508 | |
| 10509 | If 'tid' is the NULL thread ID, 'result' is set to TRUE. Otherwise, |
| 10510 | 'result' is set to FALSE. |
| 10511 | |
| 10512 | 'tid' should be initialized by OCIThreadIdInit(). |
| 10513 | |
| 10514 | |
| 10515 | 1.3 Active Threading Primitives |
| 10516 | ================================= |
| 10517 | |
| 10518 | The active threading primitives deal with the manipulation of actual |
| 10519 | threads. Because the specifications of most of these primitives require |
| 10520 | that it be possible to have multiple threads, they work correctly only in |
| 10521 | the enabled OCIThread; In the disabled OCIThread, they always return |
| 10522 | failure. The exception is OCIThreadHandleGet(); it may be called in a |
| 10523 | single-threaded environment, in which case it will have no effect. |
| 10524 | |
| 10525 | Active primitives should only be called by code running in a multi-threaded |
| 10526 | environment. You can call OCIThreadIsMulti() to determine whether the |
| 10527 | environment is multi-threaded or single-threaded. |
| 10528 | |
| 10529 | |
| 10530 | 1.3.1 Types |
| 10531 | -------------- |
| 10532 | |
| 10533 | 1.3.1.1 OCIThreadHandle - OCIThread Thread Handle |
| 10534 | ------------------------------------------------------ |
| 10535 | |
| 10536 | Type 'OCIThreadHandle' is used to manipulate a thread in the active |
| 10537 | primitives: OCIThreadJoin()and OCIThreadClose(). A thread handle opened by |
| 10538 | OCIThreadCreate() must be closed in a matching call to |
| 10539 | OCIThreadClose(). A thread handle is invalid after the call to |
| 10540 | OCIThreadClose(). |
| 10541 | |
| 10542 | The distinction between a thread ID and a thread handle in OCIThread usage |
| 10543 | follows the distinction between the thread ID and the thread handle on |
| 10544 | Windows NT. On many platforms, the underlying native types are the same. |
| 10545 | |
| 10546 | |
| 10547 | 1.3.2 Functions |
| 10548 | ------------------ |
| 10549 | |
| 10550 | OCIThreadHndInit - OCIThread HaNDle Initialize |
| 10551 | ---------------------------------------------- |
| 10552 | |
| 10553 | Description |
| 10554 | |
| 10555 | Allocate and initialize the thread handle. |
| 10556 | |
| 10557 | Prototype |
| 10558 | |
| 10559 | sword OCIThreadHndInit(void *hndl, OCIError *err, |
| 10560 | OCIThreadHandle **thnd); |
| 10561 | |
| 10562 | hndl(IN/OUT): The OCI environment or session handle. |
| 10563 | |
| 10564 | err(IN/OUT): The OCI error handle. If there is an error and OCI_ERROR |
| 10565 | is returned, the error is recorded in err and diagnostic |
| 10566 | information can be obtained by calling OCIErrorGet(). |
| 10567 | |
| 10568 | thnd(OUT): The address of pointer to the thread handle to initialize. |
| 10569 | |
| 10570 | Returns |
| 10571 | |
| 10572 | OCI_SUCCESS, OCI_ERROR or OCI_INVALID_HANDLE. |
| 10573 | |
| 10574 | |
| 10575 | OCIThreadHndDestroy - OCIThread HaNDle Destroy |
| 10576 | ---------------------------------------------- |
| 10577 | |
| 10578 | Description |
| 10579 | |
| 10580 | Destroy and deallocate the thread handle. |
| 10581 | |
| 10582 | Prototype |
| 10583 | |
| 10584 | sword OCIThreadHndDestroy(void *hndl, OCIError *err, |
| 10585 | OCIThreadHandle **thnd); |
| 10586 | |
| 10587 | hndl(IN/OUT): The OCI environment or session handle. |
| 10588 | |
| 10589 | err(IN/OUT): The OCI error handle. If there is an error and OCI_ERROR |
| 10590 | is returned, the error is recorded in err and diagnostic |
| 10591 | information can be obtained by calling OCIErrorGet(). |
| 10592 | |
| 10593 | thnd(IN/OUT): The address of pointer to the thread handle to destroy. |
| 10594 | |
| 10595 | Returns |
| 10596 | |
| 10597 | OCI_SUCCESS, OCI_ERROR or OCI_INVALID_HANDLE. |
| 10598 | |
| 10599 | Notes |
| 10600 | |
| 10601 | 'thnd' should be initialized by OCIThreadHndInit(). |
| 10602 | |
| 10603 | |
| 10604 | OCIThreadCreate - OCIThread Thread Create |
| 10605 | ----------------------------------------- |
| 10606 | |
| 10607 | Description |
| 10608 | |
| 10609 | This creates a new thread. |
| 10610 | |
| 10611 | Prototype |
| 10612 | |
| 10613 | sword OCIThreadCreate(void *hndl, OCIError *err, |
| 10614 | void (*start)(void *), void *arg, |
| 10615 | OCIThreadId *tid, OCIThreadHandle *tHnd); |
| 10616 | |
| 10617 | hndl(IN/OUT): The OCI environment or session handle. |
| 10618 | |
| 10619 | err(IN/OUT): The OCI error handle. If there is an error and OCI_ERROR |
| 10620 | is returned, the error is recorded in err and diagnostic |
| 10621 | information can be obtained by calling OCIErrorGet(). |
| 10622 | |
| 10623 | start(IN): The function in which the new thread should begin |
| 10624 | execution. |
| 10625 | |
| 10626 | arg(IN): The argument to give the function pointed to by 'start'. |
| 10627 | |
| 10628 | tid(IN/OUT): If not NULL, gets the ID for the new thread. |
| 10629 | |
| 10630 | tHnd(IN/OUT): If not NULL, gets the handle for the new thread. |
| 10631 | |
| 10632 | Returns |
| 10633 | |
| 10634 | OCI_SUCCESS, OCI_ERROR or OCI_INVALID_HANDLE. |
| 10635 | |
| 10636 | Notes |
| 10637 | |
| 10638 | The new thread will start by executing a call to the function pointed |
| 10639 | to by 'start' with the argument given by 'arg'. When that function |
| 10640 | returns, the new thread will terminate. The function should not |
| 10641 | return a value and should accept one parameter, a 'void *'. |
| 10642 | |
| 10643 | The call to OCIThreadCreate() must be matched by a call to |
| 10644 | OCIThreadClose() if and only if tHnd is non-NULL. |
| 10645 | |
| 10646 | If tHnd is NULL, a thread ID placed in *tid will not be valid in the |
| 10647 | calling thread because the timing of the spawned thread's termination |
| 10648 | is unknown. |
| 10649 | |
| 10650 | 'tid' should be initialized by OCIThreadIdInit(). |
| 10651 | |
| 10652 | 'thnd' should be initialized by OCIThreadHndInit(). |
| 10653 | |
| 10654 | |
| 10655 | |
| 10656 | OCIThreadJoin - OCIThread Thread Join |
| 10657 | ------------------------------------- |
| 10658 | |
| 10659 | Description |
| 10660 | |
| 10661 | This function allows the calling thread to 'join' with another thread. |
| 10662 | It blocks the caller until the specified thread terminates. |
| 10663 | |
| 10664 | Prototype |
| 10665 | |
| 10666 | sword OCIThreadJoin(void *hndl, OCIError *err, OCIThreadHandle *tHnd); |
| 10667 | |
| 10668 | hndl(IN/OUT): The OCI environment or session handle. |
| 10669 | |
| 10670 | err(IN/OUT): The OCI error handle. If there is an error and OCI_ERROR |
| 10671 | is returned, the error is recorded in err and diagnostic |
| 10672 | information can be obtained by calling OCIErrorGet(). |
| 10673 | |
| 10674 | tHnd(IN): The 'OCIThreadHandle' of the thread to join with. |
| 10675 | |
| 10676 | Returns |
| 10677 | |
| 10678 | OCI_SUCCESS, OCI_ERROR or OCI_INVALID_HANDLE. |
| 10679 | |
| 10680 | Notes |
| 10681 | |
| 10682 | 'thnd' should be initialized by OCIThreadHndInit(). |
| 10683 | |
| 10684 | The result of multiple threads all trying to join with the same thread is |
| 10685 | undefined. |
| 10686 | |
| 10687 | |
| 10688 | OCIThreadClose - OCIThread Thread Close |
| 10689 | --------------------------------------- |
| 10690 | |
| 10691 | Description |
| 10692 | |
| 10693 | This function should be called to close a thread handle. |
| 10694 | |
| 10695 | Prototype |
| 10696 | |
| 10697 | sword OCIThreadClose(void *hndl, OCIError *err, OCIThreadHandle *tHnd); |
| 10698 | |
| 10699 | hndl(IN/OUT): The OCI environment or session handle. |
| 10700 | |
| 10701 | err(IN/OUT): The OCI error handle. If there is an error and OCI_ERROR |
| 10702 | is returned, the error is recorded in err and diagnostic |
| 10703 | information can be obtained by calling OCIErrorGet(). |
| 10704 | |
| 10705 | tHnd(IN/OUT): The OCIThread thread handle to close. |
| 10706 | |
| 10707 | Returns |
| 10708 | |
| 10709 | OCI_SUCCESS, OCI_ERROR or OCI_INVALID_HANDLE. |
| 10710 | |
| 10711 | Notes |
| 10712 | |
| 10713 | 'thnd' should be initialized by OCIThreadHndInit(). |
| 10714 | |
| 10715 | Both thread handle and the thread ID that was returned by the same call |
| 10716 | to OCIThreadCreate() are invalid after the call to OCIThreadClose(). |
| 10717 | |
| 10718 | |
| 10719 | |
| 10720 | OCIThreadHandleGet - OCIThread Thread Get Handle |
| 10721 | ------------------------------------------------ |
| 10722 | |
| 10723 | Description |
| 10724 | |
| 10725 | Retrieve the 'OCIThreadHandle' of the thread in which it is called. |
| 10726 | |
| 10727 | Prototype |
| 10728 | |
| 10729 | sword OCIThreadHandleGet(void *hndl, OCIError *err, |
| 10730 | OCIThreadHandle *tHnd); |
| 10731 | |
| 10732 | hndl(IN/OUT): The OCI environment or session handle. |
| 10733 | |
| 10734 | err(IN/OUT): The OCI error handle. If there is an error and OCI_ERROR |
| 10735 | is returned, the error is recorded in err and diagnostic |
| 10736 | information can be obtained by calling OCIErrorGet(). |
| 10737 | |
| 10738 | tHnd(IN/OUT): If not NULL, the location to place the thread |
| 10739 | handle for the thread. |
| 10740 | |
| 10741 | Returns |
| 10742 | |
| 10743 | OCI_SUCCESS, OCI_ERROR or OCI_INVALID_HANDLE. |
| 10744 | |
| 10745 | Notes |
| 10746 | |
| 10747 | 'thnd' should be initialized by OCIThreadHndInit(). |
| 10748 | |
| 10749 | The thread handle 'tHnd' retrieved by this function must be closed |
| 10750 | with OCIThreadClose() and destroyed by OCIThreadHndDestroy() after it |
| 10751 | is used. |
| 10752 | |
| 10753 | |
| 10754 | |
| 10755 | |
| 10756 | 1.4 Using OCIThread |
| 10757 | ===================== |
| 10758 | |
| 10759 | This section summarizes some of the more important details relating to the use |
| 10760 | of OCIThread. |
| 10761 | |
| 10762 | * Process initialization |
| 10763 | |
| 10764 | OCIThread only requires that the process initialization function |
| 10765 | ('OCIThreadProcessInit()') be called when OCIThread is being used in a |
| 10766 | multi-threaded application. Failing to call 'OCIThreadProcessInit()' in |
| 10767 | a single-threaded application is not an error. |
| 10768 | |
| 10769 | * OCIThread initialization |
| 10770 | |
| 10771 | Separate calls to 'OCIThreadInit()' will all return the same OCIThread |
| 10772 | context. |
| 10773 | |
| 10774 | Also, remember that each call to 'OCIThreadInit()' must eventually be |
| 10775 | matched by a call to 'OCIThreadTerm()'. |
| 10776 | |
| 10777 | * Active vs. Passive Threading primitives |
| 10778 | |
| 10779 | OCIThread client code written without using any active primitives can be |
| 10780 | compiled and used without change on both single-threaded and |
| 10781 | multi-threaded platforms. |
| 10782 | |
| 10783 | OCIThread client code written using active primitives will only work |
| 10784 | correctly on multi-threaded platforms. In order to write a version of the |
| 10785 | same application to run on single-threaded platform, it is necessary to |
| 10786 | branch the your code, whether by branching versions of the source file or |
| 10787 | by branching at runtime with the OCIThreadIsMulti() call. |
| 10788 | |
| 10789 | ******************************************************************************/ |
| 10790 | |
| 10791 | /***************************************************************************** |
| 10792 | ACTUAL PROTOTYPE DECLARATIONS |
| 10793 | ******************************************************************************/ |
| 10794 | |
| 10795 | void OCIThreadProcessInit(); |
| 10796 | |
| 10797 | sword OCIThreadInit(void *hndl, OCIError *err); |
| 10798 | |
| 10799 | sword OCIThreadTerm(void *hndl, OCIError *err); |
| 10800 | |
| 10801 | boolean OCIThreadIsMulti(); |
| 10802 | |
| 10803 | sword OCIThreadMutexInit(void *hndl, OCIError *err, |
| 10804 | OCIThreadMutex **mutex); |
| 10805 | |
| 10806 | sword OCIThreadMutexDestroy(void *hndl, OCIError *err, |
| 10807 | OCIThreadMutex **mutex); |
| 10808 | |
| 10809 | sword OCIThreadMutexAcquire(void *hndl, OCIError *err, |
| 10810 | OCIThreadMutex *mutex); |
| 10811 | |
| 10812 | sword OCIThreadMutexRelease(void *hndl, OCIError *err, |
| 10813 | OCIThreadMutex *mutex); |
| 10814 | |
| 10815 | sword OCIThreadKeyInit(void *hndl, OCIError *err, OCIThreadKey **key, |
| 10816 | OCIThreadKeyDestFunc destFn); |
| 10817 | |
| 10818 | sword OCIThreadKeyDestroy(void *hndl, OCIError *err, |
| 10819 | OCIThreadKey **key); |
| 10820 | |
| 10821 | sword OCIThreadKeyGet(void *hndl, OCIError *err, OCIThreadKey *key, |
| 10822 | void **pValue); |
| 10823 | |
| 10824 | sword OCIThreadKeySet(void *hndl, OCIError *err, OCIThreadKey *key, |
| 10825 | void *value); |
| 10826 | |
| 10827 | sword OCIThreadIdInit(void *hndl, OCIError *err, OCIThreadId **tid); |
| 10828 | |
| 10829 | sword OCIThreadIdDestroy(void *hndl, OCIError *err, OCIThreadId **tid); |
| 10830 | |
| 10831 | sword OCIThreadIdSet(void *hndl, OCIError *err, |
| 10832 | OCIThreadId *tidDest, OCIThreadId *tidSrc); |
| 10833 | |
| 10834 | sword OCIThreadIdSetNull(void *hndl, OCIError *err, OCIThreadId *tid); |
| 10835 | |
| 10836 | sword OCIThreadIdGet(void *hndl, OCIError *err, OCIThreadId *tid); |
| 10837 | |
| 10838 | sword OCIThreadIdSame(void *hndl, OCIError *err, |
| 10839 | OCIThreadId *tid1, OCIThreadId *tid2, |
| 10840 | boolean *result); |
| 10841 | |
| 10842 | sword OCIThreadIdNull(void *hndl, OCIError *err, |
| 10843 | OCIThreadId *tid, boolean *result); |
| 10844 | |
| 10845 | sword OCIThreadHndInit(void *hndl, OCIError *err, OCIThreadHandle **thnd); |
| 10846 | |
| 10847 | sword OCIThreadHndDestroy(void *hndl, OCIError *err, OCIThreadHandle **thnd); |
| 10848 | |
| 10849 | sword OCIThreadCreate(void *hndl, OCIError *err, |
| 10850 | void (*start)(void *), void *arg, |
| 10851 | OCIThreadId *tid, OCIThreadHandle *tHnd); |
| 10852 | |
| 10853 | sword OCIThreadJoin(void *hndl, OCIError *err, OCIThreadHandle *tHnd); |
| 10854 | |
| 10855 | sword OCIThreadClose(void *hndl, OCIError *err, OCIThreadHandle *tHnd); |
| 10856 | |
| 10857 | sword OCIThreadHandleGet(void *hndl, OCIError *err, OCIThreadHandle *tHnd); |
| 10858 | /*----------------- End OCI Thread interface Extensions ---------------------*/ |
| 10859 | |
| 10860 | /*------------------ Begin OCI Row Callback Interfaces ----------------------*/ |
| 10861 | |
| 10862 | typedef sword (*OCIBindRowCallback)(void *ctx); |
| 10863 | typedef sword (*OCIFetchRowCallback)(void *ctx); |
| 10864 | |
| 10865 | /*------------------ Begin OCI Row Callback Interfaces ----------------------*/ |
| 10866 | |
| 10867 | /*--------------- Begin OCI Client Notification Interfaces ------------------*/ |
| 10868 | |
| 10869 | typedef ub4 (*OCISubscriptionNotify)(void *ctx, OCISubscription *subscrhp, |
| 10870 | void *pay, ub4 payl, |
| 10871 | void *desc, ub4 mode); |
| 10872 | |
| 10873 | sword OCISubscriptionRegister(OCISvcCtx *svchp, OCISubscription **subscrhpp, |
| 10874 | ub2 count, OCIError *errhp, ub4 mode); |
| 10875 | |
| 10876 | |
| 10877 | sword OCISubscriptionPost(OCISvcCtx *svchp, OCISubscription **subscrhpp, |
| 10878 | ub2 count, OCIError *errhp, ub4 mode); |
| 10879 | |
| 10880 | sword OCISubscriptionUnRegister(OCISvcCtx *svchp, OCISubscription *subscrhp, |
| 10881 | OCIError *errhp, ub4 mode); |
| 10882 | |
| 10883 | sword OCISubscriptionDisable(OCISubscription *subscrhp, |
| 10884 | OCIError *errhp, ub4 mode); |
| 10885 | |
| 10886 | sword OCISubscriptionEnable(OCISubscription *subscrhp, |
| 10887 | OCIError *errhp, ub4 mode); |
| 10888 | |
| 10889 | /*------------------- End OCI Publish/Subscribe Interfaces ------------------*/ |
| 10890 | |
| 10891 | /*----------------- Extensions to Datetime interfaces -----------------------*/ |
| 10892 | /*--------------------- Actual Prototypes -----------------------------------*/ |
| 10893 | sword OCIDateTimeGetTime(void *hndl, OCIError *err, OCIDateTime *datetime, |
| 10894 | ub1 *hr, ub1 *mm, ub1 *ss, ub4 *fsec); |
| 10895 | |
| 10896 | sword OCIDateTimeGetDate(void *hndl, OCIError *err, const OCIDateTime *date, |
| 10897 | sb2 *yr, ub1 *mnth, ub1 *dy ); |
| 10898 | |
| 10899 | sword OCIDateTimeGetTimeZoneOffset(void *hndl,OCIError *err, |
| 10900 | const OCIDateTime *datetime, |
| 10901 | sb1 *hr,sb1 *mm); |
| 10902 | |
| 10903 | sword OCIDateTimeConstruct(void *hndl,OCIError *err,OCIDateTime *datetime, |
| 10904 | sb2 yr,ub1 mnth,ub1 dy,ub1 hr,ub1 mm,ub1 ss,ub4 fsec, |
| 10905 | OraText *timezone,size_t timezone_length); |
| 10906 | |
| 10907 | sword OCIDateTimeSysTimeStamp(void *hndl, OCIError *err, |
| 10908 | OCIDateTime *sys_date ); |
| 10909 | |
| 10910 | sword OCIDateTimeAssign(void *hndl, OCIError *err, const OCIDateTime *from, |
| 10911 | OCIDateTime *to); |
| 10912 | |
| 10913 | sword OCIDateTimeToText(void *hndl, OCIError *err, const OCIDateTime *date, |
| 10914 | const OraText *fmt, ub1 fmt_length, ub1 fsprec, |
| 10915 | const OraText *lang_name, size_t lang_length, |
| 10916 | ub4 *buf_size, OraText *buf ); |
| 10917 | |
| 10918 | sword OCIDateTimeFromText(void *hndl, OCIError *err, const OraText *date_str, |
| 10919 | size_t dstr_length, const OraText *fmt, ub1 fmt_length, |
| 10920 | const OraText *lang_name, size_t lang_length, OCIDateTime *date ); |
| 10921 | |
| 10922 | sword OCIDateTimeCompare(void *hndl, OCIError *err, const OCIDateTime *date1, |
| 10923 | const OCIDateTime *date2, sword *result ); |
| 10924 | |
| 10925 | sword OCIDateTimeCheck(void *hndl, OCIError *err, const OCIDateTime *date, |
| 10926 | ub4 *valid ); |
| 10927 | |
| 10928 | sword OCIDateTimeConvert(void *hndl, OCIError *err, OCIDateTime *indate, |
| 10929 | OCIDateTime *outdate); |
| 10930 | |
| 10931 | sword OCIDateTimeSubtract(void *hndl, OCIError *err, OCIDateTime *indate1, |
| 10932 | OCIDateTime *indate2, OCIInterval *inter); |
| 10933 | |
| 10934 | sword OCIDateTimeIntervalAdd(void *hndl, OCIError *err, OCIDateTime *datetime, |
| 10935 | OCIInterval *inter, OCIDateTime *outdatetime); |
| 10936 | |
| 10937 | sword OCIDateTimeIntervalSub(void *hndl, OCIError *err, OCIDateTime *datetime, |
| 10938 | OCIInterval *inter, OCIDateTime *outdatetime); |
| 10939 | |
| 10940 | sword OCIIntervalSubtract(void *hndl, OCIError *err, OCIInterval *minuend, |
| 10941 | OCIInterval *subtrahend, OCIInterval *result ); |
| 10942 | |
| 10943 | sword OCIIntervalAdd(void *hndl, OCIError *err, OCIInterval *addend1, |
| 10944 | OCIInterval *addend2, OCIInterval *result ); |
| 10945 | |
| 10946 | sword OCIIntervalMultiply(void *hndl, OCIError *err, const OCIInterval *inter, |
| 10947 | OCINumber *nfactor, OCIInterval *result ); |
| 10948 | |
| 10949 | sword OCIIntervalDivide(void *hndl, OCIError *err, OCIInterval *dividend, |
| 10950 | OCINumber *divisor, OCIInterval *result ); |
| 10951 | |
| 10952 | sword OCIIntervalCompare(void *hndl, OCIError *err, OCIInterval *inter1, |
| 10953 | OCIInterval *inter2, sword *result ); |
| 10954 | |
| 10955 | sword OCIIntervalFromNumber(void *hndl, OCIError *err, OCIInterval *inter, |
| 10956 | OCINumber *number); |
| 10957 | |
| 10958 | sword OCIIntervalFromText( void *hndl, OCIError *err, const OraText *inpstr, |
| 10959 | size_t str_len, OCIInterval *result ); |
| 10960 | |
| 10961 | sword OCIIntervalToText( void *hndl, OCIError *err, const OCIInterval *inter, |
| 10962 | ub1 lfprec, ub1 fsprec, |
| 10963 | OraText *buffer, size_t buflen, size_t *resultlen ); |
| 10964 | |
| 10965 | sword OCIIntervalToNumber(void *hndl, OCIError *err,const OCIInterval *inter, |
| 10966 | OCINumber *number); |
| 10967 | |
| 10968 | sword OCIIntervalCheck(void *hndl, OCIError *err, const OCIInterval *interval, |
| 10969 | ub4 *valid ); |
| 10970 | |
| 10971 | sword OCIIntervalAssign(void *hndl, OCIError *err, const OCIInterval *ininter, |
| 10972 | OCIInterval *outinter ); |
| 10973 | |
| 10974 | sword OCIIntervalSetYearMonth(void *hndl, OCIError *err, sb4 yr, sb4 mnth, |
| 10975 | OCIInterval *result ); |
| 10976 | |
| 10977 | sword OCIIntervalGetYearMonth(void *hndl, OCIError *err, sb4 *yr, sb4 *mnth, |
| 10978 | const OCIInterval *result ); |
| 10979 | |
| 10980 | sword OCIIntervalSetDaySecond(void *hndl, OCIError *err, sb4 dy, sb4 hr, |
| 10981 | sb4 mm, sb4 ss, sb4 fsec, OCIInterval *result ); |
| 10982 | |
| 10983 | sword OCIIntervalGetDaySecond(void *hndl, OCIError *err, sb4 *dy, sb4 *hr, |
| 10984 | sb4 *mm, sb4 *ss, sb4 *fsec, const OCIInterval *result ); |
| 10985 | |
| 10986 | sword OCIDateTimeToArray(void *hndl, OCIError *err, |
| 10987 | const OCIDateTime *datetime, const OCIInterval *reftz, |
| 10988 | ub1 *outarray, ub4 *len, ub1 fsprec); |
| 10989 | |
| 10990 | sword OCIDateTimeFromArray(void *hndl, OCIError *err, ub1 *inarray, ub4 len, |
| 10991 | ub1 type, OCIDateTime *datetime, |
| 10992 | const OCIInterval *reftz, ub1 fsprec); |
| 10993 | |
| 10994 | sword OCIDateTimeGetTimeZoneName(void *hndl, OCIError *err, |
| 10995 | const OCIDateTime *datetime, |
| 10996 | ub1 *buf, ub4 *buflen); |
| 10997 | |
| 10998 | sword OCIIntervalFromTZ(void *hndl, OCIError *err, const oratext *inpstring, |
| 10999 | size_t str_len, OCIInterval *result); |
| 11000 | |
| 11001 | /*----------------- End Datetime interface Extensions -----------------------*/ |
| 11002 | |
| 11003 | /*----------------- Connection Pooling prototypes ---------------------------*/ |
| 11004 | sword OCIConnectionPoolCreate(OCIEnv *envhp, OCIError *errhp, OCICPool *poolhp, |
| 11005 | OraText **poolName, sb4 *poolNameLen, |
| 11006 | const OraText *dblink, sb4 dblinkLen, |
| 11007 | ub4 connMin, ub4 connMax, ub4 connIncr, |
| 11008 | const OraText *poolUserName, sb4 poolUserLen, |
| 11009 | const OraText *poolPassword, sb4 poolPassLen, |
| 11010 | ub4 mode); |
| 11011 | |
| 11012 | sword OCIConnectionPoolDestroy(OCICPool *poolhp, |
| 11013 | OCIError *errhp, ub4 mode); |
| 11014 | |
| 11015 | /*----------------- End Connection Pooling prototypes -----------------------*/ |
| 11016 | |
| 11017 | /*-------------------- Session Pooling prototypes ---------------------------*/ |
| 11018 | |
| 11019 | sword OCISessionPoolCreate (OCIEnv *envhp, OCIError *errhp, OCISPool *spoolhp, |
| 11020 | OraText **poolName, ub4 *poolNameLen, |
| 11021 | const OraText *connStr, ub4 connStrLen, |
| 11022 | ub4 sessMin, ub4 sessMax, ub4 sessIncr, |
| 11023 | OraText *userid, ub4 useridLen, |
| 11024 | OraText *password, ub4 passwordLen, |
| 11025 | ub4 mode); |
| 11026 | |
| 11027 | sword OCISessionPoolDestroy (OCISPool *spoolhp, |
| 11028 | OCIError *errhp, |
| 11029 | ub4 mode); |
| 11030 | |
| 11031 | sword OCISessionGet (OCIEnv *envhp, OCIError *errhp, OCISvcCtx **svchp, |
| 11032 | OCIAuthInfo *authhp, |
| 11033 | OraText *poolName, ub4 poolName_len, |
| 11034 | const OraText *tagInfo, ub4 tagInfo_len, |
| 11035 | OraText **retTagInfo, ub4 *retTagInfo_len, |
| 11036 | boolean *found, ub4 mode); |
| 11037 | |
| 11038 | sword OCISessionRelease (OCISvcCtx *svchp, OCIError *errhp, |
| 11039 | OraText *tag, ub4 tag_len, |
| 11040 | ub4 mode); |
| 11041 | |
| 11042 | /*-------------------- End Session Pooling prototypes -----------------------*/ |
| 11043 | |
| 11044 | /* --------------------- OCI Application Context --------------------------*/ |
| 11045 | |
| 11046 | |
| 11047 | sword OCIAppCtxSet(void * sesshndl, void *nsptr, ub4 nsptrlen, |
| 11048 | void *attrptr, ub4 attrptrlen, |
| 11049 | void *valueptr, ub4 valueptrlen, |
| 11050 | OCIError *errhp, ub4 mode); |
| 11051 | |
| 11052 | sword OCIAppCtxClearAll(void *sesshndl, void *nsptr, ub4 nsptrlen, |
| 11053 | OCIError *errhp, ub4 mode); |
| 11054 | |
| 11055 | /*-------------------------------- OCIMemStats ------------------------------*/ |
| 11056 | sword OCIMemStats(void *hndlp, OCIError *errhp, OCIEnv **envhp, |
| 11057 | ub4 mode, ub4 mode1, oratext *tabname); |
| 11058 | |
| 11059 | /*-------------------------------- OCIPing ----------------------------------*/ |
| 11060 | sword OCIPing (OCISvcCtx *svchp, OCIError *errhp, ub4 mode); |
| 11061 | |
| 11062 | /*----------------- Kerberos Authentication prototypes ----------------------*/ |
| 11063 | |
| 11064 | sword OCIKerbAttrSet(OCISession *trgthndlp, ub4 cred_use, ub1 *ftgt_ticket, |
| 11065 | ub4 ticket_len, ub1 *session_key, ub4 skey_len, |
| 11066 | ub2 ftgt_keytype, ub4 ftgt_ticket_flags, |
| 11067 | sb4 ftgt_auth_time, sb4 ftgt_start_time, |
| 11068 | sb4 ftgt_end_time, sb4 ftgt_renew_time, |
| 11069 | oratext *ftgt_client_principal, |
| 11070 | ub4 ftgt_client_principal_len, oratext *ftgt_client_realm, |
| 11071 | ub4 ftgt_client_realm_len, OCIError *errhp); |
| 11072 | |
| 11073 | /*------------------- End Kerberos Authentication prototypes ----------------*/ |
| 11074 | |
| 11075 | /*------------------- Database Startup/Shutdown prototypes ------------------*/ |
| 11076 | |
| 11077 | sword OCIDBStartup (OCISvcCtx *svchp, |
| 11078 | OCIError *errhp, |
| 11079 | OCIAdmin *admhp, |
| 11080 | ub4 mode, |
| 11081 | ub4 flags); |
| 11082 | |
| 11083 | sword OCIDBShutdown(OCISvcCtx *svchp, |
| 11084 | OCIError *errhp, |
| 11085 | OCIAdmin *admhp, |
| 11086 | ub4 mode); |
| 11087 | |
| 11088 | /*------------------ End Database Startup/Shutdown prototypes ---------------*/ |
| 11089 | |
| 11090 | /*----------------------- OCIClientVersion ------------------------------*/ |
| 11091 | void OCIClientVersion(sword *major_version, |
| 11092 | sword *minor_version, |
| 11093 | sword *update_num, |
| 11094 | sword *patch_num, |
| 11095 | sword *port_update_num); |
| 11096 | /*----------------------- End OCIClientVersion --------------------------*/ |
| 11097 | |
| 11098 | /*----------------------- HA Event prototypes ------------------------------*/ |
| 11099 | |
| 11100 | sword OCIInitEventHandle(OCIError *errhp, |
| 11101 | OCIEvent *event, |
| 11102 | text *str, |
| 11103 | ub4 size); |
| 11104 | |
| 11105 | /*----------------------- End HA Event prototypes --------------------------*/ |
| 11106 | |
| 11107 | /*--------------------------------------------------------------------------- |
| 11108 | PRIVATE FUNCTIONS |
| 11109 | ---------------------------------------------------------------------------*/ |
| 11110 | |
| 11111 | /* the following functions are depracated and should not be used */ |
| 11112 | #ifdef NEVER |
| 11113 | sword OCIStmtBindByPos (OCIStmt *stmtp, OCIBind *bindp, OCIError *errhp, |
| 11114 | ub4 position, void *valuep, sb4 value_sz, |
| 11115 | ub2 dty, void *indp, ub2 *alenp, ub2 *rcodep, |
| 11116 | ub4 maxarr_len, ub4 *curelep, ub4 mode); |
| 11117 | |
| 11118 | |
| 11119 | sword OCIStmtBindByName (OCIStmt *stmtp, OCIBind *bindp, OCIError *errhp, |
| 11120 | const OraText *placeholder, sb4 placeh_len, void *valuep, |
| 11121 | sb4 value_sz, ub2 dty, void *indp, ub2 *alenp, |
| 11122 | ub2 *rcodep, ub4 maxarr_len, ub4 *curelep, ub4 mode); |
| 11123 | |
| 11124 | sword ocidefn (OCIStmt *stmtp, OCIDefine *defnp, OCIError *errhp, |
| 11125 | ub4 position, void *valuep, sb4 value_sz, ub2 dty, |
| 11126 | void *indp, ub2 *rlenp, ub2 *rcodep, ub4 mode); |
| 11127 | #endif /* NEVER */ |
| 11128 | |
| 11129 | #endif /* OCIAP_ORACLE */ |