zeoslib  UNKNOWN
 All Files
ZPlainOracleConstants.pas
Go to the documentation of this file.
1 {*********************************************************}
2 { }
3 { Zeos Database Objects }
4 { Delphi interface to Oracle Call Interface }
5 { }
6 { Originally written by Sergey Seroukhov }
7 { }
8 {*********************************************************}
9 
10 {@********************************************************}
11 { Copyright (c) 1999-2012 Zeos Development Group }
12 { }
13 { License Agreement: }
14 { }
15 { This library is distributed in the hope that it will be }
16 { useful, but WITHOUT ANY WARRANTY; without even the }
17 { implied warranty of MERCHANTABILITY or FITNESS FOR }
18 { A PARTICULAR PURPOSE. See the GNU Lesser General }
19 { Public License for more details. }
20 { }
21 { The source code of the ZEOS Libraries and packages are }
22 { distributed under the Library GNU General Public }
23 { License (see the file COPYING / COPYING.ZEOS) }
24 { with the following modification: }
25 { As a special exception, the copyright holders of this }
26 { library give you permission to link this library with }
27 { independent modules to produce an executable, }
28 { regardless of the license terms of these independent }
29 { modules, and to copy and distribute the resulting }
30 { executable under terms of your choice, provided that }
31 { you also meet, for each linked independent module, }
32 { the terms and conditions of the license of that module. }
33 { An independent module is a module which is not derived }
34 { from or based on this library. If you modify this }
35 { library, you may extend this exception to your version }
36 { of the library, but you are not obligated to do so. }
37 { If you do not wish to do so, delete this exception }
38 { statement from your version. }
39 { }
40 { }
41 { The project web site is located on: }
42 { http://zeos.firmos.at (FORUM) }
43 { http://sourceforge.net/p/zeoslib/tickets/ (BUGTRACKER)}
44 { svn://svn.code.sf.net/p/zeoslib/code-0/trunk (SVN) }
45 { }
46 { http://www.sourceforge.net/projects/zeoslib. }
47 { }
48 { }
49 { Zeos Development Group. }
50 {********************************************************@}
51 
52 unit ZPlainOracleConstants;
53 
54 interface
55 
56 {$I ZPlain.inc}
57 
58 {$J+}
59 
60 uses
61  ZCompatibility;
62 
63 {***************** Plain API types definition ****************}
64 
65 const
66  WINDOWS_DLL_LOCATION = 'oci.dll';
67 // WINDOWS_DLL_LOCATION = 'ora803.dll';
68  LINUX_DLL_LOCATION = 'libclntsh'+SharedSuffix;
69 // LINUX_DLL_LOCATION = 'libwtc8.so';
70 
71 type
72  { Generic Oracle Types }
73  sword = Integer;
74  psword = ^sword;
75  eword = Integer;
76  uword = LongInt;
77  sb4 = Integer;
78  ub4 = LongInt;
79  sb2 = SmallInt;
80  ub2 = Word;
81  sb1 = ShortInt;
82  ub1 = Byte;
83  dvoid = Pointer;
84  text = PAnsiChar;
85  size_T = NativeUInt;
86 
87  pub1 = ^ub1;
88  psb1 = ^sb1;
89  pub2 = ^ub2;
90  psb2 = ^sb2;
91  pub4 = ^ub4;
92  psb4 = ^sb4;
93 
94  { Handle Types }
95  POCIHandle = Pointer;
96  PPOCIHandle = ^Pointer;
97  POCIEnv = POCIHandle;
98  POCIServer = POCIHandle;
99  POCIError = POCIHandle;
100  POCISvcCtx = POCIHandle;
101  POCIStmt = POCIHandle;
102  POCIDefine = POCIHandle;
103  POCISession = POCIHandle;
104  POCIBind = POCIHandle;
105  POCIDescribe = POCIHandle;
106  POCITrans = POCIHandle;
107  POCITable = POCIHandle;
108  POCIIter = POCIHandle;
109  POCIType = Pointer;
110  PPOCIType = ^POCIType;
111  POCIInd = Pointer;
112  PPOCIInd = ^POCIInd;
113 
114  POCITypeCode = POCIHandle;
115  POCITypeElem = POCIHandle;
116  POCITypeIter = POCIHandle;
117  PPOCITypeIter = ^POCITypeIter;
118  POCITypeMethod = POCIHandle;
119 
120  OCITypeGetOpt = (
121  OCI_TYPEGET_HEADER,// load only the header portion of the TDO when getting type
122  OCI_TYPEGET_ALL //load all attribute and method descriptors as well
123  );
124 
125  { Descriptor Types }
126  POCIDescriptor = Pointer;
127  PPOCIDescriptor = ^POCIDescriptor;
128  POCISnapshot = POCIDescriptor; //OCI snapshot descriptor
129  POCILobLocator = POCIDescriptor; //OCI Lob Locator descriptor
130  POCIParam = POCIDescriptor; //OCI Parameter descriptor
131  POCIRowid = POCIDescriptor; //OCI ROWID descriptor
132  POCIComplexObjectComp = POCIDescriptor;
133  POCIAQEnqOptions = POCIDescriptor;
134  POCIAQDeqOptions = POCIDescriptor;
135  POCIAQMsgProperties = POCIDescriptor;
136  POCIAQAgent = POCIDescriptor;
137  POCIDateTime = POCIDescriptor; //OCI DateTime descriptor
138  POCINumber = POCIDescriptor;
139  PPOCINumber = ^POCINumber;
140  POCIString = POCIDescriptor;
141  POCIInterval = POCIDescriptor; //OCI Interval descriptor
142  POCIResult = POCIDescriptor; //OCI Result Set Descriptor
143  PPOCITypeElem = PPOCIDescriptor;
144  PPOCITypeMethod = PPOCIDescriptor;
145 
146  OCIDuration = ub2; //enum!
147  POCIDuration = ^OCIDuration;
148  OCITypeEncap = ub2; //enum!
149  OCITypeMethodFlag = ub2; //enum!
150  OCITypeParamMode = ub2; //enum!
151  OCIObjectPropId = ub1;
152  OCIRefreshOpt = ub2; //enum;
153 
154 const
155  OCI_DURATION_INVALID = $FFFF; { Invalid duration }
156  OCI_DURATION_BEGIN = 10; { beginning sequence of duration }
157  OCI_DURATION_NULL = (OCI_DURATION_BEGIN-1); { null duration }
158  OCI_DURATION_DEFAULT = (OCI_DURATION_BEGIN-2); { default }
159  OCI_DURATION_USER_CALLBACK = (OCI_DURATION_BEGIN-3);
160  OCI_DURATION_NEXT = (OCI_DURATION_BEGIN-4); { next special duration }
161  OCI_DURATION_SESSION = (OCI_DURATION_BEGIN); { the end of user session }
162  OCI_DURATION_TRANS = (OCI_DURATION_BEGIN+1); { the end of user transaction }
163  OCI_DURATION_STATEMENT = (OCI_DURATION_BEGIN+3);
164 { This is to be used only during callouts. It is similar to that
165 of OCI_DURATION_CALL, but lasts only for the duration of a callout.
166 Its heap is from PGA }
167  OCI_DURATION_CALLOUT = (OCI_DURATION_BEGIN+4);
168  OCI_DURATION_LAST = OCI_DURATION_CALLOUT; { last of predefined durations }
169 
170  OCI_TEMP_BLOB = 1; { LOB type - BLOB }
171  OCI_TEMP_CLOB = 2; { LOB type - CLOB }
172 
173 const
174  MAXTXNAMELEN = 64;
175  XIDDATASIZE = 128; { size in bytes }
176  MAXGTRIDSIZE = 64; { maximum size in bytes of gtrid }
177  MAXBQUALSIZE = 64; { maximum size in bytes of bqual }
178  NULLXID_ID = -1;
179 
180  { Transaction branch identification: XID and NULLXID: }
181 type
182  PXID = ^TXID;
183  TXID = record
184  formatID: sb4; { format identifier }
185  gtrid_length: sb4; { value from 1 through 64 }
186  bqual_length: sb4; { value from 1 through 64 }
187  data: array [0 .. XIDDATASIZE - 1] of ub1;
188  end;
189 
190 const
191  MAXUB4 = High(ub4);
192  MAXSB4 = High(sb4);
193 
194 {***************** Plain API constants definition ****************}
195 
196  { OCI Handle Types }
197  OCI_HTYPE_FIRST = 1;
198  OCI_HTYPE_ENV = 1;
199  OCI_HTYPE_ERROR = 2;
200  OCI_HTYPE_SVCCTX = 3;
201  OCI_HTYPE_STMT = 4;
202  OCI_HTYPE_BIND = 5;
203  OCI_HTYPE_DEFINE = 6;
204  OCI_HTYPE_DESCRIBE = 7;
205  OCI_HTYPE_SERVER = 8;
206  OCI_HTYPE_SESSION = 9;
207  OCI_HTYPE_TRANS = 10;
208  OCI_HTYPE_COMPLEXOBJECT = 11;
209  OCI_HTYPE_SECURITY = 12;
210  OCI_HTYPE_SUBSCRIPTION = 13;
211  OCI_HTYPE_DIRPATH_CTX = 14;
212  OCI_HTYPE_DIRPATH_COLUMN_ARRAY = 15;
213  OCI_HTYPE_DIRPATH_STREAM = 16;
214  OCI_HTYPE_PROC = 17;
215  OCI_HTYPE_LAST = 17;
216 
217  { OCI Descriptor Types }
218  OCI_DTYPE_FIRST = 50;
219  OCI_DTYPE_LOB = 50; //lob locator
220  OCI_DTYPE_SNAP = 51;
221  OCI_DTYPE_RSET = 52;
222  OCI_DTYPE_PARAM = 53; //a parameter descriptor obtained from ocigparm
223  OCI_DTYPE_ROWID = 54;
224  OCI_DTYPE_COMPLEXOBJECTCOMP = 55;
225  OCI_DTYPE_FILE = 56; //File Lob locator
226  OCI_DTYPE_AQENQ_OPTIONS = 57; //enqueue options
227  OCI_DTYPE_AQDEQ_OPTIONS = 58; //dequeue options
228  OCI_DTYPE_AQMSG_PROPERTIES = 59; //message properties
229  OCI_DTYPE_AQAGENT = 60; //aq agent
230  OCI_DTYPE_LOCATOR = 61;
231  OCI_DTYPE_INTERVAL_YM = 62; //Interval year month
232  OCI_DTYPE_INTERVAL_DS = 63; //Interval day second
233  OCI_DTYPE_AQNFY_DESCRIPTOR = 64;
234  OCI_DTYPE_LAST = 64;
235  OCI_DTYPE_DATE = 65; { Date }
236  OCI_DTYPE_TIME = 66; { Time }
237  OCI_DTYPE_TIME_TZ = 67; { Time with timezone }
238  OCI_DTYPE_TIMESTAMP = 68; { Timestamp }
239  OCI_DTYPE_TIMESTAMP_TZ = 69; { Timestamp with timezone }
240  OCI_DTYPE_TIMESTAMP_LTZ = 70; { Timestamp with local tz }
241 
242  { OCI Attributes Types }
243  OCI_ATTR_FNCODE = 1; // the OCI function code
244  OCI_ATTR_OBJECT = 2; // is the environment initialized in object mode
245  OCI_ATTR_NONBLOCKING_MODE = 3; // non blocking mode
246  OCI_ATTR_SQLCODE = 4; // the SQL verb
247  OCI_ATTR_ENV = 5; // the environment handle
248  OCI_ATTR_SERVER = 6; // the server handle
249  OCI_ATTR_SESSION = 7; // the user session handle
250  OCI_ATTR_TRANS = 8; // the transaction handle
251  OCI_ATTR_ROW_COUNT = 9; // the rows processed so far
252  OCI_ATTR_SQLFNCODE = 10; // the SQL verb of the statement
253  OCI_ATTR_PREFETCH_ROWS = 11; // sets the number of rows to prefetch
254  OCI_ATTR_NESTED_PREFETCH_ROWS = 12; // the prefetch rows of nested table
255  OCI_ATTR_PREFETCH_MEMORY = 13; // memory limit for rows fetched
256  OCI_ATTR_NESTED_PREFETCH_MEMORY = 14;// memory limit for nested rows
257  OCI_ATTR_CHAR_COUNT = 15; // this specifies the bind and define size in characters
258  OCI_ATTR_PDSCL = 16; // packed decimal scale
259  OCI_ATTR_FSPRECISION = OCI_ATTR_PDSCL; // fs prec for datetime data types
260  OCI_ATTR_PDPRC = 17; // packed decimal format
261  OCI_ATTR_LFPRECISION = OCI_ATTR_PDPRC; // fs prec for datetime data types
262  OCI_ATTR_PARAM_COUNT = 18; // number of column in the select list
263  OCI_ATTR_ROWID = 19; // the rowid
264  OCI_ATTR_CHARSET = 20; // the character set value
265  OCI_ATTR_NCHAR = 21; // NCHAR type
266  OCI_ATTR_USERNAME = 22; // username attribute
267  OCI_ATTR_PASSWORD = 23; // password attribute
268  OCI_ATTR_STMT_TYPE = 24; // statement type
269  OCI_ATTR_INTERNAL_NAME = 25; // user friendly global name
270  OCI_ATTR_EXTERNAL_NAME = 26; // the internal name for global txn
271  OCI_ATTR_XID = 27; // XOPEN defined global transaction id
272  OCI_ATTR_TRANS_LOCK = 28; //
273  OCI_ATTR_TRANS_NAME = 29; // string to identify a global transaction
274  OCI_ATTR_HEAPALLOC = 30; // memory allocated on the heap
275  OCI_ATTR_CHARSET_ID = 31; // Character Set ID
276  OCI_ATTR_CHARSET_FORM = 32; // Character Set Form
277  OCI_ATTR_MAXDATA_SIZE = 33; // Maximumsize of data on the server
278  OCI_ATTR_CACHE_OPT_SIZE = 34; // object cache optimal size
279  OCI_ATTR_CACHE_MAX_SIZE = 35; // object cache maximum size percentage
280  OCI_ATTR_PINOPTION = 36; // object cache default pin option
281  OCI_ATTR_ALLOC_DURATION = 37; // object cache default allocation duration
282  OCI_ATTR_PIN_DURATION = 38; // object cache default pin duration
283  OCI_ATTR_FDO = 39; // Format Descriptor object attribute
284  OCI_ATTR_POSTPROCESSING_CALLBACK = 40; // Callback to process outbind data
285  OCI_ATTR_POSTPROCESSING_CONTEXT = 41; // Callback context to process outbind data
286  OCI_ATTR_ROWS_RETURNED = 42; // Number of rows returned in current iter - for Bind handles
287  OCI_ATTR_FOCBK = 43; // Failover Callback attribute
288  OCI_ATTR_IN_V8_MODE = 44; // is the server/service context in V8 mode
289  OCI_ATTR_LOBEMPTY = 45; // empty lob ?
290  OCI_ATTR_SESSLANG = 46; // session language handle
291 
292  OCI_ATTR_VISIBILITY = 47; // visibility
293  OCI_ATTR_RELATIVE_MSGID = 48; // relative message id
294  OCI_ATTR_SEQUENCE_DEVIATION = 49; // sequence deviation
295 
296  OCI_ATTR_CONSUMER_NAME = 50; // consumer name
297  OCI_ATTR_DEQ_MODE = 51; // dequeue mode
298  OCI_ATTR_NAVIGATION = 52; // navigation
299  OCI_ATTR_WAIT = 53; // wait
300  OCI_ATTR_DEQ_MSGID = 54; // dequeue message id
301 
302  OCI_ATTR_PRIORITY = 55; // priority
303  OCI_ATTR_DELAY = 56; // delay
304  OCI_ATTR_EXPIRATION = 57; // expiration
305  OCI_ATTR_CORRELATION = 58; // correlation id
306  OCI_ATTR_ATTEMPTS = 59; // # of attempts
307  OCI_ATTR_RECIPIENT_LIST = 60; // recipient list
308  OCI_ATTR_EXCEPTION_QUEUE = 61; // exception queue name
309  OCI_ATTR_ENQ_TIME = 62; // enqueue time (only OCIAttrGet)
310  OCI_ATTR_MSG_STATE = 63; // message state (only OCIAttrGet)
311  // NOTE: 64-66 used below
312  OCI_ATTR_AGENT_NAME = 64; // agent name
313  OCI_ATTR_AGENT_ADDRESS = 65; // agent address
314  OCI_ATTR_AGENT_PROTOCOL = 66; // agent protocol
315 
316  OCI_ATTR_SENDER_ID = 68; // sender id
317  OCI_ATTR_ORIGINAL_MSGID = 69; // original message id
318 
319  OCI_ATTR_QUEUE_NAME = 70; // queue name
320  OCI_ATTR_NFY_MSGID = 71; // message id
321  OCI_ATTR_MSG_PROP = 72; // message properties
322 
323  OCI_ATTR_NUM_DML_ERRORS = 73; // num of errs in array DML
324  OCI_ATTR_DML_ROW_OFFSET = 74; // row offset in the array
325 
326  OCI_ATTR_DATEFORMAT = 75; // default date format string
327  OCI_ATTR_BUF_ADDR = 76; // buffer address
328  OCI_ATTR_BUF_SIZE = 77; // buffer size
329  OCI_ATTR_DIRPATH_MODE = 78; // mode of direct path operation
330  OCI_ATTR_DIRPATH_NOLOG = 79; // nologging option
331  OCI_ATTR_DIRPATH_PARALLEL = 80; // parallel (temp seg) option
332  OCI_ATTR_NUM_ROWS = 81; // number of rows in column array
333  // NOTE that OCI_ATTR_NUM_COLS is a column
334  // array attribute too.
335 
336  OCI_ATTR_COL_COUNT = 82; // columns of column array processed so far.
337  OCI_ATTR_STREAM_OFFSET = 83; // str off of last row processed
338  OCI_ATTR_SHARED_HEAPALLOC = 84; // Shared Heap Allocation Size
339 
340  OCI_ATTR_SERVER_GROUP = 85; // server group name
341 
342  OCI_ATTR_MIGSESSION = 86; // migratable session attribute
343 
344  OCI_ATTR_NOCACHE = 87; // Temporary LOBs
345 
346  OCI_ATTR_MEMPOOL_SIZE = 88; // Pool Size
347  OCI_ATTR_MEMPOOL_INSTNAME = 89; // Instance name
348  OCI_ATTR_MEMPOOL_APPNAME = 90; // Application name
349  OCI_ATTR_MEMPOOL_HOMENAME = 91; // Home Directory name
350  OCI_ATTR_MEMPOOL_MODEL = 92; // Pool Model (proc,thrd,both)
351  OCI_ATTR_MODES = 93; // Modes
352 
353  OCI_ATTR_SUBSCR_NAME = 94; // name of subscription
354  OCI_ATTR_SUBSCR_CALLBACK = 95; // associated callback
355  OCI_ATTR_SUBSCR_CTX = 96; // associated callback context
356  OCI_ATTR_SUBSCR_PAYLOAD = 97; // associated payload
357  OCI_ATTR_SUBSCR_NAMESPACE = 98; // associated namespace
358 
359  OCI_ATTR_PROXY_CREDENTIALS = 99; // Proxy user credentials
360  OCI_ATTR_INITIAL_CLIENT_ROLES = 100; // Initial client role list
361 
362  OCI_ATTR_UNK = 101; // unknown attribute
363  OCI_ATTR_NUM_COLS = 102; // number of columns
364  OCI_ATTR_LIST_COLUMNS = 103; // parameter of the column list
365  OCI_ATTR_RDBA = 104; // DBA of the segment header
366  OCI_ATTR_CLUSTERED = 105; // whether the table is clustered
367  OCI_ATTR_PARTITIONED = 106; // whether the table is partitioned
368  OCI_ATTR_INDEX_ONLY = 107; // whether the table is index only
369  OCI_ATTR_LIST_ARGUMENTS = 108; // parameter of the argument list
370  OCI_ATTR_LIST_SUBPROGRAMS = 109; // parameter of the subprogram list
371  OCI_ATTR_REF_TDO = 110; // REF to the type descriptor
372  OCI_ATTR_LINK = 111; // the database link name
373  OCI_ATTR_MIN = 112; // minimum value
374  OCI_ATTR_MAX = 113; // maximum value
375  OCI_ATTR_INCR = 114; // increment value
376  OCI_ATTR_CACHE = 115; // number of sequence numbers cached
377  OCI_ATTR_ORDER = 116; // whether the sequence is ordered
378  OCI_ATTR_HW_MARK = 117; // high-water mark
379  OCI_ATTR_TYPE_SCHEMA = 118; // type's schema name
380  OCI_ATTR_TIMESTAMP = 119; // timestamp of the object
381  OCI_ATTR_NUM_ATTRS = 120; // number of sttributes
382  OCI_ATTR_NUM_PARAMS = 121; // number of parameters
383  OCI_ATTR_OBJID = 122; // object id for a table or view
384  OCI_ATTR_PTYPE = 123; // type of info described by
385  OCI_ATTR_PARAM = 124; // parameter descriptor
386  OCI_ATTR_OVERLOAD_ID = 125; // overload ID for funcs and procs
387  OCI_ATTR_TABLESPACE = 126; // table name space
388  OCI_ATTR_TDO = 127; // TDO of a type
389  OCI_ATTR_LTYPE = 128; // list type
390  OCI_ATTR_PARSE_ERROR_OFFSET = 129; // Parse Error offset
391  OCI_ATTR_IS_TEMPORARY = 130; // whether table is temporary
392  OCI_ATTR_IS_TYPED = 131; // whether table is typed
393  OCI_ATTR_DURATION = 132; // duration of temporary table
394  OCI_ATTR_IS_INVOKER_RIGHTS = 133; // is invoker rights
395  OCI_ATTR_OBJ_NAME = 134; // top level schema obj name
396  OCI_ATTR_OBJ_SCHEMA = 135; // schema name
397  OCI_ATTR_OBJ_ID = 136; // top level schema object id
398 
399  // for inheritance - part 2
400  OCI_ATTR_IS_FINAL_TYPE = 279; //is final type ?
401  OCI_ATTR_IS_INSTANTIABLE_TYPE = 280; //is instantiable type ?
402  OCI_ATTR_IS_FINAL_METHOD = 281; //is final method ?
403  OCI_ATTR_IS_INSTANTIABLE_METHOD = 282; // is instantiable method ?
404  OCI_ATTR_IS_OVERRIDING_METHOD = 283; // is overriding method ?
405 
406  OCI_ATTR_DESC_SYNBASE = 284; //Describe the base object
407 
408  OCI_ATTR_CHAR_USED = 285; //char length semantics
409  OCI_ATTR_CHAR_SIZE = 286; //char length
410 
411  { OCI Error Return Values }
412  OCI_SUCCESS = 0;
413  OCI_SUCCESS_WITH_INFO = 1;
414  OCI_NO_DATA = 100;
415  OCI_ERROR = -1;
416  OCI_INVALID_HANDLE = -2;
417  OCI_NEED_DATA = 99;
418  OCI_STILL_EXECUTING = -3123;
419  OCI_CONTINUE = -24200;
420 
421  { Generic Default Value for Modes, .... }
422  OCI_DEFAULT = $0;
423 
424  { OCI Init Mode }
425  OCI_THREADED = $1;
426  OCI_OBJECT = $2;
427  OCI_EVENTS = $4;
428  OCI_SHARED = $10;
429  OCI_NO_UCB = $40;
430  OCI_NO_MUTEX = $80;
431 
432  { OCI Credentials }
433  OCI_CRED_RDBMS = 1;
434  OCI_CRED_EXT = 2;
435  OCI_CRED_PROXY = 3;
436 
437  { OCI Authentication Mode }
438  OCI_MIGRATE = $0001; // migratable auth context
439  OCI_SYSDBA = $0002; // for SYSDBA authorization
440  OCI_SYSOPER = $0004; // for SYSOPER authorization
441  OCI_PRELIM_AUTH = $0008; // for preliminary authorization
442 
443  { OCIPasswordChange }
444  OCI_AUTH = $08; // Change the password but do not login
445 
446  { OCI Data Types }
447  SQLT_CHR = 1 ; //(ORANET TYPE) character string
448  SQLT_NUM = 2 ; //(ORANET TYPE) oracle numeric
449  SQLT_INT = 3 ; //(ORANET TYPE) integer
450  SQLT_FLT = 4 ; //(ORANET TYPE) Floating point number
451  SQLT_STR = 5 ; //zero terminated string
452  SQLT_VNU = 6 ; //NUM with preceding length byte
453  SQLT_PDN = 7 ; //(ORANET TYPE) Packed Decimal Numeric
454  SQLT_LNG = 8 ; //long
455  SQLT_VCS = 9 ; //Variable character string
456  SQLT_NON = 10 ; //Null/empty PCC Descriptor entry
457  SQLT_RID = 11 ; //rowid
458  SQLT_DAT = 12 ; //date in oracle format
459  SQLT_VBI = 15 ; //binary in VCS format
460  SQLT_BFLOAT = 21 ; //Native Binary float
461  SQLT_BDOUBLE = 22 ; //NAtive binary double
462  SQLT_BIN = 23 ; //binary data(DTYBIN)
463  SQLT_LBI = 24 ; //long binary
464  _SQLT_PLI = 29;
465  SQLT_UIN = 68 ; //unsigned integer
466  SQLT_SLS = 91 ; //Display sign leading separate
467  SQLT_LVC = 94 ; //Longer longs (char)
468  SQLT_LVB = 95 ; //Longer long binary
469  SQLT_AFC = 96 ; //Ansi fixed char
470  SQLT_AVC = 97 ; //Ansi Var char
471  SQLT_IBFLOAT = 100; //binary float canonical
472  SQLT_IBDOUBLE = 101; //binary double canonical
473  SQLT_CUR = 102; //cursor type
474  SQLT_RDD = 104; //rowid descriptor
475  SQLT_LAB = 105; //label type
476  SQLT_OSL = 106; //oslabel type
477  SQLT_NTY = 108; //named object type
478  SQLT_REF = 110; //ref typ
479  SQLT_CLOB = 112; //character lob
480  SQLT_BLOB = 113; //binary lob
481  SQLT_BFILEE = 114; //binary file lob
482  SQLT_CFILEE = 115; //character file lob
483  SQLT_RSET = 116; //result set type
484  SQLT_NCO = 122; //named collection type (varray or nested table)
485  SQLT_VST = 155; //OCIString type
486  SQLT_ODT = 156; //OCIDate type
487 
488  { datetimes and intervals }
489  SQLT_DATE = 184; //ANSI Date
490  SQLT_TIME = 185; //TIME
491  SQLT_TIME_TZ = 186; //TIME WITH TIME ZONE
492  SQLT_TIMESTAMP = 187; //TIMESTAMP
493  SQLT_TIMESTAMP_TZ = 188; //TIMESTAMP WITH TIME ZONE
494  SQLT_INTERVAL_YM = 189; //INTERVAL YEAR TO MONTH
495  SQLT_INTERVAL_DS = 190; //INTERVAL DAY TO SECOND
496  SQLT_TIMESTAMP_LTZ = 232; //TIMESTAMP WITH LOCAL TZ
497 
498  _SQLT_REC = 250;
499  _SQLT_TAB = 251;
500  _SQLT_BOL = 252;
501 
502  { > typecode defines from oro.h }
503  OCI_TYPECODE_REF = SQLT_REF; //SQL/OTS OBJECT REFERENCE
504  OCI_TYPECODE_VARRAY = 247; //SQL VARRAY OTS PAGED VARRAY
505  OCI_TYPECODE_TABLE = 248; //SQL TABLE OTS MULTISET
506  OCI_TYPECODE_OBJECT = SQLT_NTY; //SQL/OTS NAMED OBJECT TYPE
507  OCI_TYPECODE_OPAQUE = 58; //SQL/OTS Opaque Types
508  OCI_TYPECODE_NAMEDCOLLECTION = SQLT_NCO;
509 
510  { OCI Statement Types }
511  OCI_STMT_SELECT = 1; // select statement
512  OCI_STMT_UPDATE = 2; // update statement
513  OCI_STMT_DELETE = 3; // delete statement
514  OCI_STMT_INSERT = 4; // Insert Statement
515  OCI_STMT_CREATE = 5; // create statement
516  OCI_STMT_DROP = 6; // drop statement
517  OCI_STMT_ALTER = 7; // alter statement
518  OCI_STMT_BEGIN = 8; // begin ... (pl/sql statement)
519  OCI_STMT_DECLARE = 9; // declare .. (pl/sql statement)
520 
521  { OCI Statement language }
522  OCI_NTV_SYNTAX = 1; // Use what so ever is the native lang of server
523  OCI_V7_SYNTAX = 2; // V7 language
524  OCI_V8_SYNTAX = 3; // V8 language
525 
526  { OCI Statement Execute mode }
527  OCI_BATCH_MODE = $01; // batch the oci statement for execution
528  OCI_EXACT_FETCH = $02; // fetch the exact rows specified
529  OCI_SCROLLABLE_CURSOR = $08; // cursor scrollable
530  OCI_DESCRIBE_ONLY = $10; // only describe the statement
531  OCI_COMMIT_ON_SUCCESS = $20; // commit, if successful execution
532  OCI_NON_BLOCKING = $40; // non-blocking
533  OCI_BATCH_ERRORS = $80; // batch errors in array dmls
534  OCI_PARSE_ONLY = $100; // only parse the statement
535 
536  OCI_DATA_AT_EXEC = $02; // data at execute time
537  OCI_DYNAMIC_FETCH = $02; // fetch dynamically
538  OCI_PIECEWISE = $04; // piecewise DMLs or fetch
539 
540  { OCI Transaction modes }
541  OCI_TRANS_NEW = $00000001; // starts a new transaction branch
542  OCI_TRANS_JOIN = $00000002; // join an existing transaction
543  OCI_TRANS_RESUME = $00000004; // resume this transaction
544  OCI_TRANS_STARTMASK = $000000ff;
545 
546  OCI_TRANS_READONLY = $00000100; // starts a readonly transaction
547  OCI_TRANS_READWRITE = $00000200; // starts a read-write transaction
548  OCI_TRANS_SERIALIZABLE = $00000400; // starts a serializable transaction
549  OCI_TRANS_ISOLMASK = $0000ff00;
550 
551  OCI_TRANS_LOOSE = $00010000; // a loosely coupled branch
552  OCI_TRANS_TIGHT = $00020000; // a tightly coupled branch
553  OCI_TRANS_TYPEMASK = $000f0000;
554 
555  OCI_TRANS_NOMIGRATE = $00100000; // non migratable transaction
556  OCI_TRANS_TWOPHASE = $01000000; // use two phase commit
557 
558  { OCI pece wise fetch }
559  OCI_ONE_PIECE = 0; // one piece
560  OCI_FIRST_PIECE = 1; // the first piece
561  OCI_NEXT_PIECE = 2; // the next of many pieces
562  OCI_LAST_PIECE = 3; // the last piece
563 
564  { OCI fetch modes }
565  OCI_FETCH_NEXT = $02; // next row
566  OCI_FETCH_FIRST = $04; // first row of the result set
567  OCI_FETCH_LAST = $08; // the last row of the result set
568  OCI_FETCH_PRIOR = $10; // the previous row relative to current
569  OCI_FETCH_ABSOLUTE = $20; // absolute offset from first
570  OCI_FETCH_RELATIVE = $40; // offset relative to current
571 
572  {****************** Describe Handle Parameter Attributes *****************}
573 
574  { Attributes common to Columns and Stored Procs }
575  OCI_ATTR_DATA_SIZE = 1; // maximum size of the data
576  OCI_ATTR_DATA_TYPE = 2; // the SQL type of the column/argument
577  OCI_ATTR_DISP_SIZE = 3; // the display size
578  OCI_ATTR_NAME = 4; // the name of the column/argument
579  OCI_ATTR_PRECISION = 5; // precision if number type
580  OCI_ATTR_SCALE = 6; // scale if number type
581  OCI_ATTR_IS_NULL = 7; // is it null ?
582  OCI_ATTR_TYPE_NAME = 8; // name of the named data type or a package name for package private types
583  OCI_ATTR_SCHEMA_NAME = 9; // the schema name
584  OCI_ATTR_SUB_NAME = 10; // type name if package private type
585  OCI_ATTR_POSITION = 11; // relative position of col/arg in the list of cols/args
586 
587  { complex object retrieval parameter attributes }
588  OCI_ATTR_COMPLEXOBJECTCOMP_TYPE = 50;
589  OCI_ATTR_COMPLEXOBJECTCOMP_TYPE_LEVEL = 51;
590  OCI_ATTR_COMPLEXOBJECT_LEVEL = 52;
591  OCI_ATTR_COMPLEXOBJECT_COLL_OUTOFLINE = 53;
592 
593  { Only Columns }
594  OCI_ATTR_DISP_NAME = 100; // the display name
595 
596  { Only Stored Procs }
597  OCI_ATTR_OVERLOAD = 210; // is this position overloaded
598  OCI_ATTR_LEVEL = 211; // level for structured types
599  OCI_ATTR_HAS_DEFAULT = 212; // has a default value
600  OCI_ATTR_IOMODE = 213; // in, out inout
601  OCI_ATTR_RADIX = 214; // returns a radix
602  OCI_ATTR_NUM_ARGS = 215; // total number of arguments
603 
604  { only named type attributes }
605  OCI_ATTR_TYPECODE = 216; // object or collection
606  OCI_ATTR_COLLECTION_TYPECODE = 217; // varray or nested table
607  OCI_ATTR_VERSION = 218; // user assigned version
608  OCI_ATTR_IS_INCOMPLETE_TYPE = 219; // is this an incomplete type
609  OCI_ATTR_IS_SYSTEM_TYPE = 220; // a system type
610  OCI_ATTR_IS_PREDEFINED_TYPE = 221; // a predefined type
611  OCI_ATTR_IS_TRANSIENT_TYPE = 222; // a transient type
612  OCI_ATTR_IS_SYSTEM_GENERATED_TYPE = 223; // system generated type
613  OCI_ATTR_HAS_NESTED_TABLE = 224; // contains nested table attr
614  OCI_ATTR_HAS_LOB = 225; // has a lob attribute
615  OCI_ATTR_HAS_FILE = 226; // has a file attribute
616  OCI_ATTR_COLLECTION_ELEMENT = 227; // has a collection attribute
617  OCI_ATTR_NUM_TYPE_ATTRS = 228; // number of attribute types
618  OCI_ATTR_LIST_TYPE_ATTRS = 229; // list of type attributes
619  OCI_ATTR_NUM_TYPE_METHODS = 230; // number of type methods
620  OCI_ATTR_LIST_TYPE_METHODS = 231; // list of type methods
621  OCI_ATTR_MAP_METHOD = 232; // map method of type
622  OCI_ATTR_ORDER_METHOD = 233; // order method of type
623 
624  { only collection element }
625  OCI_ATTR_NUM_ELEMS = 234; // number of elements
626 
627  { only type methods }
628  OCI_ATTR_ENCAPSULATION = 235; // encapsulation level
629  OCI_ATTR_IS_SELFISH = 236; // method selfish
630  OCI_ATTR_IS_VIRTUAL = 237; // virtual
631  OCI_ATTR_IS_INLINE = 238; // inline
632  OCI_ATTR_IS_CONSTANT = 239; // constant
633  OCI_ATTR_HAS_RESULT = 240; // has result
634  OCI_ATTR_IS_CONSTRUCTOR = 241; // constructor
635  OCI_ATTR_IS_DESTRUCTOR = 242; // destructor
636  OCI_ATTR_IS_OPERATOR = 243; // operator
637  OCI_ATTR_IS_MAP = 244; // a map method
638  OCI_ATTR_IS_ORDER = 245; // order method
639  OCI_ATTR_IS_RNDS = 246; // read no data state method
640  OCI_ATTR_IS_RNPS = 247; // read no process state
641  OCI_ATTR_IS_WNDS = 248; // write no data state method
642  OCI_ATTR_IS_WNPS = 249; // write no process state
643 
644  OCI_ATTR_DESC_PUBLIC = 250; // public object
645 
646  { Object Cache Enhancements : attributes for User Constructed Instances }
647  OCI_ATTR_CACHE_CLIENT_CONTEXT = 251;
648  OCI_ATTR_UCI_CONSTRUCT = 252;
649  OCI_ATTR_UCI_DESTRUCT = 253;
650  OCI_ATTR_UCI_COPY = 254;
651  OCI_ATTR_UCI_PICKLE = 255;
652  OCI_ATTR_UCI_UNPICKLE = 256;
653  OCI_ATTR_UCI_REFRESH = 257;
654 
655  { for type inheritance }
656  OCI_ATTR_IS_SUBTYPE = 258;
657  OCI_ATTR_SUPERTYPE_SCHEMA_NAME = 259;
658  OCI_ATTR_SUPERTYPE_NAME = 260;
659 
660  { for schemas }
661  OCI_ATTR_LIST_OBJECTS = 261; // list of objects in schema
662 
663  { for database }
664  OCI_ATTR_NCHARSET_ID = 262; // char set id
665  OCI_ATTR_LIST_SCHEMAS = 263; // list of schemas
666  OCI_ATTR_MAX_PROC_LEN = 264; // max procedure length
667  OCI_ATTR_MAX_COLUMN_LEN = 265; // max column name length
668  OCI_ATTR_CURSOR_COMMIT_BEHAVIOR = 266; // cursor commit behavior
669  OCI_ATTR_MAX_CATALOG_NAMELEN = 267; // catalog namelength
670  OCI_ATTR_CATALOG_LOCATION = 268; // catalog location
671  OCI_ATTR_SAVEPOINT_SUPPORT = 269; // savepoint support
672  OCI_ATTR_NOWAIT_SUPPORT = 270; // nowait support
673  OCI_ATTR_AUTOCOMMIT_DDL = 271; // autocommit DDL
674  OCI_ATTR_LOCKING_MODE = 272; // locking mode
675 
676  OCI_ATTR_CACHE_ARRAYFLUSH = $40;
677  OCI_ATTR_OBJECT_NEWNOTNULL = $10;
678  OCI_ATTR_OBJECT_DETECTCHANGE = $20;
679 
680  {client side character and national character set ids }
681  OCI_ATTR_ENV_CHARSET_ID = OCI_ATTR_CHARSET_ID; // charset id in env
682  OCI_ATTR_ENV_NCHARSET_ID = OCI_ATTR_NCHARSET_ID; // ncharset id in env
683 
684  { Piece Information }
685  OCI_PARAM_IN = $01; // in parameter
686  OCI_PARAM_OUT = $02; // out parameter
687 
688  { LOB Buffering Flush Flags }
689  OCI_LOB_BUFFER_FREE = 1;
690  OCI_LOB_BUFFER_NOFREE = 2;
691 
692  { FILE open modes }
693  OCI_FILE_READONLY = 1; // readonly mode open for FILE types
694  { LOB open modes }
695  OCI_LOB_READONLY = 1; // readonly mode open for ILOB types
696  OCI_LOB_READWRITE = 2; // read write mode open for ILOBs
697 
698  { CHAR/NCHAR/VARCHAR2/NVARCHAR2/CLOB/NCLOB char set "form" information }
699  SQLCS_IMPLICIT = 1; // for CHAR, VARCHAR2, CLOB w/o a specified set
700  SQLCS_NCHAR = 2; // for NCHAR, NCHAR VARYING, NCLOB
701  SQLCS_EXPLICIT = 3; // for CHAR, etc, with "CHARACTER SET ..." syntax
702  SQLCS_FLEXIBLE = 4; // for PL/SQL "flexible" parameters
703  SQLCS_LIT_NULL = 5; // for typecheck of NULL and empty_clob() lits
704 
705  {************************ OCIDesribeAny *************************}
706 
707  { Describe mode }
708  OCI_OTYPE_NAME = 1;
709  OCI_OTYPE_REF = 2;
710  OCI_OTYPE_PTR = 3;
711 
712  { Object type }
713  OCI_PTYPE_UNK = 0; // unknown
714  OCI_PTYPE_TABLE = 1; // table
715  OCI_PTYPE_VIEW = 2; // view
716  OCI_PTYPE_PROC = 3; // procedure
717  OCI_PTYPE_FUNC = 4; // function
718  OCI_PTYPE_PKG = 5; // package
719  OCI_PTYPE_TYPE = 6; // user-defined type
720  OCI_PTYPE_SYN = 7; // synonym
721  OCI_PTYPE_SEQ = 8; // sequence
722  OCI_PTYPE_COL = 9; // column
723  OCI_PTYPE_ARG = 10; // argument
724  OCI_PTYPE_LIST = 11; // list
725  OCI_PTYPE_TYPE_ATTR = 12; // user-defined type's attribute
726  OCI_PTYPE_TYPE_COLL = 13; // collection type's element
727  OCI_PTYPE_TYPE_METHOD = 14; // user-defined type's method
728  OCI_PTYPE_TYPE_ARG = 15; // user-defined type method's argument
729  OCI_PTYPE_TYPE_RESULT = 16; // user-defined type method's result
730 
731  { Proc/Func param type }
732  OCI_TYPEPARAM_IN = 0;
733  OCI_TYPEPARAM_OUT = 1;
734  OCI_TYPEPARAM_INOUT = 2;
735 
736  { NLS environmet }
737  OCI_NLS_CHARSET_MAXBYTESZ = 91;
738 
739  { enum OCIPinOpt }
740  OCI_PIN_DEFAULT = 1; //* default pin option */
741  OCI_PIN_ANY = 3; //* pin any copy of the object */
742  OCI_PIN_RECENT = 4; //* pin recent copy of the object */
743  OCI_PIN_LATEST = 5; //* pin latest copy of the object */
744 
745  { enum OCILockOpt }
746  OCI_LOCK_NONE = 1; //* null (same as no lock) */
747  OCI_LOCK_X = 2; //* exclusive lock */
748  OCI_LOCK_X_NOWAIT = 3; //* exclusive lock, do not wait */
749 
750  { OBJECT FREE OPTION }
751  OCI_OBJECTFREE_FORCE =1;
752  OCI_OBJECTFREE_NONULL=2;
753 
754 type
755  PPointer = ^Pointer;
756 
757  TOCIInitialize = function(mode: ub4; ctxp: Pointer; malocfp: Pointer;
758  ralocfp: Pointer; mfreefp: Pointer): sword; cdecl;
759 
760  TOCIEnvInit = function(var envhpp: POCIEnv; mode: ub4; xtramemsz: size_T;
761  usrmempp: PPointer): sword; cdecl;
762 
763  TOCIEnvCreate = function(var envhpp: POCIEnv; mode: ub4; ctxp: Pointer;
764  malocfp: Pointer; ralocfp: Pointer; mfreefp: Pointer; xtramemsz: size_T;
765  usrmempp: PPointer): sword; cdecl;
766 
767  TOCIEnvNlsCreate = function(var envhpp: POCIEnv; mode: ub4; ctxp: Pointer;
768  malocfp: Pointer; ralocfp: Pointer; mfreefp: Pointer; xtramemsz: size_T;
769  usrmempp: PPointer; charset, ncharset: ub2): sword; cdecl;
770 
771  TOCIHandleAlloc = function(parenth: POCIHandle; var hndlpp: POCIHandle;
772  atype: ub4; xtramem_sz: size_T; usrmempp: PPointer): sword; cdecl;
773 
774  TOCIServerAttach = function(srvhp: POCIServer; errhp: POCIError; dblink: text;
775  dblink_len: sb4; mode: ub4): sword; cdecl;
776 
777  TOCIAttrSet = function(trgthndlp: POCIHandle; trghndltyp: ub4;
778  attributep: Pointer; size: ub4; attrtype: ub4; errhp: POCIError):sword; cdecl;
779 
780  TOCISessionBegin = function(svchp: POCISvcCtx; errhp: POCIError;
781  usrhp: POCISession; credt: ub4; mode: ub4):sword; cdecl;
782 
783  TOCISessionEnd = function(svchp: POCISvcCtx; errhp: POCIError;
784  usrhp: POCISession; mode: ub4): sword; cdecl;
785 
786  TOCIServerDetach = function(srvhp: POCIServer; errhp: POCIError;
787  mode: ub4): sword; cdecl;
788 
789  TOCIHandleFree = function(hndlp: Pointer; atype: ub4): sword; cdecl;
790 
791  TOCIErrorGet = function(hndlp: Pointer; recordno: ub4; sqlstate: text;
792  var errcodep: sb4; bufp: text; bufsiz: ub4; atype: ub4): sword; cdecl;
793 
794  TOCIStmtPrepare = function(stmtp: POCIStmt; errhp: POCIError; stmt: text;
795  stmt_len: ub4; language:ub4; mode: ub4):sword; cdecl;
796 
797  TOCIStmtExecute = function(svchp: POCISvcCtx; stmtp: POCIStmt;
798  errhp: POCIError; iters: ub4; rowoff: ub4; snap_in: POCISnapshot;
799  snap_out: POCISnapshot; mode: ub4): sword; cdecl;
800 
801  TOCIParamGet = function(hndlp: Pointer; htype: ub4; errhp: POCIError;
802  var parmdpp: Pointer; pos: ub4): sword; cdecl;
803 
804  TOCIAttrGet = function(trgthndlp: POCIHandle; trghndltyp: ub4;
805  attributep: Pointer; sizep: Pointer; attrtype: ub4;
806  errhp: POCIError):sword; cdecl;
807 
808  TOCIStmtFetch = function(stmtp: POCIStmt; errhp: POCIError; nrows: ub4;
809  orientation: ub2; mode: ub4): sword; cdecl;
810 
811  TOCIDefineByPos = function(stmtp: POCIStmt; var defnpp: POCIDefine;
812  errhp: POCIError; position: ub4; valuep: Pointer; value_sz: sb4; dty: ub2;
813  indp: Pointer; rlenp: Pointer; rcodep: Pointer; mode: ub4): sword; cdecl;
814 
815  TOCIDefineArrayOfStruct = function(defnpp: POCIDefine; errhp: POCIError;
816  pvskip: ub4; indskip: ub4; rlskip: ub4; rcskip: ub4): sword; cdecl;
817 
818  TOCIBindByPos = function(stmtp: POCIStmt; var bindpp: POCIBind;
819  errhp: POCIError; position: ub4; valuep: Pointer; value_sz: sb4; dty: ub2;
820  indp: Pointer; alenp: Pointer; rcodep: Pointer; maxarr_len: ub4;
821  curelep: Pointer; mode: ub4): sword; cdecl;
822 
823  TOCIBindByName = function(stmtp: POCIStmt; var bindpp: POCIBind;
824  errhp: POCIError; placeholder: text; placeh_len: sb4; valuep: Pointer;
825  value_sz: sb4; dty: ub2; indp: Pointer; alenp: Pointer; rcodep: Pointer;
826  maxarr_len: ub4; curelep: Pointer; mode: ub4): sword; cdecl;
827 
828  TOCIBindDynamic = function(bindp: POCIBind; errhp: POCIError; ictxp: Pointer;
829  icbfp: Pointer; octxp: Pointer; ocbfp: Pointer): sword; cdecl;
830 
831 (*---------------------------------OCIBindObject--------------------------------
832 
833  This function sets up additional attributes which are required for a named
834  data type (object) bind.
835  Syntax
836 ------------------------------------------------------------------------------*)
837  TOCIBindObject = function(bindp: POCIBind; errhp: POCIError;
838  const _type: POCIType; pgvpp: PPointer;
839  pvszsp: pub4; indpp: PPointer;
840  indszp: pub4): sword; cdecl;
841  (*Comments
842  This function sets up additional attributes which binding a named data type
843  or a REF. An error will be returned if this function is called when the OCI
844  environment has been initialized in non-object mode.
845  This call takes as a paramter a type descriptor object (TDO) of datatype
846  OCIType for the named data type being defined. The TDO can be retrieved
847  with a call to OCITypeByName().
848  If the OCI_DATA_AT_EXEC mode was specified in ocibindn() or ocibindp(), the
849  pointers to the IN buffers are obtained either using the callback icbfp
850  registered in the OCIBindDynamic() call or by the OCIStmtSetPieceInfo() call.
851  The buffers are dynamically allocated for the OUT data and the pointers to
852  these buffers are returned either by calling ocbfp() registered by the
853  OCIBindDynamic() or by setting the pointer to the buffer in the buffer passed
854  in by OCIStmtSetPieceInfo() called when OCIStmtExecute() returned
855  OCI_NEED_DATA. The memory of these client library- allocated buffers must be
856  freed when not in use anymore by using the OCIObjectFreee() call.
857  Parameters
858  bindp ( IN/OUT) - the bind handle returned by the call to OCIBindByName()
859  or OCIBindByPos().
860  errhp ( IN/OUT) - an error handle which can be passed to OCIErrorGet() for
861  diagnostic information in the event of an error.
862  type ( IN) - points to the TDO which describes the type of the program
863  variable being bound. Retrieved by calling OCITypeByName().
864  pgvpp ( IN/OUT) - points to a pointer to the program variable buffer. For an
865  array, pgvpp points to an array of pointers. When the bind variable is also an
866  OUT variable, the OUT Named Data Type value or REF is allocated
867  (unpickled) in the Object Cache, and a pointer to the value or REF is returned,
868  At the end of execute, when all OUT values have been received, pgvpp points
869  to an array of pointer(s) to these newly allocated named data types in the
870  object cache.
871  pgvpp is ignored if the OCI_DATA_AT_EXEC mode is set. Then the Named
872  Data Type buffers are requested at runtime. For static array binds, skip
873  factors may be specified using the OCIBindArrayOfStruct() call. The skip
874  factors are used to compute the address of the next pointer to the value, the
875  indicator structure and their sizes.
876  pvszsp ( IN/OUT) - points to the size of the program variable. The size of the
877  named data type is not required on input. For an array, pvszsp is an array of
878  ub4s. On return, for OUT bind variables, this points to size(s) of the Named
879  Data Types and REFs received. pvszsp is ignored if the OCI_DATA_AT_EXEC
880  mode is set. Then the size of the buffer is taken at runtime.
881  indpp ( IN/OUT) - points to a pointer to the program variable buffer
882  containing the parallel indicator structure. For an array, points to an array
883  of pointers. When the bind variable is also an OUT bind variable, memory is
884  allocated in the object cache, to store the unpickled OUT indicator values. At
885  the end of the execute when all OUT values have been received, indpp points
886  to the pointer(s) to these newly allocated indicator structure(s).
887  indpp is ignored if the OCI_DATA_AT_EXEC mode is set. Then the indicator
888  is requested at runtime.
889  indszp ( IN/OUT) - points to the size of the IN indicator structure program
890  variable. For an array, it is an array of sb2s. On return for OUT bind
891  variables, this points to size(s) of the received OUT indicator structures.
892  indszp is ignored if the OCI_DATA_AT_EXEC mode is set. Then the indicator
893  size is requested at runtime.
894  Related Functions
895  OCIAttrGet() *)
896 
897  TOCIDefineObject = function(defnpp:POCIDefine; errhp:POCIError;
898  _type:POCIHandle; pgvpp:pointer; pvszsp:Pub4;
899  indpp:pointer; indszp:Pub4):sword;cdecl;
900 
901  TOCITransStart = function(svchp: POCISvcCtx; errhp: POCIError; timeout: word;
902  flags: ub4): sword; cdecl;
903 
904  TOCITransRollback = function(svchp:POCISvcCtx; errhp:POCIError;
905  flags: ub4): sword; cdecl;
906 
907  TOCITransCommit = function(svchp: POCISvcCtx; errhp: POCIError;
908  flags: ub4) :sword; cdecl;
909 
910  TOCITransDetach = function(svchp: POCISvcCtx; errhp: POCIError;
911  flags: ub4) :sword; cdecl;
912 
913  TOCITransPrepare = function(svchp: POCISvcCtx; errhp: POCIError;
914  flags: ub4) :sword; cdecl;
915 
916  TOCITransForget = function(svchp: POCISvcCtx; errhp: POCIError;
917  flags: ub4) :sword; cdecl;
918 
919  TOCIDescribeAny = function(svchp: POCISvcCtx; errhp: POCIError;
920  objptr: Pointer; objnm_len: ub4; objptr_typ: ub1; info_level: ub1;
921  objtyp: ub1; dschp: POCIDescribe): sword; cdecl;
922 
923  TOCIBreak = function(svchp: POCISvcCtx; errhp:POCIError): sword; cdecl;
924 
925  TOCIReset = function(svchp: POCISvcCtx; errhp:POCIError): sword; cdecl;
926 
927  TOCIDescriptorAlloc = function(parenth: POCIEnv; var descpp: POCIDescriptor;
928  htype: ub4; xtramem_sz: integer; usrmempp: Pointer): sword; cdecl;
929 
930  TOCIDescriptorFree = function(descp: Pointer; htype: ub4): sword; cdecl;
931 
932  TOCIDateTimeAssign = function(hndl: POCIEnv; err: POCIError;
933  const from: POCIDateTime;_to: POCIDateTime): sword; cdecl;
934 
935  TOCIDateTimeCheck = function(hndl: POCIEnv; err: POCIError;
936  const date: POCIDateTime; var valid: ub4): sword; cdecl;
937 
938  TOCIDateTimeCompare = function(hndl: POCIEnv; err: POCIError;
939  const date1: POCIDateTime; const date2: POCIDateTime;
940  var result: sword): sword; cdecl;
941 
942  TOCIDateTimeConvert = function(hndl: POCIEnv; err: POCIError;
943  indate: POCIDateTime; outdate: POCIDateTime): sword; cdecl;
944 
945  TOCIDateTimeFromText= function(hndl: POCIEnv; err: POCIError;
946  const date_str: text; d_str_length: size_t; const fmt: text;
947  fmt_length: ub1; const lang_name: text; lang_length: size_t;
948  date: POCIDateTime): sword; cdecl;
949 
950  TOCIDateTimeGetDate = function(hndl: POCIEnv; err: POCIError;
951  const date: POCIDateTime; var year: sb2; var month: ub1;
952  var day: ub1): sword; cdecl;
953 
954  TOCIDateTimeGetTime = function(hndl: POCIEnv; err: POCIError;
955  datetime: POCIDateTime; var hour: ub1; var minute: ub1; var sec: ub1;
956  var fsec: ub4): sword; cdecl;
957 
958  TOCIDateTimeGetTimeZoneOffset = function(hndl: POCIEnv; err: POCIError;
959  const datetime: POCIDateTime; var hour: sb1; var minute: sb1): sword; cdecl;
960 
961  TOCIDateTimeSysTimeStamp = function(hndl: POCIEnv; err: POCIError;
962  sys_date: POCIDateTime): sword; cdecl;
963 
964  TOCIDateTimeConstruct = function(hndl: POCIEnv; err: POCIError;
965  datetime: POCIDateTime; year: sb2; month: ub1; day: ub1; hour: ub1;
966  min: ub1; sec: ub1; fsec: ub4; timezone: text;
967  timezone_length: size_t): sword; cdecl;
968 
969  TOCIDateTimeToText = function(hndl: POCIEnv; err: POCIError;
970  const date: POCIDateTime; const fmt: text; fmt_length: ub1;
971  fsprec: ub1; const lang_name: text; lang_length: size_t;
972  var buf_size: ub4; buf: text): sword; cdecl;
973 
974  TOCIDateTimeGetTimeZoneName = function(hndl: POCIEnv; err: POCIError;
975  datetime: POCIDateTime; var buf: ub1; var buflen: ub4): sword; cdecl;
976 
977  TOCILobAppend = function(svchp: POCISvcCtx; errhp: POCIError; dst_locp,
978  src_locp: POCILobLocator): sword; cdecl;
979 
980  TOCILobAssign = function(svchp: POCISvcCtx; errhp: POCIError;
981  src_locp: POCILobLocator; var dst_locpp: POCILobLocator): sword; cdecl;
982 
983  TOCILobClose = function(svchp: POCISvcCtx; errhp: POCIError;
984  locp: POCILobLocator): sword; cdecl;
985 
986  TOCILobCopy = function(svchp: POCISvcCtx; errhp: POCIError;
987  dst_locp: POCILobLocator; src_locp: POCILobLocator; amount: ub4;
988  dst_offset: ub4; src_offset: ub4): sword; cdecl;
989 
990  TOCILobCreateTemporary = function(svchp: POCISvcCtx; errhp: POCIError;
991  locp: POCILobLocator; csid: ub2; csfrm: ub1; lobtype: ub1;
992  cache: LongBool; duration: OCIDuration): sword; cdecl;
993 
994  TOCILobEnableBuffering = function(svchp: POCISvcCtx; errhp: POCIError;
995  locp: POCILobLocator): sword; cdecl;
996 
997  TOCILobDisableBuffering = function(svchp: POCISvcCtx; errhp: POCIError;
998  locp: POCILobLocator): sword; cdecl;
999 
1000  TOCILobErase = function(svchp: POCISvcCtx; errhp: POCIError; locp: POCILobLocator;
1001  var amount: ub4; offset: ub4): sword; cdecl;
1002 
1003  TOCILobFileExists = function(svchp: POCISvcCtx; errhp: POCIError;
1004  filep: POCILobLocator; var flag: Boolean): sword; cdecl;
1005 
1006  TOCILobFileGetName = function(envhp: POCIEnv; errhp: POCIError;
1007  filep: POCILobLocator; dir_alias: text; var d_length: ub2; filename: text;
1008  var f_length: ub2): sword; cdecl;
1009 
1010  TOCILobFileSetName = function(envhp: POCIEnv; errhp: POCIError;
1011  var filep: POCILobLocator; dir_alias: text; d_length: ub2; filename: text;
1012  f_length: ub2): sword; cdecl;
1013 
1014  TOCILobFlushBuffer = function(svchp: POCISvcCtx; errhp: POCIError;
1015  locp: POCILobLocator; flag: ub4): sword; cdecl;
1016 
1017  TOCILobFreeTemporary = function(svchp: POCISvcCtx; errhp: POCIError;
1018  locp: POCILobLocator): sword; cdecl;
1019 
1020  TOCILobCharSetForm = function ( envhp: POCIEnv; errhp: POCIError;
1021  const locp: POCILobLocator; csfrm: pub1): sword; cdecl;
1022 
1023  TOCILobCharSetId = function( envhp: POCIEnv; errhp: POCIError;
1024  const locp: POCILobLocator; csid: pub2): sword; cdecl;
1025 
1026  TOCILobGetLength = function(svchp: POCISvcCtx; errhp: POCIError;
1027  locp: POCILobLocator; var lenp: ub4): sword; cdecl;
1028 
1029  TOCILobIsOpen = function(svchp: POCISvcCtx; errhp: POCIError;
1030  locp: POCILobLocator; var flag: LongBool): sword; cdecl;
1031 
1032  TOCILobIsTemporary = function(svchp: POCISvcCtx; errhp: POCIError;
1033  locp: POCILobLocator; var is_temporary: LongBool): sword; cdecl;
1034 
1035  TOCILobLoadFromFile = function(svchp: POCISvcCtx; errhp: POCIError;
1036  dst_locp: POCILobLocator; src_locp: POCILobLocator; amount: ub4;
1037  dst_offset: ub4; src_offset: ub4): sword; cdecl;
1038 
1039  TOCILobLocatorIsInit = function(envhp: POCIEnv; errhp: POCIError;
1040  locp: POCILobLocator; var is_initialized: LongBool): sword; cdecl;
1041 
1042  TOCILobOpen = function(svchp: POCISvcCtx; errhp: POCIError;
1043  locp: POCILobLocator; mode: ub1): sword; cdecl;
1044 
1045  TOCILobRead = function(svchp: POCISvcCtx; errhp: POCIError;
1046  locp: POCILobLocator; var amtp: ub4; offset: ub4; bufp: Pointer; bufl: ub4;
1047  ctxp: Pointer; cbfp: Pointer; csid: ub2; csfrm: ub1): sword; cdecl;
1048 
1049  TOCILobTrim = function(svchp: POCISvcCtx; errhp: POCIError;
1050  locp: POCILobLocator; newlen: ub4): sword; cdecl;
1051 
1052  TOCILobWrite = function(svchp: POCISvcCtx; errhp: POCIError;
1053  locp: POCILobLocator; var amtp: ub4; offset: ub4; bufp: Pointer; bufl: ub4;
1054  piece: ub1; ctxp: Pointer; cbfp: Pointer; csid: ub2; csfrm: ub1): sword; cdecl;
1055 
1056  TOCIStmtGetPieceInfo = function(stmtp: POCIStmt; errhp: POCIError;
1057  var hndlpp: Pointer; var typep: ub4; var in_outp: ub1; var iterp: ub4;
1058  var idxp: ub4; var piecep: ub1): sword; cdecl;
1059 
1060  TOCIStmtSetPieceInfo = function(handle: Pointer; typep: ub4; errhp: POCIError;
1061  buf: Pointer; var alenp: ub4; piece: ub1; indp: Pointer;
1062  var rcodep: ub2): sword; cdecl;
1063 
1064  TOCIPasswordChange = function(svchp: POCISvcCtx; errhp: POCIError;
1065  user_name: text; usernm_len: ub4; opasswd: text; opasswd_len: ub4;
1066  npasswd: text; npasswd_len: sb4; mode: ub4): sword; cdecl;
1067 
1068  TOCIServerVersion = function(hndlp: POCIHandle; errhp: POCIError; bufp: text;
1069  bufsz: ub4; hndltype: ub1): sword; cdecl;
1070 
1071  TOCIServerRelease = function(hndlp: POCIHandle; errhp: POCIError; bufp: text;
1072  bufsz: ub4; hndltype: ub1; version:pointer): sword; cdecl;
1073 
1074  TOCIResultSetToStmt = function(rsetdp: POCIHandle; errhp: POCIError): sword; cdecl;
1075 
1076  TOCINlsNumericInfoGet = function(envhp: POCIEnv; errhp: POCIError; val: psb4; item: ub2): sword; cdecl;
1077 
1078  TOCIClientVersion = procedure(major_version, minor_version, update_num,
1079  patch_num, port_update_num: psword); cdecl;
1080 
1081 (*****************************************************************************
1082  * NUMBER/FLOAT/DECIMAL TYPE *
1083  *****************************************************************************)
1084 const
1085  OCI_NUMBER_SIZE = 22;
1086 
1087 type
1088  POCINumberPart = ^TOCINumberPart;
1089  TOCINumberPart = array[1..OCI_NUMBER_SIZE] of ub1;
1090 
1091 (*
1092  * OCINumber - OCI Number mapping in c
1093  *
1094  * The OTS types: NUMBER, NUMERIC, INT, SHORTINT, REAL, DOUBLE PRECISION,
1095  * FLOAT and DECIMAL are represented by OCINumber.
1096  * The contents of OCINumber is opaque to clients.
1097  *
1098  * For binding variables of type OCINumber in OCI calls (OCIBindByName(),
1099  * OCIBindByPos(), and OCIDefineByPos()) use the type code SQLT_VNU.
1100  *
1101 
1102  *
1103  EXAMPLE
1104 
1105  The following example shows how to manipulate an attribute of type
1106  oracle number.
1107 
1108  struct person
1109  {
1110  OCINumber sal;
1111  };
1112  typedef struct person person;
1113 
1114  OCIError *err;
1115  person* joe;
1116  person* tom;
1117  person* debbie;
1118  OCINumber *joesal;
1119  OCINumber *tomsal;
1120  OCINumber *debsal;
1121  sword status;
1122  int inum;
1123  double dnum;
1124  OCINumber ornum;
1125  char buffer[21];
1126  ub4 buflen;
1127  sword result;
1128 
1129  /o See oci.h for an example of how to initialize OCIError.
1130  o For this example, assume the OCIEnv and OCIError has been
1131  o initialized.
1132  o/
1133 
1134  /o Pin joe, tom and debbie person objects in the object cache. See ori.h
1135  o for an example on pinning objects. For this example, assume that
1136  o joe, tom and debbie are pointing to pinned objects.
1137  o/
1138  joesal = &joe->sal;
1139  tomsal = &tom->sal;
1140  debsal = &debbie->sal;
1141 
1142  /o initialize joe's salary to be $12,000 o/
1143  inum = 12000;
1144  status = OCINumberFromInt(err, &inum, sizeof(inum), OCI_NUMBER_SIGNED,
1145  joesal);
1146  if (status != OCI_SUCCESS)
1147  /o goto to handle error from OCINumberFromInt o/;
1148 
1149  /o initialize tom's salary to be same as joe o/
1150  OCINumberAssign(err, joesal, tomsal);
1151 
1152  /o initialize debbie's salary to be 20% more than joe's o/
1153  dnum = 1.2;
1154  status = OCINumberFromReal(err, &dnum, sizeof(double), &ornum);
1155  if (status != OCI_SUCCESS)
1156  /o goto to handle error from OCINumberFromReal o/;
1157  status = OCINumberMul(err, joesal, &ornum, debsal);
1158  if (status != OCI_SUCCESS) /o goto to handle error from OCINumberMul o/;
1159 
1160  /o give tom a 50% raise o/
1161  dnum = 1.5;
1162  status = OCINumberFromReal(err, &dnum, sizeof(double), &ornum);
1163  if (status != OCI_SUCCESS)
1164  /o goto to handle error from OCINumberFromReal o/;
1165  status = OCINumberMul(err, tomsal, &ornum, tomsal);
1166  if (status != OCI_SUCCESS) /o goto to handle error from OCINumberMul o/;
1167 
1168  /o double joe's salary o/
1169  status = OCINumberAdd(err, joesal, joesal, joesal);
1170  if (status != OCI_SUCCESS) /o goto to handle error from OCINumberAdd o/;
1171 
1172  /o get joe's salary in integer o/
1173  status = OCINumberToInt(err, joesal, sizeof(inum), OCI_NUMBER_SIGNED,
1174  &inum);
1175  if (status != OCI_SUCCESS)/o goto to handle error from OCINumberToInt o/;
1176  /o inum is set to 24000 o/
1177 
1178  /o get debbie's salary in double o/
1179  status = OCINumberToReal(err, debsal, sizeof(dnum), &dnum);
1180  if (status != OCI_SUCCESS)/o goto to handle error from OCINumberToReal o/;
1181  /o dnum is set to 14400 o/
1182 
1183  /o print tom's salary as DEM0001`8000.00 o/
1184  buflen = sizeof(buffer);
1185  status = OCINumberToText(err, tomsal, "C0999G9999D99", 13,
1186  "NLS_NUMERIC_CHARACTERS='.`' NLS_ISO_CURRENCY='Germany'", 54,
1187  &buflen, buffer);
1188  if (status != OCI_SUCCESS)/o goto to handle error from OCINumberToText o/;
1189  printf("tom's salary = %s\n", buffer);
1190 
1191  /o compare joe and tom's salary o/
1192  status = OCINumberCmp(err, joesal, tomsal, &result);
1193  if (status != OCI_SUCCESS) /o goto to handle error from OCINumberCmp o/;
1194  /o result is positive o/
1195 
1196  /o read debbie's new salary from string o/
1197  status = OCINumberFromText(err, "48`000.00", 9, "99G999D99", 9,
1198  "NLS_NUMERIC_CHARACTERS='.`'", 27, debsal);
1199  if (status != OCI_SUCCESS)
1200  /o goto to handle error from OCINumberFromText o/;
1201  /o debbie's salary is now 48000.00 o/
1202 
1203 *)
1204 
1205 (*----------------------------- OCINumberInc --------------------------------*)
1206 
1207  TOCINumberInc = function(err: POCIError; number: POCINumber): sword; cdecl;
1208 (*
1209  NAME: OCINumberInc - OCINumber INCrement numbers
1210  PARAMETERS:
1211  err (IN/OUT) - error handle. If there is an error, it is
1212  recorded in 'err' and this function returns OCI_ERROR.
1213  The error recorded in 'err' can be retrieved by calling
1214  OCIErrorGet().
1215  number (IN/OUT) a positive Oracle number to be incremented
1216  DESCRIPTION:
1217  Increment Oracle number in place. It is assumed that the input is
1218  an integer between 0 and 100^21-2. If the is input too large, it will
1219  be treated as 0 - the result will be an Oracle number 1. If the input
1220  is not a positive integer, the result will be unpredictable.
1221  RETURNS:
1222  OCI_SUCCESS if the function completes successfully.
1223  OCI_INVALID_HANDLE if 'err' is NULL.
1224  OCI_ERROR if
1225  any of the number arguments is null
1226  *)
1227 
1228 (*----------------------------- OCINumberDec --------------------------------*)
1229 
1230  TOCINumberDec = function(err: POCIError; number: POCINumber): sword; cdecl;
1231 (*
1232  NAME: OCINumberDec - OCINumber DECrement numbers
1233  PARAMETERS:
1234  err (IN/OUT) - error handle. If there is an error, it is
1235  recorded in 'err' and this function returns OCI_ERROR.
1236  The error recorded in 'err' can be retrieved by calling
1237  OCIErrorGet().
1238  number (IN/OUT) - a positive Oracle number to be decremented
1239  DESCRIPTION:
1240  Decrement Oracle number in place. It is assumed that the input is an
1241  integer between 1 and 100^21-2. If the input is too large, it will be
1242  treated as 1 - the result will be an Oracle number 0. If the input is
1243  not a positive integer, the result will be unpredictable.
1244  RETURNS:
1245  OCI_SUCCESS if the function completes successfully.
1246  OCI_INVALID_HANDLE if 'err' is NULL.
1247  OCI_ERROR if
1248  any of the number arguments is null
1249  *)
1250 
1251 (*-------------------------- OCINumberSetZero -------------------------------*)
1252 
1253  TOCINumberSetZero = procedure(err: POCIError; number: POCINumber); cdecl;
1254 (*
1255  NAME: OCINumberSetZero - OCINumber Set number to Zero value
1256  PARAMETERS:
1257  err (IN/OUT) - pointer to OCI error handle
1258  num (OUT) - set to zero value
1259  DESCRIPTION:
1260  Initialize the given number to value 0.
1261  *)
1262 
1263 (*--------------------------- OCINumberSetPi --------------------------------*)
1264 
1265  TOCINumberSetPi = procedure(err: POCIError; number: POCINumber); cdecl;
1266 (*
1267  NAME: OCINumberSetPi - OCINumber Set number to Pi
1268  err (IN/OUT) - pointer to OCI error handle
1269  num (OUT) - set to zero value
1270  DESCRIPTION:
1271  Initialize the given number to value Pi.
1272  *)
1273 
1274 (*----------------------------- OCINumberAdd --------------------------------*)
1275 
1276  TOCINumberAdd = function(err: POCIError; const number1: POCINumber;
1277  const number2: POCINumber; _result: POCINumber): sword; cdecl;
1278 (*
1279  NAME: OCINumberAdd - OCINumber ADD numbers
1280  PARAMETERS:
1281  err (IN/OUT) - error handle. If there is an error, it is
1282  recorded in 'err' and this function returns OCI_ERROR.
1283  The error recorded in 'err' can be retrieved by calling
1284  OCIErrorGet().
1285  number1, number2 (IN) - numbers to be added
1286  result (OUT) - result of adding 'number1' with 'number2'
1287  DESCRIPTION:
1288  Add 'number1' with 'number2' and return result in 'result'.
1289  RETURNS:
1290  OCI_SUCCESS if the function completes successfully.
1291  OCI_INVALID_HANDLE if 'err' is NULL.
1292  OCI_ERROR if
1293  any of the number arguments is null
1294  *)
1295 
1296 (*----------------------------- OCINumberSub --------------------------------*)
1297 
1298  TOCINumberSub = function(err: POCIError; const number1: POCINumber;
1299  const number2: POCINumber; _result: POCINumber): sword; cdecl;
1300 (*
1301  NAME: OCINumberSub - OCINumber SUBtract numbers
1302  PARAMETERS:
1303  err (IN/OUT) - error handle. If there is an error, it is
1304  recorded in 'err' and this function returns OCI_ERROR.
1305  The error recorded in 'err' can be retrieved by calling
1306  OCIErrorGet().
1307  number1, number2 (IN) - 'number2' subtracted from 'number1'
1308  result (OUT) - subtraction result
1309  DESCRIPTION:
1310  Subtract 'number2' from 'number1' and return result in 'result'.
1311  RETURNS:
1312  OCI_SUCCESS if the function completes successfully.
1313  OCI_INVALID_HANDLE if 'err' is NULL.
1314  OCI_ERROR if
1315  any of the number arguments is null
1316  *)
1317 
1318 (*----------------------------- OCINumberMul --------------------------------*)
1319 
1320  TOCINumberMul = function(err: POCIError; const number1: POCINumber;
1321  const number2: POCINumber; _result: POCINumber): sword; cdecl;
1322 (*
1323  NAME: OCINumberMul - OCINumber MULtiply numbers
1324  PARAMETERS:
1325  err (IN/OUT) - error handle. If there is an error, it is
1326  recorded in 'err' and this function returns OCI_ERROR.
1327  The error recorded in 'err' can be retrieved by calling
1328  OCIErrorGet().
1329  number1, number2 (IN) - numbers to be multiplied
1330  result (OUT) - multiplication result
1331  DESCRIPTION:
1332  Multiply 'number1' with 'number2' and return result in 'result'.
1333  RETURNS:
1334  OCI_SUCCESS if the function completes successfully.
1335  OCI_INVALID_HANDLE if 'err' is NULL.
1336  OCI_ERROR if
1337  any of the number arguments is null
1338  *)
1339 
1340 (*----------------------------- OCINumberDiv --------------------------------*)
1341 
1342  TOCINumberDiv = function(err: POCIError; const number1: POCINumber;
1343  const number2: POCINumber; _result: POCINumber): sword; cdecl;
1344 (*
1345  NAME: OCINumberDiv - OCINumber DIVide numbers
1346  PARAMETERS:
1347  err (IN/OUT) - error handle. If there is an error, it is
1348  recorded in 'err' and this function returns OCI_ERROR.
1349  The error recorded in 'err' can be retrieved by calling
1350  OCIErrorGet().
1351  number1 (IN) - pointer to the numerator
1352  number2 (IN) - pointer to the denominator
1353  result (OUT) - division result
1354  DESCRIPTION:
1355  Divide 'number1' by 'number2' and return result in 'result'.
1356  RETURNS:
1357  OCI_SUCCESS if the function completes successfully.
1358  OCI_INVALID_HANDLE if 'err' is NULL.
1359  OCI_ERROR if
1360  any of the number arguments is null
1361  underflow errorr
1362  overflow errorr
1363  divide by zero errorr
1364  *)
1365 
1366 (*----------------------------- OCINumberMod --------------------------------*)
1367 
1368  TOCINumberMod = function(err: POCIError; const number1: POCINumber;
1369  const number2: POCINumber; _result: POCINumber): sword; cdecl;
1370 (*
1371  NAME: OCINumberMod - OCINumber MODulous
1372  PARAMETERS:
1373  err (IN/OUT) - error handle. If there is an error, it is
1374  recorded in 'err' and this function returns OCI_ERROR.
1375  The error recorded in 'err' can be retrieved by calling
1376  OCIErrorGet().
1377  number1 (IN) - pointer to the numerator
1378  number2 (IN) - pointer to the denominator
1379  result (OUT) - remainder of the result
1380  DESCRIPTION:
1381  Finds the remainder of the division of two Oracle numbers.
1382  RETURNS:
1383  OCI_SUCCESS if the function completes successfully.
1384  OCI_INVALID_HANDLE if 'err' is NULL.
1385  OCI_ERROR if
1386  any of the number arguments is null
1387  divide by zero errorr
1388  *)
1389 
1390 (*------------------------ OCINumberIntPower --------------------------------*)
1391 
1392  TOCINumberIntPower = function(err: POCIError; const number1: POCINumber;
1393  const number2: POCINumber; _result: POCINumber): sword; cdecl;
1394 (*
1395  NAME: OCINumberIntPower - OCINumber takes an arbitary base to an arbitary
1396  integer PoWeR
1397  PARAMETERS:
1398  err (IN/OUT) - error handle. If there is an error, it is
1399  recorded in 'err' and this function returns OCI_ERROR.
1400  The error recorded in 'err' can be retrieved by calling
1401  OCIErrorGet().
1402  base (IN) - base of the exponentiation
1403  exp (IN) - exponent to which the base is to be raised
1404  result (OUT) - output of exponentiation
1405  DESCRIPTION:
1406  Takes an arbitary base to an arbitary integer power.
1407  RETURNS:
1408  OCI_SUCCESS if the function completes successfully.
1409  OCI_INVALID_HANDLE if 'err' is NULL.
1410  OCI_ERROR if
1411  any of the number arguments is null
1412  *)
1413 
1414 (*-------------------------- OCINumberShift ---------------------------------*)
1415 
1416  TOCINumberShift = function(err: POCIError; const number: POCINumber;
1417  const nDig: sword; _result: POCINumber): sword; cdecl;
1418 (*
1419  NAME: OCINumberShift - OCINumber multiplies by a power of 10.
1420 
1421  PARAMETERS:
1422  err (IN/OUT) - error handle. If there is an error, it is
1423  recorded in 'err' and this function returns OCI_ERROR.
1424  The error recorded in 'err' can be retrieved by calling
1425  OCIErrorGet().
1426  number (IN) - Oracle Number to be shifted.
1427  nDig (IN) - number of decimal places to shift.
1428  result (OUT) - shift result.
1429  DESCRIPTION:
1430  Multiplies number by 10^NDig and sets product to the result.
1431  RETURNS:
1432  OCI_SUCCESS if the function completes successfully.
1433  OCI_INVALID_HANDLE if 'err' is NULL.
1434  OCI_ERROR if
1435  any of the number arguments is null
1436  *)
1437 
1438 (*----------------------------- OCINumberNeg --------------------------------*)
1439 
1440  TOCINumberNeg = function(err: POCIError; const number: POCINumber;
1441  _result: POCINumber): sword; cdecl;
1442 (*
1443  NAME: OCINumberNeg - OCINumber NEGate number
1444  PARAMETERS:
1445  err (IN/OUT) - error handle. If there is an error, it is
1446  recorded in 'err' and this function returns OCI_ERROR.
1447  The error recorded in 'err' can be retrieved by calling
1448  OCIErrorGet().
1449  number (IN) - number to be negated
1450  result (OUT) - will contain negated value of 'number'
1451  DESCRIPTION:
1452  Negates an Oracle number.
1453  RETURNS:
1454  OCI_SUCCESS if the function completes successfully.
1455  OCI_INVALID_HANDLE if 'err' is NULL.
1456  OCI_ERROR if
1457  any of the number arguments is null
1458  *)
1459 
1460 (*------------------------- OCINumberToText ---------------------------------*)
1461  Poratext = PAnsiChar;
1462  PPoratext = PPAnsiChar;
1463 
1464  TOCINumberToText = function(err: POCIError; const number: POCINumber;
1465  const fmt: Poratext; fmt_length: ub4;
1466  const nls_params: Poratext; nls_p_length: ub4;
1467  buf_size: pub4; buf: poratext): sword; cdecl;
1468 (*
1469  NAME: OCINumberToText - OCINumber convert number TO String
1470  PARAMETERS:
1471  err (IN/OUT) - error handle. If there is an error, it is
1472  recorded in 'err' and this function returns OCI_ERROR.
1473  The error recorded in 'err' can be retrieved by calling
1474  OCIErrorGet().
1475  number (IN) - Oracle number to be converted
1476  fmt (IN) - conversion format
1477  fmt_length (IN) - length of the 'fmt' parameter
1478  nls_params (IN) - nls format specification, if null string
1479  i.e. (oratext * )0, then the default parameters for the
1480  session is used
1481  nls_p_length (IN) - length of the 'nls_params' parameter
1482  buf_size (IN/OUT) - size of the buffer must be passed as input by
1483  the caller, this function will return the length of the
1484  resulting string in bytes via this parameter. The length
1485  does not include the terminating null ('\0').
1486  buf (OUT) - buffer into which the converted string is placed. The
1487  resulting string is null terminated.
1488  DESCRIPTION:
1489  Converts the given number to a character string
1490  according to the specified format. Refer to "TO_NUMBER" conversion
1491  function described in "Oracle SQL Language Reference Manual" for a
1492  description of format and NLS parameters.
1493  The converted number string is stored in the buffer 'buf', up to
1494  a max of '*buf_size' bytes. Length of the resulting string is
1495  returned via 'buf_size'.
1496  RETURNS:
1497  OCI_SUCCESS if the function completes successfully.
1498  OCI_INVALID_HANDLE if 'err' is NULL.
1499  OCI_ERROR if
1500  'number' or 'buf' is null
1501  buffer too small
1502  invalid format
1503  invalid nls format
1504  number to text translation for the given format causes overflow
1505  *)
1506 
1507 (*-------------------------- OCINumberFromText ------------------------------*)
1508 
1509  TOCINumberFromText = function(err: POCIError; const str: poratext;
1510  str_length: ub4; const fmt: poratext; fmt_length: ub4;
1511  const nls_params: poratext; nls_p_length: ub4;
1512  number: POCINumber): sword; cdecl;
1513 (*
1514  NAME: OCINumberFromText - OCINumber convert String TO Number
1515  PARAMETERS:
1516  err (IN/OUT) - error handle. If there is an error, it is
1517  recorded in 'err' and this function returns OCI_ERROR.
1518  The error recorded in 'err' can be retrieved by calling
1519  OCIErrorGet().
1520  str (IN) - input string to be converted to Oracle number
1521  str_length (IN) - size of the input string
1522  fmt (IN) - conversion format
1523  fmt_length (IN) - length of the 'fmt' parameter
1524  nls_params (IN) - nls format specification, if null string
1525  i.e. (oratext * )0, then the default parameters for the
1526  session is used
1527  nls_p_length (IN) - length of the 'nls_params' parameter
1528  number (OUT) - given string converted to number
1529  DESCRIPTION:
1530  Converts the given string to a number
1531  according to the specified format. Refer to "TO_NUMBER" conversion
1532  function described in "Oracle SQL Language Reference Manual" for a
1533  description of format and NLS parameters.
1534  RETURNS:
1535  OCI_SUCCESS if the function completes successfully.
1536  OCI_INVALID_HANDLE if 'err' is NULL.
1537  OCI_ERROR if
1538  'number' or 'str' is null
1539  'str_length' is 0
1540  invalid format
1541  invalid nls format
1542  invalid input string
1543  *)
1544 
1545 (*-------------------------- OCINumberToInt ---------------------------------*)
1546 
1547 const
1548  OCI_NUMBER_UNSIGNED = 0; // Unsigned type -- ubX
1549  OCI_NUMBER_SIGNED = 2; // Signed type -- sbX
1550 
1551 type
1552  TOCINumberToInt = function(err: POCIError; const number: POCINumber;
1553  rsl_length: uword; rsl_flag: uword; rsl: Pointer): sword; cdecl;
1554 (*
1555  NAME: OCINumberToInt - OCINumber convert number TO Integer
1556  PARAMETERS:
1557  err (IN/OUT) - error handle. If there is an error, it is
1558  recorded in 'err' and this function returns OCI_ERROR.
1559  The error recorded in 'err' can be retrieved by calling
1560  OCIErrorGet().
1561  number (IN) - number to be converted
1562  rsl_length (IN) - size of the desired result
1563  rsl_s_flag (IN) - flag denoting the desired sign of the output; valid
1564  values are OCI_NUMBER_UNSIGNED, OCI_NUMBER_SIGNED
1565  rsl (OUT) - pointer to space for the result
1566  DESCRIPTION:
1567  Native type conversion function.
1568  Converts the given Oracle number into an xbx (e.g. ub2, ub4, sb2 etc.)
1569  RETURNS:
1570  OCI_SUCCESS if the function completes successfully.
1571  OCI_INVALID_HANDLE if 'err' is NULL.
1572  OCI_ERROR if
1573  'number' or 'rsl' is null
1574  integer value of 'number' is too big -- overflow
1575  integer value of 'number' is too small -- underflow
1576  invalid sign flag value ('rsl_s_flag')
1577  *)
1578 
1579 (*--------------------------- OCINumberFromInt ------------------------------*)
1580 
1581  TOCINumberFromInt = function(err: POCIError; const inum: Pointer;
1582  inum_length: uword; inum_s_flag: uword; number: POCINumber): sword; cdecl;
1583 (*
1584  NAME: OCINumberFromInt - OCINumber convert Integer TO Number
1585  PARAMETERS:
1586  err (IN/OUT) - error handle. If there is an error, it is
1587  recorded in 'err' and this function returns OCI_ERROR.
1588  The error recorded in 'err' can be retrieved by calling
1589  OCIErrorGet().
1590  inum (IN) - pointer to the integer to be converted
1591  inum_length (IN) - size of the integer
1592  inum_s_flag (IN) - flag that designates the sign of the integer; valid
1593  values are OCI_NUMBER_UNSIGNED, OCI_NUMBER_SIGNED
1594  number (OUT) - given integer converted to Oracle number
1595  DESCRIPTION:
1596  Native type conversion function. Converts any Oracle standard
1597  machine-native integer type (xbx) to an Oracle number.
1598  RETURNS:
1599  OCI_SUCCESS if the function completes successfully.
1600  OCI_INVALID_HANDLE if 'err' is NULL.
1601  OCI_ERROR if
1602  'number' or 'inum' is null
1603  integer too BIG -- the number is too large to fit into an Oracle
1604  number
1605  invalid sign flag value ('inum_s_flag')
1606  *)
1607 
1608 (*------------------------- OCINumberToReal ---------------------------------*)
1609 
1610  TOCINumberToReal = function(err: POCIError; const number: POCINumber;
1611  rsl_length: uword; rsl: Pointer): sword; cdecl;
1612 (*
1613  NAME: OCINumberToReal - OCINumber convert number TO Real
1614  PARAMETERS:
1615  err (IN/OUT) - error handle. If there is an error, it is
1616  recorded in 'err' and this function returns OCI_ERROR.
1617  The error recorded in 'err' can be retrieved by calling
1618  OCIErrorGet().
1619  number (IN) - number to be converted
1620  rsl_length (IN) - is the size of the desired result,
1621  sizeof( float | double | long double)
1622  rsl (OUT) - pointer to space for storing the result
1623  DESCRIPTION:
1624  Native type conversion function. Converts an Oracle number into a
1625  machine-native real type. This function only converts numbers up to
1626  LDBL_DIG, DBL_DIG, or FLT_DIG digits of precision and removes
1627  trailing zeroes. The above constants are defined in float.h
1628  RETURNS:
1629  OCI_SUCCESS if the function completes successfully.
1630  OCI_INVALID_HANDLE if 'err' is NULL.
1631  OCI_ERROR if
1632  'number' or 'rsl' is null
1633  'rsl_length' is 0
1634  *)
1635 
1636 (*------------------------- OCINumberToRealArray ----------------------------*)
1637 
1638  TOCINumberToRealArray = function(err: POCIError; const number: PPOCINumber;
1639  elems: uword; rsl_length: uword; rsl: Pointer): sword; cdecl;
1640 (*
1641  NAME: OCINumberToRealArray - OCINumber convert array of numbers TO Real
1642  PARAMETERS:
1643  err (IN/OUT) - error handle. If there is an error, it is
1644  recorded in 'err' and this function returns OCI_ERROR.
1645  The error recorded in 'err' can be retrieved by calling
1646  OCIErrorGet().
1647  number (IN) - Pointer to array of number to be converted
1648  elems (IN) - Upper bound of number array
1649  rsl_length (IN) - is the size of the desired result,
1650  sizeof( float | double | long double)
1651  rsl (OUT) - pointer to array of space for storing the result
1652  DESCRIPTION:
1653  Native type conversion function. Converts an Oracle number into a
1654  machine-native real type. This function only converts numbers up to
1655  LDBL_DIG, DBL_DIG, or FLT_DIG digits of precision and removes
1656  trailing zeroes. The above constants are defined in float.h
1657  RETURNS:
1658  OCI_SUCCESS if the function completes successfully.
1659  OCI_INVALID_HANDLE if 'err' is NULL.
1660  OCI_ERROR if
1661  'number' or 'rsl' is null
1662  'rsl_length' is 0
1663  *)
1664 
1665 (*-------------------------- OCINumberFromReal ------------------------------*)
1666 
1667  TOCINumberFromReal = function(err: POCIError; const rnum: Pointer;
1668  rnum_length: uword; number: POCINumber): sword; cdecl;
1669 (*
1670  NAME: OCINumberFromReal - OCINumber convert Real TO Number
1671  PARAMETERS:
1672  err (IN/OUT) - error handle. If there is an error, it is
1673  recorded in 'err' and this function returns OCI_ERROR.
1674  The error recorded in 'err' can be retrieved by calling
1675  OCIErrorGet().
1676  rnum (IN) - pointer to the floating point number to be converted
1677  rnum_length (IN) - size of the desired result, i.e.
1678  sizeof({float | double | long double})
1679  number (OUT) - given float converted to Oracle number
1680  DESCRIPTION:
1681  Native type conversion function. Converts a machine-native floating
1682  point type to an Oracle number.
1683  RETURNS:
1684  OCI_SUCCESS if the function completes successfully.
1685  OCI_INVALID_HANDLE if 'err' is NULL.
1686  OCI_ERROR if
1687  'number' or 'rnum' is null
1688  'rnum_length' is 0
1689  *)
1690 
1691 (*----------------------------- OCINumberCmp --------------------------------*)
1692 
1693  TOCINumberCmp = function(err: POCIError; const number1: POCINumber;
1694  const number2: POCINumber; _result: psword): sword; cdecl;
1695 (*
1696  NAME: OCINumberCmp - OCINumber CoMPare numbers
1697  PARAMETERS:
1698  err (IN/OUT) - error handle. If there is an error, it is
1699  recorded in 'err' and this function returns OCI_ERROR.
1700  The error recorded in 'err' can be retrieved by calling
1701  OCIErrorGet().
1702  number1, number2 (IN) - numbers to be compared
1703  result (OUT) - 0 if equal, negative if number1 < number2,
1704  positive if number1 > number2
1705  DESCRIPTION:
1706  The function OCINumberCmp compares two numbers.
1707  RETURNS:
1708  OCI_SUCCESS if the function completes successfully.
1709  OCI_INVALID_HANDLE if 'err' is NULL.
1710  OCI_ERROR if
1711  'number1' or 'number2' or 'result' is null
1712  *)
1713 
1714 (*---------------------------- OCINumberSign --------------------------------*)
1715 
1716  TOCINumberSign = function(err: POCIError; const number: POCINumber;
1717  _result: psword): sword; cdecl;
1718 (*
1719  NAME: OCINumberSign - OCINumber obtains SiGN of an Oracle number
1720  PARAMETERS:
1721  err (IN/OUT) - error handle. If there is an error, it is
1722  recorded in 'err' and this function returns OCI_ERROR.
1723  The error recorded in 'err' can be retrieved by calling
1724  OCIErrorGet().
1725  number (IN) - number whose sign is returned
1726  result (OUT) - 0 if number == 0, -1 if number < 0,
1727  1 if number > 0
1728  DESCRIPTION:
1729  Obtains sign of an Oracle number
1730  RETURNS:
1731  OCI_SUCCESS if the function completes successfully.
1732  OCI_INVALID_HANDLE if 'err' is NULL.
1733  OCI_ERROR if
1734  'number' or 'result' is null
1735  *)
1736 
1737 (*---------------------------- OCINumberIsZero ------------------------------*)
1738 
1739  TOCINumberIsZero = function(err: POCIError; const number: POCINumber;
1740  _Result: pboolean): sword; cdecl;
1741 (*
1742  NAME: OCINumberIsZero - OCINumber comparison with ZERo
1743  PARAMETERS:
1744  err (IN/OUT) - error handle. If there is an error, it is
1745  recorded in 'err' and this function returns OCI_ERROR.
1746  The error recorded in 'err' can be retrieved by calling
1747  OCIErrorGet().
1748  number (IN) - numbers to be compared
1749  result (OUT) - set to TRUE if equal to zero else FALSE
1750  DESCRIPTION:
1751  Test if the given number is equal to zero.
1752  RETURNS:
1753  OCI_SUCCESS if the function completes successfully.
1754  OCI_INVALID_HANDLE if 'err' is NULL.
1755  OCI_ERROR if
1756  'number' or 'result' is null
1757  *)
1758 
1759 (*---------------------------- OCINumberIsInt -------------------------------*)
1760 
1761  TOCINumberIsInt = function(err: POCIError; const number: POCINumber;
1762  _result: Pboolean): sword; cdecl;
1763 (*
1764  NAME: OCINumberIsInt - OCINumber Is Integer value.
1765  PARAMETERS:
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  number (IN) - number to be tested
1771  result (OUT) - set to TRUE if integer value else FALSE
1772  DESCRIPTION:
1773  Test if the given number is an integer value.
1774  RETURNS:
1775  OCI_SUCCESS if the function completes successfully.
1776  OCI_INVALID_HANDLE if 'err' is NULL.
1777  OCI_ERROR if
1778  'number' or 'result' is null
1779  *)
1780 
1781 (*-------------------------- OCINumberAssign --------------------------------*)
1782 
1783  TOCINumberAssign = function(err: POCIError; const from: POCINumber;
1784  _to: POCINumber): sword; cdecl;
1785 (*
1786  NAME: OCINumberAssign - OCINumber ASsiGn number
1787  PARAMETERS:
1788  err (IN/OUT) - error handle. If there is an error, it is
1789  recorded in 'err' and this function returns OCI_ERROR.
1790  The error recorded in 'err' can be retrieved by calling
1791  OCIErrorGet().
1792  from (IN) - number to be assigned
1793  to (OUT) - number copied into
1794  DESCRIPTION:
1795  Assign number 'from' to 'to'.
1796  RETURNS:
1797  OCI_SUCCESS if the function completes successfully.
1798  OCI_INVALID_HANDLE if 'err' is NULL.
1799  OCI_ERROR if
1800  'from' or 'to' is null
1801  *)
1802 
1803 (*----------------------------- OCINumberAbs --------------------------------*)
1804 
1805  TOCINumberAbs = function(err: POCIError; const number: POCINumber;
1806  _result: POCINumber): sword; cdecl;
1807 (*
1808  NAME: OCINumberAbs - OCINumber compute ABSolute value
1809  PARAMETERS:
1810  err (IN/OUT) - error handle. If there is an error, it is
1811  recorded in 'err' and this function returns OCI_ERROR.
1812  The error recorded in 'err' can be retrieved by calling
1813  OCIErrorGet().
1814  number (IN) - input number
1815  result (OUT) - output which will contain the absolue value of the
1816  input number
1817  DESCRIPTION:
1818  Computes the absolute value of an Oracle number.
1819  RETURNS:
1820  OCI_SUCCESS if the function completes successfully.
1821  OCI_INVALID_HANDLE if 'err' is NULL.
1822  OCI_ERROR if
1823  any of the number arguments is null
1824  *)
1825 
1826 (*---------------------------- OCINumberCeil --------------------------------*)
1827 
1828  TOCINumberCeil = function(err: POCIError; const number: POCINumber;
1829  _result: POCINumber): sword; cdecl;
1830 (*
1831  NAME: OCINumberCeil - OCINumber compute the CEiL value of an Oracle number
1832  PARAMETERS:
1833  err (IN/OUT) - error handle. If there is an error, it is
1834  recorded in 'err' and this function returns OCI_ERROR.
1835  The error recorded in 'err' can be retrieved by calling
1836  OCIErrorGet().
1837  number (IN) - input number
1838  result (OUT) - output which will contain the ceil value of the
1839  input number
1840  DESCRIPTION:
1841  Computes the ceil value of an Oracle number.
1842  RETURNS:
1843  OCI_SUCCESS if the function completes successfully.
1844  OCI_INVALID_HANDLE if 'err' is NULL.
1845  OCI_ERROR if
1846  any of the number arguments is null
1847  *)
1848 
1849 (*--------------------------- OCINumberFloor --------------------------------*)
1850 
1851  TOCINumberFloor = function(err: POCIError; const number: POCINumber;
1852  _result: POCINumber): sword; cdecl;
1853 (*
1854  NAME: OCINumberFloor - OCINumber compute the FLooR value of an Oracle number
1855  PARAMETERS:
1856  err (IN/OUT) - error handle. If there is an error, it is
1857  recorded in 'err' and this function returns OCI_ERROR.
1858  The error recorded in 'err' can be retrieved by calling
1859  OCIErrorGet().
1860  number (IN) - input number
1861  result (OUT) - output which will contain the floor value of the
1862  input number
1863  DESCRIPTION:
1864  Computes the floor value of an Oracle number.
1865  RETURNS:
1866  OCI_SUCCESS if the function completes successfully.
1867  OCI_INVALID_HANDLE if 'err' is NULL.
1868  OCI_ERROR if
1869  any of the number arguments is null
1870  *)
1871 
1872 (*----------------------------- OCINumberSqrt -------------------------------*)
1873 
1874  TOCINumberSqrt = function(err: POCIError; const number: POCINumber;
1875  _result: POCINumber): sword; cdecl;
1876 (*
1877  NAME: OCINumberSqrt - OCINumber compute the SQuare Root of an Oracle number
1878  PARAMETERS:
1879  err (IN/OUT) - error handle. If there is an error, it is
1880  recorded in 'err' and this function returns OCI_ERROR.
1881  The error recorded in 'err' can be retrieved by calling
1882  OCIErrorGet().
1883  number (IN) - input number
1884  result (OUT) - output which will contain the square root of the
1885  input number
1886  DESCRIPTION:
1887  Computes the square root of an Oracle number.
1888  RETURNS:
1889  OCI_SUCCESS if the function completes successfully.
1890  OCI_INVALID_HANDLE if 'err' is NULL.
1891  OCI_ERROR if
1892  any of the number arguments is null
1893  'number' is negative
1894  *)
1895 
1896 (*--------------------------- OCINumberTrunc --------------------------------*)
1897 
1898  TOCINumberTrunc = function(err: POCIError; const number: POCINumber;
1899  _result: POCINumber): sword; cdecl;
1900 (*
1901  NAME: OCINumberTrunc - OCINumber TRUncate an Oracle number at a
1902  specified decimal place
1903  PARAMETERS:
1904  err (IN/OUT) - error handle. If there is an error, it is
1905  recorded in 'err' and this function returns OCI_ERROR.
1906  The error recorded in 'err' can be retrieved by calling
1907  OCIErrorGet().
1908  number (IN) - input number
1909  decplace (IN) - number of decimal digits to the right of the
1910  decimal point to truncate at. Negative values are allowed.
1911  result (OUT) - output of truncation
1912  DESCRIPTION:
1913  Truncate an Oracle number at a specified decimal place
1914  RETURNS:
1915  OCI_SUCCESS if the function completes successfully.
1916  OCI_INVALID_HANDLE if 'err' is NULL.
1917  OCI_ERROR if
1918  any of the number arguments is null
1919  *)
1920 
1921 (*----------------------------- OCINumberPower ------------------------------*)
1922 
1923  TOCINumberPower = function(err: POCIError; const base: POCINumber;
1924  const number: POCINumber; _result: POCINumber): sword; cdecl;
1925 (*
1926  NAME: OCINumberPower - OCINumber takes an arbitary Base to an
1927  arbitary Power
1928  PARAMETERS:
1929  err (IN/OUT) - error handle. If there is an error, it is
1930  recorded in 'err' and this function returns OCI_ERROR.
1931  The error recorded in 'err' can be retrieved by calling
1932  OCIErrorGet().
1933  base (IN) - base of the exponentiation
1934  number (IN) - exponent to which the base is to be raised
1935  result (OUT) - output of exponentiation
1936  DESCRIPTION:
1937  Takes an arbitary base to an arbitary power.
1938  RETURNS:
1939  OCI_SUCCESS if the function completes successfully.
1940  OCI_INVALID_HANDLE if 'err' is NULL.
1941  OCI_ERROR if
1942  any of the number arguments is null
1943  *)
1944 
1945 (*--------------------------- OCINumberRound --------------------------------*)
1946 
1947  TOCINumberRound = function(err: POCIError; const number: POCINumber;
1948  decplace: sword; _result: POCINumber): sword; cdecl;
1949 (*
1950  NAME: OCINumberRound - OCINumber ROUnds an Oracle number to a specified
1951  decimal place
1952  PARAMETERS:
1953  err (IN/OUT) - error handle. If there is an error, it is
1954  recorded in 'err' and this function returns OCI_ERROR.
1955  The error recorded in 'err' can be retrieved by calling
1956  OCIErrorGet().
1957  number (IN) - round this number and return result in 'result'
1958  decplace (IN) - number of decimal digits to the right of the
1959  decimal point to round to. Negative values are allowed.
1960  result (OUT) - output of rounding
1961  DESCRIPTION:
1962  Rounds an Oracle number to a specified decimal place
1963  RETURNS:
1964  OCI_SUCCESS if the function completes successfully.
1965  OCI_INVALID_HANDLE if 'err' is NULL.
1966  OCI_ERROR if
1967  any of the number arguments is null
1968  *)
1969 
1970 (*--------------------------- OCINumberPrec ---------------------------------*)
1971 
1972  TOCINumberPrec = function(err: POCIError; const number: POCINumber;
1973  nDigs: sword; _result: POCINumber): sword; cdecl;
1974 (*
1975  NAME: OCINumberPrec - Rounds an Oracle number to a specified number of
1976  decimal digits.
1977  PARAMETERS:
1978  err (IN/OUT) - error handle. If there is an error, it is
1979  recorded in 'err' and this function returns OCI_ERROR.
1980  The error recorded in 'err' can be retrieved by calling
1981  OCIErrorGet().
1982  number (IN) - number for which to set precision.
1983  nDig (IN) - number of decimal digits desired in the result.
1984  result (OUT) - result.
1985  DESCRIPTION:
1986  Performs a floating point round with respect to the number
1987  of digits.
1988  RETURNS:
1989  OCI_SUCCESS if the function completes successfully.
1990  OCI_INVALID_HANDLE if 'err' is NULL.
1991  OCI_ERROR if
1992  any of the number arguments is null
1993  *)
1994 
1995 (*----------------------------- OCINumberSin --------------------------------*)
1996 
1997  TOCINumberSin = function(err: POCIError; const number: POCINumber;
1998  _result: POCINumber): sword; cdecl;
1999 (*
2000  NAME: OCINumberSin - OCINumber takes the SINe of an Oracle number
2001  PARAMETERS:
2002  err (IN/OUT) - error handle. If there is an error, it is
2003  recorded in 'err' and this function returns OCI_ERROR.
2004  The error recorded in 'err' can be retrieved by calling
2005  OCIErrorGet().
2006  number (IN) - argument of the sine in radians
2007  result (OUT) - result of the sine
2008  DESCRIPTION:
2009  Takes the sine in radians of an Oracle number.
2010  RETURNS:
2011  OCI_SUCCESS if the function completes successfully.
2012  OCI_INVALID_HANDLE if 'err' is NULL.
2013  OCI_ERROR if
2014  any of the number arguments is null
2015  *)
2016 
2017 (*-------------------------- OCINumberArcSin --------------------------------*)
2018 
2019  TOCINumberArcSin = function(err: POCIError; const number: POCINumber;
2020  _result: POCINumber): sword; cdecl;
2021 (*
2022  NAME: OCINumberArcSin - OCINumber takes the Arc SINe of an Oracle number
2023  PARAMETERS:
2024  err (IN/OUT) - error handle. If there is an error, it is
2025  recorded in 'err' and this function returns OCI_ERROR.
2026  The error recorded in 'err' can be retrieved by calling
2027  OCIErrorGet().
2028  number (IN) - argument of the arc sine
2029  result (OUT) - result of the arc sine in radians
2030  DESCRIPTION:
2031  Takes the arc sine in radians of an Oracle number.
2032  RETURNS:
2033  OCI_SUCCESS if the function completes successfully.
2034  OCI_INVALID_HANDLE if 'err' is NULL.
2035  OCI_ERROR if
2036  any of the number arguments is null
2037  'number' is < -1 or 'number' is > 1.
2038  *)
2039 
2040 (*-------------------------- OCINumberHypSin --------------------------------*)
2041 
2042  TOCINumberHypSin = function(err: POCIError; const number: POCINumber;
2043  _result: POCINumber): sword; cdecl;
2044 (*
2045  NAME: OCINumberHypSin - OCINumber takes the SiNe Hyperbolic of an
2046  Oracle number
2047  PARAMETERS:
2048  err (IN/OUT) - error handle. If there is an error, it is
2049  recorded in 'err' and this function returns OCI_ERROR.
2050  The error recorded in 'err' can be retrieved by calling
2051  OCIErrorGet().
2052  number (IN) - argument of the sine hyperbolic
2053  result (OUT) - result of the sine hyperbolic
2054  DESCRIPTION:
2055  Takes the hyperbolic sine of an Oracle number.
2056  RETURNS:
2057  OCI_SUCCESS if the function completes successfully.
2058  OCI_INVALID_HANDLE if 'err' is NULL.
2059  OCI_ERROR if
2060  any of the number arguments is null
2061  NOTES:
2062  An Oracle number overflow causes an unpredictable result value.
2063  *)
2064 
2065 (*----------------------------- OCINumberCos --------------------------------*)
2066 
2067  TOCINumberCos = function(err: POCIError; const number: POCINumber;
2068  _result: POCINumber): sword; cdecl;
2069 (*
2070  NAME: OCINumberCos - OCINumber takes the COSine of an Oracle number
2071  PARAMETERS:
2072  err (IN/OUT) - error handle. If there is an error, it is
2073  recorded in 'err' and this function returns OCI_ERROR.
2074  The error recorded in 'err' can be retrieved by calling
2075  OCIErrorGet().
2076  number (IN) - argument of the cosine in radians
2077  result (OUT) - result of the cosine
2078  DESCRIPTION:
2079  Takes the cosine in radians of an Oracle number.
2080  RETURNS:
2081  OCI_SUCCESS if the function completes successfully.
2082  OCI_INVALID_HANDLE if 'err' is NULL.
2083  OCI_ERROR if
2084  any of the number arguments is null
2085  *)
2086 
2087 (*-------------------------- OCINumberArcCos --------------------------------*)
2088 
2089  TOCINumberArcCos = function(err: POCIError; const number: POCINumber;
2090  _result: POCINumber): sword; cdecl;
2091 (*
2092  NAME: OCINumberArcCos - OCINumber takes the Arc COSine of an Oracle number
2093  PARAMETERS:
2094  err (IN/OUT) - error handle. If there is an error, it is
2095  recorded in 'err' and this function returns OCI_ERROR.
2096  The error recorded in 'err' can be retrieved by calling
2097  OCIErrorGet().
2098  number (IN) - argument of the arc cosine
2099  result (OUT) - result of the arc cosine in radians
2100  DESCRIPTION:
2101  Takes the arc cosine in radians of an Oracle number.
2102  RETURNS:
2103  OCI_SUCCESS if the function completes successfully.
2104  OCI_INVALID_HANDLE if 'err' is NULL.
2105  OCI_ERROR if
2106  any of the number arguments is null
2107  'number' is < -1 or 'number' is > 1.
2108  *)
2109 
2110 (*-------------------------- OCINumberHypCos --------------------------------*)
2111 
2112  TOCINumberHypCos = function(err: POCIError; const number: POCINumber;
2113  _result: POCINumber): sword; cdecl;
2114 (*
2115  NAME: OCINumberHypCos - OCINumber takes the CoSine Hyperbolic of an
2116  Oracle number
2117  PARAMETERS:
2118  err (IN/OUT) - error handle. If there is an error, it is
2119  recorded in 'err' and this function returns OCI_ERROR.
2120  The error recorded in 'err' can be retrieved by calling
2121  OCIErrorGet().
2122  number (IN) - argument of the cosine hyperbolic
2123  result (OUT) - result of the cosine hyperbolic
2124  DESCRIPTION:
2125  Takes the hyperbolic cosine of an Oracle number.
2126  RETURNS:
2127  OCI_SUCCESS if the function completes successfully.
2128  OCI_INVALID_HANDLE if 'err' is NULL.
2129  OCI_ERROR if
2130  any of the number arguments is null
2131  NOTES:
2132  An Oracle number overflow causes an unpredictable result value.
2133  *)
2134 
2135 (*----------------------------- OCINumberTan --------------------------------*)
2136 
2137  TOCINumberTan = function(err: POCIError; const number: POCINumber;
2138  _result: POCINumber): sword; cdecl;
2139 (*
2140  NAME: OCINumberTan - OCINumber takes the TANgent of an Oracle number
2141  PARAMETERS:
2142  err (IN/OUT) - error handle. If there is an error, it is
2143  recorded in 'err' and this function returns OCI_ERROR.
2144  The error recorded in 'err' can be retrieved by calling
2145  OCIErrorGet().
2146  number (IN) - argument of the tangent in radians
2147  result (OUT) - result of the tangent
2148  DESCRIPTION:
2149  Takes the tangent in radians of an Oracle number.
2150  RETURNS:
2151  OCI_SUCCESS if the function completes successfully.
2152  OCI_INVALID_HANDLE if 'err' is NULL.
2153  OCI_ERROR if
2154  any of the number arguments is null
2155  *)
2156 
2157 (*-------------------------- OCINumberArcTan --------------------------------*)
2158 
2159  TOCINumberArcTan = function(err: POCIError; const number: POCINumber;
2160  _result: POCINumber): sword; cdecl;
2161 (*
2162  NAME: OCINumberArcTan - OCINumber takes the Arc TANgent of an Oracle number
2163  PARAMETERS:
2164  err (IN/OUT) - error handle. If there is an error, it is
2165  recorded in 'err' and this function returns OCI_ERROR.
2166  The error recorded in 'err' can be retrieved by calling
2167  OCIErrorGet().
2168  number (IN) - argument of the arc tangent
2169  result (OUT) - result of the arc tangent in radians
2170  DESCRIPTION:
2171  Takes the arc tangent in radians of an Oracle number.
2172  RETURNS:
2173  OCI_SUCCESS if the function completes successfully.
2174  OCI_INVALID_HANDLE if 'err' is NULL.
2175  OCI_ERROR if
2176  any of the number arguments is null
2177  *)
2178 
2179 (*------------------------ OCINumberArcTan2 ---------------------------------*)
2180 
2181  TOCINumberArcTan2 = function(err: POCIError; const number1: POCINumber;
2182  const number2: POCINumber; _result: POCINumber): sword; cdecl;
2183 (*
2184  NAME: OCINumberArcTan2 - OCINumber takes the ATan2 of 2 Oracle numbers
2185  PARAMETERS:
2186  err (IN/OUT) - error handle. If there is an error, it is
2187  recorded in 'err' and this function returns OCI_ERROR.
2188  The error recorded in 'err' can be retrieved by calling
2189  OCIErrorGet().
2190  number1 (IN) - first argument of atan2(y,x) function which
2191  corresponds to 'y' parameter in the function
2192  number2 (IN) - second argument of atan2(y,x) function which
2193  corresponds to 'x' parameter in the function
2194  result (OUT) - result of the atan2() in radians
2195  DESCRIPTION:
2196  Takes the atan2(number1, number2).
2197  RETURNS:
2198  OCI_SUCCESS if the function completes successfully.
2199  OCI_INVALID_HANDLE if 'err' is NULL.
2200  OCI_ERROR if
2201  any of the number arguments is null
2202  'number2' is 0
2203  *)
2204 
2205 (*----------------------------- OCINumberHypTan -----------------------------*)
2206 
2207  TOCINumberHypTan = function(err: POCIError; const number: POCINumber;
2208  _result: POCINumber): sword; cdecl;
2209 (*
2210  NAME: OCINumberHypTan - OCINumber takes the TaNgent Hyperbolic of an Oracle
2211  number
2212  PARAMETERS:
2213  err (IN/OUT) - error handle. If there is an error, it is
2214  recorded in 'err' and this function returns OCI_ERROR.
2215  The error recorded in 'err' can be retrieved by calling
2216  OCIErrorGet().
2217  number (IN) - argument of the tangent hyperbolic
2218  result (OUT) - result of the tangent hyperbolic
2219  DESCRIPTION:
2220  Takes the hyperbolic tangent of an Oracle number.
2221  RETURNS:
2222  OCI_SUCCESS if the function completes successfully.
2223  OCI_INVALID_HANDLE if 'err' is NULL.
2224  OCI_ERROR if
2225  any of the number arguments is null
2226  NOTES:
2227  An Oracle number overflow causes an unpredictable result value.
2228  *)
2229 
2230 (*--------------------------- OCINumberExp ----------------------------------*)
2231 
2232  TOCINumberExp = function(err: POCIError; const number: POCINumber;
2233  _result: POCINumber): sword; cdecl;
2234 (*
2235  NAME: OCINumberExp - OCINumber EXPonential
2236  PARAMETERS:
2237  err (IN/OUT) - error handle. If there is an error, it is
2238  recorded in 'err' and this function returns OCI_ERROR.
2239  The error recorded in 'err' can be retrieved by calling
2240  OCIErrorGet().
2241  number (IN) - e raised to this Oracle number power
2242  result (OUT) - output of exponentiation
2243  DESCRIPTION:
2244  Raises e to the specified Oracle number power
2245  RETURNS:
2246  OCI_SUCCESS if the function completes successfully.
2247  OCI_INVALID_HANDLE if 'err' is NULL.
2248  OCI_ERROR if
2249  any of the number arguments is null
2250  *)
2251 
2252 (*----------------------------- OCINumberLn ---------------------------------*)
2253 
2254  TOCINumberLn = function(err: POCIError; const number: POCINumber;
2255  _result: POCINumber): sword; cdecl;
2256 (*
2257  NAME: OCINumberLn - OCINumber Logarithm Natural
2258  PARAMETERS:
2259  err (IN/OUT) - error handle. If there is an error, it is
2260  recorded in 'err' and this function returns OCI_ERROR.
2261  The error recorded in 'err' can be retrieved by calling
2262  OCIErrorGet().
2263  number (IN) - logarithm of this number is computed
2264  result (OUT) - logarithm result
2265  DESCRIPTION:
2266  Takes the logarithm of the given Oracle number with respect
2267  to the given base.
2268  RETURNS:
2269  OCI_SUCCESS if the function completes successfully.
2270  OCI_INVALID_HANDLE if 'err' is NULL.
2271  OCI_ERROR if
2272  any of the number arguments is null
2273  'number' is <= 0
2274  *)
2275 
2276 (*----------------------------- OCINumberLog --------------------------------*)
2277 
2278  TOCINumberLog = function(err: POCIError; const base: POCINumber;
2279  const number: POCINumber; _result: POCINumber): sword; cdecl;
2280 (*
2281  NAME: OCINumberLog - OCINumber LOGarithm any base
2282  PARAMETERS:
2283  err (IN/OUT) - error handle. If there is an error, it is
2284  recorded in 'err' and this function returns OCI_ERROR.
2285  The error recorded in 'err' can be retrieved by calling
2286  OCIErrorGet().
2287  base (IN) - base of the logarithm
2288  number (IN) - opearnd
2289  result (OUT) - logarithm result
2290  DESCRIPTION:
2291  Takes the logarithm with the specified base of an Oracle number.
2292  RETURNS:
2293  OCI_SUCCESS if the function completes successfully.
2294  OCI_INVALID_HANDLE if 'err' is NULL.
2295  OCI_ERROR if
2296  any of the number arguments is null
2297  'number' is <= 0
2298  'base' is <= 0
2299  *)
2300 
2301 (*****************************************************************************
2302  * ORACLE DATE TYPE *
2303  *****************************************************************************)
2304 
2305  POCITime = ^TOCITime;
2306  TOCITime = record
2307  OCITimeHH: ub1; // hours; range is 0 <= hours <=23
2308  OCITimeMI: ub1; // minutes; range is 0 <= minutes <= 59
2309  OCITimeSS: ub1; // seconds; range is 0 <= seconds <= 59
2310  end;
2311 
2312 (*
2313  * OCITime - OCI TiMe portion of date
2314  *
2315  * This structure should be treated as an opaque structure as the format
2316  * of this structure may change. Use OCIDateGetTime/OCIDateSetTime
2317  * to manipulate time portion of OCIDate.
2318  *)
2319 
2320  POCIDate = ^TOCIDate;
2321  TOCIDate = record
2322  OCIDateYYYY: sb2; // gregorian year; range is -4712 <= year <= 9999
2323  OCIDateMM: ub1; // month; range is 1 <= month < 12
2324  OCIDateDD: ub1; // day; range is 1 <= day <= 31
2325  OCIDateTime: TOCITime; // time
2326  end;
2327 
2328 (*
2329  * OCIDate - OCI oracle Date representation in C
2330  *
2331  * OCIDate represents the C mapping of Oracle date.
2332  *
2333  * This structure should be treated as an opaque structure as the format
2334  * of this structure may change. Use OCIDateGetDate/OCIDateSetDate
2335  * to access/initialize OCIDate.
2336  *
2337  * For binding variables of type OCIDate in OCI calls (OCIBindByName(),
2338  * OCIBindByPos(), and OCIDefineByPos()) use the type code SQLT_ODT.
2339  *)
2340 
2341 (*
2342  EXAMPLE
2343 
2344  The following example shows how to manipulate an attribute of type
2345  oracle date.
2346 
2347  #define FMT "Month dd, YYYY, HH:MI A.M."
2348  #define LANG "American"
2349 
2350  struct person
2351  {
2352  OCIDate start_date;
2353  };
2354  typedef struct person person;
2355 
2356  OCIError *err;
2357  person *joe;
2358  sword status; /o error status o/
2359 
2360  /o See oci.h for an example of how to initialize OCIError.
2361  o For this example, assume the OCIEnv and OCIError has been
2362  o initialized.
2363  o/
2364 
2365  /o Pin joe person object in the object cache. See ori.h
2366  o for an example on pinning objects. For this example, assume that
2367  o joe is pointing to the pinned object.
2368  o/
2369 
2370  /o set the start date of joe o/
2371  OCIDateSetTime(&joe->start_date, 8, 0, 0);
2372  OCIDateSetDate(&joe->start_date, 1990, 10, 5);
2373 
2374  /o check if the date is valid o/
2375  uword invalid;
2376  if (OCIDateCheck(err, &joe->start_date, &invalid) != OCI_SUCCESS)
2377  /o error handling code o/
2378  if (invalid)
2379  /o error handling code o/
2380 
2381  /o convert date for display purposes o/
2382  char str[100];
2383  ub4 strlen = sizeof(str);
2384  if (OCIDateToText(err, &joe->start_date, FMT, sizeof(FMT)-1, LANG,
2385  sizeof(LANG)-1, &strlen, str) != OCI_SUCCESS)
2386  /o error handling code o/
2387 
2388  *)
2389 
2390 (*--------------------------- OCIDateGetTime --------------------------------*/
2391 /* void OCIDateGetTime(/o_ const OCIDate *date, ub1 *hour, ub1 *min,
2392  ub1 *sec _o/); */
2393 #define OCIDateGetTime(date, hour, min, sec) \
2394  { \
2395  *hour = (date)->OCIDateTime.OCITimeHH; \
2396  *min = (date)->OCIDateTime.OCITimeMI; \
2397  *sec = (date)->OCIDateTime.OCITimeSS; \
2398  }
2399 /*
2400  NAME: OCIDateGetTime - OCIDate Get Time portion of date
2401  PARAMETERS:
2402  date (IN) - Oracle date whose time data is retrieved
2403  hour (OUT) - hour value returned
2404  min (OUT) - minute value returned
2405  sec (OUT) - second value returned
2406  DESCRIPTION:
2407  Return time inforamtion stored in the given date. The time
2408  information returned is: hour, minute and seconds.
2409  RETURNS:
2410  NONE
2411  */
2412 
2413 /*--------------------------- OCIDateGetDate --------------------------------*/
2414 /* void OCIDateGetDate(/o_ const OCIDate *date, sb2 *year, ub1 *month,
2415  ub1 *day _o/); */
2416 #define OCIDateGetDate(date, year, month, day) \
2417  { \
2418  *year = (date)->OCIDateYYYY; \
2419  *month = (date)->OCIDateMM; \
2420  *day = (date)->OCIDateDD; \
2421  }
2422 /*
2423  NAME: OCIDateGetDate - OCIDate Get Date (year, month, day) portion of date
2424  PARAMETERS:
2425  date (IN) - Oracle date whose year, month, day data is retrieved
2426  year (OUT) - year value returned
2427  month (OUT) - month value returned
2428  day (OUT) - day value returned
2429  DESCRIPTION:
2430  Return year, month, day inforamtion stored in the given date.
2431  RETURNS:
2432  NONE
2433  */
2434 
2435 /*--------------------------- OCIDateSetTime --------------------------------*/
2436 /* void OCIDateSetTime(/o_ OCIDate *date, ub1 hour, ub1 min,
2437  ub1 sec _o/); */
2438 #define OCIDateSetTime(date, hour, min, sec) \
2439  { \
2440  (date)->OCIDateTime.OCITimeHH = hour; \
2441  (date)->OCIDateTime.OCITimeMI = min; \
2442  (date)->OCIDateTime.OCITimeSS = sec; \
2443  }
2444 /*
2445  NAME: OCIDateSetTime - OCIDate Set Time portion of date
2446  PARAMETERS:
2447  date (OUT) - Oracle date whose time data is set
2448  hour (IN) - hour value to be set
2449  min (IN) - minute value to be set
2450  sec (IN) - second value to be set
2451  DESCRIPTION:
2452  Set the date with the given time inforamtion.
2453  RETURNS:
2454  NONE
2455  */
2456 
2457 /*--------------------------- OCIDateSetDate --------------------------------*/
2458 /* void OCIDateSetDate(/o_ OCIDate *date, sb2 year, ub1 month, ub1 day _o/); */
2459 #define OCIDateSetDate(date, year, month, day) \
2460  { \
2461  (date)->OCIDateYYYY = year; \
2462  (date)->OCIDateMM = month; \
2463  (date)->OCIDateDD = day; \
2464  }
2465 /*
2466  NAME: OCIDateSetDate - OCIDate Set Date (year, month, day) portion of date
2467  PARAMETERS:
2468  date (IN) - Oracle date whose year, month, day data is set
2469  year (OUT) - year value to be set
2470  month (OUT) - month value to be set
2471  day (OUT) - day value to be set
2472  DESCRIPTION:
2473  Set the date with the given year, month, day inforamtion.
2474  RETURNS:
2475  NONE
2476  *)
2477 
2478 (*--------------------------- OCIDateAssign ---------------------------------*)
2479 
2480  TOCIDateAssign = function(err: POCIError; const from: POCIDate;
2481  _to: POCIDate): sword; cdecl;
2482 (*
2483  NAME: OCIDateAssign - OCIDate Assignment
2484  PARAMETERS:
2485  err (IN/OUT) - error handle. If there is an error, it is
2486  recorded in 'err' and this function returns OCI_ERROR.
2487  The error recorded in 'err' can be retrieved by calling
2488  OCIErrorGet().
2489  from (IN) - date to be assigned
2490  to (OUT) - lhs of assignment
2491  DESCRIPTION:
2492  Performs date assignment.
2493  RETURNS:
2494  OCI_SUCCESS
2495  *)
2496 
2497 (*--------------------------- OCIDateToText ---------------------------------*)
2498 
2499  TOCIDateToText = function(err: POCIError; const date: POCIDate;
2500  const fmt: poratext; fmt_length: ub1;
2501  const lang_name: poratext; lang_length: ub4;
2502  buf_size: pub4; buf: poratext): sword; cdecl;
2503 (*
2504  NAME: OCIDateToText - OCIDate convert date TO String
2505  PARAMETERS:
2506  err (IN/OUT) - error handle. If there is an error, it is
2507  recorded in 'err' and this function returns OCI_ERROR.
2508  The error recorded in 'err' can be retrieved by calling
2509  OCIErrorGet().
2510  date (IN) - Oracle date to be converted
2511  fmt (IN) - conversion format, if null string pointer (oratext * )0, then
2512  the date is converted to a character string in the
2513  date format "DD-MON-YY".
2514  fmt_length (IN) - length of the 'fmt' parameter
2515  lang_name (IN) - specifies the language in which the names and
2516  abbreviations of months and days are returned;
2517  default language of session is used if 'lang_name'
2518  is null i.e. (oratext * )0
2519  lang_length (IN) - length of the 'nls_params' parameter
2520  buf_size (IN/OUT) - size of the buffer; size of the resulting string
2521  is returned via this parameter
2522  buf (OUT) - buffer into which the converted string is placed
2523  DESCRIPTION:
2524  Converts the given date to a string according to the specified format.
2525  Refer to "TO_DATE" conversion function described in
2526  "Oracle SQL Language Reference Manual" for a description of format
2527  and NLS arguments. The converted null-terminated date string is
2528  stored in the buffer 'buf'.
2529 
2530  An error is reported upon overflow, e.g. trying to convert a number
2531  of value 10 using format '9' causes an overflow.
2532  RETURNS:
2533  OCI_SUCCESS if the function completes successfully.
2534  OCI_INVALID_HANDLE if 'err' is NULL.
2535  OCI_ERROR if
2536  buffer too small
2537  invalid format
2538  unknown language
2539  overflow error
2540  *)
2541 
2542 (*---------------------------- OCIDateFromText ------------------------------*)
2543 
2544  TOCIDateFromText = function(err: POCIError; const date_str: poratext;
2545  d_str_length: ub4; const fmt: poratext; fmt_length: ub1;
2546  const lang_name: poratext; lang_length: ub4;
2547  date: POCIDate): sword; cdecl;
2548 (*
2549  NAME: OCIDateFromText - OCIDate convert String TO Date
2550  PARAMETERS:
2551  err (IN/OUT) - error handle. If there is an error, it is
2552  recorded in 'err' and this function returns OCI_ERROR.
2553  The error recorded in 'err' can be retrieved by calling
2554  OCIErrorGet().
2555  date_str (IN) - input string to be converted to Oracle date
2556  d_str_length (IN) - size of the input string, if the length is -1
2557  then 'date_str' is treated as a null terminated string
2558  fmt (IN) - conversion format; if 'fmt' is a null pointer, then
2559  the string is expected to be in 'DD-MON-YY' format.
2560  fmt_length (IN) - length of the 'fmt' parameter
2561  lang_name (IN) - language in which the names and abbreviations of
2562  days and months are specified, if null i.e. (oratext * )0,
2563  the default language of session is used,
2564  lang_length (IN) - length of the 'lang_name' parameter
2565  date (OUT) - given string converted to date
2566  DESCRIPTION:
2567  Converts the given string to Oracle date
2568  according to the specified format. Refer to "TO_DATE" conversion
2569  function described in "Oracle SQL Language Reference Manual" for a
2570  description of format.
2571  RETURNS:
2572  OCI_SUCCESS if the function completes successfully.
2573  OCI_INVALID_HANDLE if 'err' is NULL.
2574  OCI_ERROR if
2575  invalid format
2576  unknown language
2577  invalid input string
2578  <to be discovered>
2579  *)
2580 
2581 (*----------------------------- OCIDateCompare ------------------------------*)
2582 
2583  TOCIDateCompare = function(err: POCIError; const date1: POCIDate;
2584  const date2: POCIDate; _result: psword): sword; cdecl;
2585 (*
2586  NAME: OCIDateCompare - OCIDate CoMPare dates
2587  PARAMETERS:
2588  err (IN/OUT) - error handle. If there is an error, it is
2589  recorded in 'err' and this function returns OCI_ERROR.
2590  The error recorded in 'err' can be retrieved by calling
2591  OCIErrorGet().
2592  date1, date2 (IN) - dates to be compared
2593  result (OUT) - comparison result, 0 if equal, -1 if date1 < date2,
2594  1 if date1 > date2
2595  DESCRIPTION:
2596  The function OCIDateCompare compares two dates. It returns -1 if date1
2597  is smaller than date2, 0 if they are equal, and 1 if date1 is greater
2598  than date2.
2599  RETURNS:
2600  OCI_SUCCESS if the function completes successfully.
2601  OCI_INVALID_HANDLE if 'err' is NULL.
2602  OCI_ERROR if
2603  invalid date
2604  <to be discovered>
2605  *)
2606 
2607 (*------------------------- OCIDateAddMonths --------------------------------*)
2608 
2609  TOCIDateAddMonths = function(err: POCIError; const date: POCIDate;
2610  num_months: sb4; _result: POCIDate): sword; cdecl;
2611 (*
2612  NAME: OCIDateAddMonths - OCIDate ADd or subtract Months
2613  PARAMETERS:
2614  err (IN/OUT) - error handle. If there is an error, it is
2615  recorded in 'err' and this function returns OCI_ERROR.
2616  The error recorded in 'err' can be retrieved by calling
2617  OCIErrorGet().
2618  date (IN) - 'num_months' added or subtracted from 'date'
2619  num_months (IN) - number of months to be added or subtracted
2620  (a negative value will be subtracted)
2621  result (IN/OUT) - result of adding or subtracting to 'date'
2622  DESCRIPTION:
2623  The function OCIDateAddDays adds or subtracts num_months from the
2624  date 'date'.
2625  If the input 'date' is the last day of a month, then
2626  appropriate adjustments are made to ensure that the output date is
2627  also the last day of the month. For example, Feb. 28 + 1 month =
2628  March 31, and November 30 - 3 months = August 31. Otherwise the
2629  'result' date has the same day component as 'date'.
2630  RETURNS:
2631  OCI_SUCCESS if the function completes successfully.
2632  OCI_INVALID_HANDLE if 'err' is NULL.
2633  OCI_ERROR if
2634  invalid date
2635  <to be discovered>
2636  *)
2637 
2638 (*--------------------------- OCIDateAddDays --------------------------------*)
2639 
2640  TOCIDateAddDays = function(err: POCIError; const date: POCIDate; num_days: sb4;
2641  _result: POCIDate):sword; cdecl;
2642 (*
2643  NAME: OCIDateAddDays - OCIDate ADd or subtract Days
2644  PARAMETERS:
2645  err (IN/OUT) - error handle. If there is an error, it is
2646  recorded in 'err' and this function returns OCI_ERROR.
2647  The error recorded in 'err' can be retrieved by calling
2648  OCIErrorGet().
2649  date (IN) - 'num_days' added or subtracted from 'date'
2650  num_days (IN) - number of days to be added or subtracted
2651  (a negative value will be subtracted)
2652  result (IN/OUT) - result of adding or subtracting to 'date'
2653  DESCRIPTION:
2654  The function OCIDateAddDays adds or subtracts num_days from the
2655  date 'date'.
2656  RETURNS:
2657  OCI_SUCCESS if the function completes successfully.
2658  OCI_INVALID_HANDLE if 'err' is NULL.
2659  OCI_ERROR if
2660  invalid date
2661  <to be discovered>
2662  *)
2663 
2664 (*--------------------------- OCIDateLastDay --------------------------------*)
2665 
2666  TOCIDateLastDay = function(err: POCIError; const date: POCIDate;
2667  last_day: POCIDate): sword; cdecl;
2668 (*
2669  NAME: OCIDateLastDay - OCIDate get date of the LaST day of the month
2670  PARAMETERS:
2671  err (IN/OUT) - error handle. If there is an error, it is
2672  recorded in 'err' and this function returns OCI_ERROR.
2673  The error recorded in 'err' can be retrieved by calling
2674  OCIErrorGet().
2675  date (IN) - input date
2676  last_day (OUT) - last day of the month in date 'date'
2677  DESCRIPTION:
2678  The function OCIDateLastDay returns the date of the last day of the
2679  month in date 'date'.
2680  RETURNS:
2681  OCI_SUCCESS if the function completes successfully.
2682  OCI_INVALID_HANDLE if 'err' is NULL.
2683  OCI_ERROR if
2684  invalid date
2685  <to be discovered>
2686  *)
2687 
2688 (*----------------------- OCIDateDaysBetween --------------------------------*)
2689 
2690  TOCIDateDaysBetween = function(err: POCIError; const date1: POCIDate;
2691  const dtae2: POCIDate; num_days: psb4): sword; cdecl;
2692 (*
2693  NAME: OCIDateDaysBetween - OCIDate get number of days BeTWeen two dates
2694  PARAMETERS:
2695  err (IN/OUT) - error handle. If there is an error, it is
2696  recorded in 'err' and this function returns OCI_ERROR.
2697  The error recorded in 'err' can be retrieved by calling
2698  OCIErrorGet().
2699  date1, date2 (IN) - input dates
2700  num_days (OUT) - number of days between date1 and date2
2701  DESCRIPTION:
2702  The function OCIDateDaysBetween returns the number of days between
2703  date1 and date2. The time is ignored in this computation.
2704  RETURNS:
2705  OCI_SUCCESS if the function completes successfully.
2706  OCI_INVALID_HANDLE if 'err' is NULL.
2707  OCI_ERROR if
2708  invalid date
2709  <to be discovered>
2710  *)
2711 
2712 (*------------------------ OCIDateZoneToZone --------------------------------*)
2713 
2714  TOCIDateZoneToZone = function(err: POCIError; const date1: POCIDate;
2715  const zon1: poratext;
2716  zon1_length: ub4; const zon2: poratext;
2717  zon2_length: ub4; dtae2: POCIDate): sword; cdecl;
2718 (*
2719  NAME: OCIDateZoneToZone - OCIDate convert date from one Zone TO another Zone
2720  PARAMETERS:
2721  err (IN/OUT) - error handle. If there is an error, it is
2722  recorded in 'err' and this function returns OCI_ERROR.
2723  The error recorded in 'err' can be retrieved by calling
2724  OCIErrorGet().
2725  date1 (IN) - date to be converted
2726  zon1 (IN) - zone of input date
2727  zon1_length (IN) - length in bytes of string 'zon1'
2728  zon2 (IN) - zone to be converted to
2729  zon2_length (IN) - length in bytes of string 'zon2'
2730  date2 (OUT) - converted date (in 'zon2')
2731  DESCRIPTION:
2732  Converts date from one time zone to another. Given date 'date1'
2733  in time zone 'zon1' returns date 'date2' in time zone 'zon2'.
2734  RETURNS:
2735  OCI_SUCCESS if the function completes successfully.
2736  OCI_INVALID_HANDLE if 'err' is NULL.
2737  OCI_ERROR if
2738  invlid date
2739  invald input time zone
2740  invald output time zone
2741  <to be discovered>
2742  *)
2743 
2744 (*--------------------------- OCIDateNextDay --------------------------------*)
2745 
2746  TOCIDateNextDay = function(err: POCIError; const dtae: POCIDate;
2747  const day_p: poratext; day_length: ub4;
2748  next_day: POCIDate): sword; cdecl;
2749 (*
2750  NAME: OCIDateNextDay - OCIDate get date of Next DaY
2751  PARAMETERS:
2752  err (IN/OUT) - error handle. If there is an error, it is
2753  recorded in 'err' and this function returns OCI_ERROR.
2754  The error recorded in 'err' can be retrieved by calling
2755  OCIErrorGet().
2756  date (IN) - returned date should be later than this date
2757  day (IN) - first day of week named by this is returned
2758  day_length (IN) - length in bytes of string 'day'
2759  next_day (OUT) - first day of the week named by 'day' later than 'date'
2760  DESCRIPTION:
2761  Returns the date of the first day of the
2762  week named by 'day' that is later than date 'date'.
2763  RETURNS:
2764  OCI_SUCCESS if the function completes successfully.
2765  OCI_INVALID_HANDLE if 'err' is NULL.
2766  OCI_ERROR if
2767  invalid date
2768  invalid day
2769  <to be discovered>
2770  */
2771 
2772 /*----------------------------- OCIDateCheck --------------------------------*/
2773 
2774 /* Listing of error bits used by OCIDateCheck() */
2775 #define OCI_DATE_INVALID_DAY 0x1 /* Bad DAy */
2776 #define OCI_DATE_DAY_BELOW_VALID 0x2 /* Bad DAy Low/high bit (1=low)*/
2777 #define OCI_DATE_INVALID_MONTH 0x4 /* Bad MOnth */
2778 #define OCI_DATE_MONTH_BELOW_VALID 0x8 /* Bad MOnth Low/high bit (1=low)*/
2779 #define OCI_DATE_INVALID_YEAR 0x10 /* Bad YeaR */
2780 #define OCI_DATE_YEAR_BELOW_VALID 0x20 /* Bad YeaR Low/high bit (1=low)*/
2781 #define OCI_DATE_INVALID_HOUR 0x40 /* Bad HouR */
2782 #define OCI_DATE_HOUR_BELOW_VALID 0x80 /* Bad HouR Low/high bit (1=low)*/
2783 #define OCI_DATE_INVALID_MINUTE 0x100 /* Bad MiNute */
2784 #define OCI_DATE_MINUTE_BELOW_VALID 0x200
2785  /* Bad MiNute Low/high bit (1=low)*/
2786 #define OCI_DATE_INVALID_SECOND 0x400 /* Bad SeCond */
2787 #define OCI_DATE_SECOND_BELOW_VALID 0x800
2788  /* bad second Low/high bit (1=low)*/
2789 #define OCI_DATE_DAY_MISSING_FROM_1582 0x1000
2790  /* Day is one of those "missing" from 1582 */
2791 #define OCI_DATE_YEAR_ZERO 0x2000 /* Year may not equal zero */
2792 #define OCI_DATE_INVALID_FORMAT 0x8000 /* Bad date format input */
2793 
2794 sword OCIDateCheck( OCIError *err, const OCIDate *date, uword *valid );
2795 /*
2796  NAME: OCIDateCheck - OCIDate CHecK if the given date is valid
2797  PARAMETERS:
2798  err (IN/OUT) - error handle. If there is an error, it is
2799  recorded in 'err' and this function returns OCI_ERROR.
2800  The error recorded in 'err' can be retrieved by calling
2801  OCIErrorGet().
2802  date (IN) - date to be checked
2803  valid (OUT) - returns zero for a valid date, otherwise
2804  the ORed combination of all error bits specified below:
2805 
2806  Macro name Bit number Error
2807  ---------- ---------- -----
2808  OCI_DATE_INVALID_DAY 0x1 Bad day
2809  OCI_DATE_DAY_BELOW_VALID 0x2 Bad DAy Low/high bit (1=low)
2810  OCI_DATE_INVALID_MONTH 0x4 Bad MOnth
2811  OCI_DATE_MONTH_BELOW_VALID 0x8 Bad MOnth Low/high bit (1=low)
2812  OCI_DATE_INVALID_YEAR 0x10 Bad YeaR
2813  OCI_DATE_YEAR_BELOW_VALID 0x20 Bad YeaR Low/high bit (1=low)
2814  OCI_DATE_INVALID_HOUR 0x40 Bad HouR
2815  OCI_DATE_HOUR_BELOW_VALID 0x80 Bad HouR Low/high bit (1=low)
2816  OCI_DATE_INVALID_MINUTE 0x100 Bad MiNute
2817  OCI_DATE_MINUTE_BELOW_VALID 0x200 Bad MiNute Low/high bit (1=low)
2818  OCI_DATE_INVALID_SECOND 0x400 Bad SeCond
2819  OCI_DATE_SECOND_BELOW_VALID 0x800 bad second Low/high bit (1=low)
2820  OCI_DATE_DAY_MISSING_FROM_1582 0x1000 Day is one of those "missing"
2821  from 1582
2822  OCI_DATE_YEAR_ZERO 0x2000 Year may not equal zero
2823  OCI_DATE_INVALID_FORMAT 0x8000 Bad date format input
2824 
2825  So, for example, if the date passed in was 2/0/1990 25:61:10 in
2826  (month/day/year hours:minutes:seconds format), the erroor returned
2827  would be OCI_DATE_INVALID_DAY | OCI_DATE_DAY_BELOW_VALID |
2828  OCI_DATE_INVALID_HOUR | OCI_DATE_INVALID_MINUTE
2829 
2830  DESCRIPTION:
2831  Check if the given date is valid.
2832  RETURNS:
2833  OCI_SUCCESS if the function completes successfully.
2834  OCI_INVALID_HANDLE if 'err' is NULL.
2835  OCI_ERROR if
2836  'date' and 'valid' pointers are NULL pointers
2837  */
2838 
2839 /*--------------------------- OCIDateSysDate --------------------------------*/
2840 
2841 sword OCIDateSysDate( OCIError *err, OCIDate *sys_date );
2842 /*
2843  NAME: OCIDateSysDate - OCIDate get current SYStem date and time
2844  PARAMETERS:
2845  err (IN/OUT) - error handle. If there is an error, it is
2846  recorded in 'err' and this function returns OCI_ERROR.
2847  The error recorded in 'err' can be retrieved by calling
2848  OCIErrorGet().
2849  sys_date (OUT) - current system date and time
2850  DESCRIPTION:
2851  Returns the current system date and time.
2852  RETURNS:
2853  OCI_SUCCESS if the function completes successfully.
2854  OCI_INVALID_HANDLE if 'err' is NULL.
2855  OCI_ERROR if
2856  <to be discovered>
2857  */
2858 
2859 /*****************************************************************************/
2860 /* FIXED-LENGTH STRING - CHAR (N) */
2861 /*****************************************************************************/
2862 
2863 /*
2864  * An ADT attribute declared as "x CHAR(n)" is mapped to "OCIString *x;".
2865  * The representation of OCIString * is shown below.
2866  */
2867 
2868 /*****************************************************************************/
2869 /* VARIABLE-LENGTH STRING */
2870 /*****************************************************************************/
2871 
2872 /*
2873  * The variable-length string is represented in C as a pointer to OCIString
2874  * structure. The OCIString structure is opaque to the user. Functions are
2875  * provided to allow the user to manipulate a variable-length string.
2876  *
2877  * A variable-length string can be declared as:
2878  *
2879  * OCIString *vstr;
2880  *
2881  * For binding variables of type OCIString* in OCI calls (OCIBindByName(),
2882  * OCIBindByPos() and OCIDefineByPos()) use the external type code SQLT_VST.
2883  */
2884 typedef struct OCIString OCIString;
2885 
2886 /*-------------------------- OCIStringAssign --------------------------------*/
2887 
2888 sword OCIStringAssign( OCIEnv *env, OCIError *err, const OCIString *rhs,
2889  OCIString **lhs );
2890 /*
2891  NAME: OCIStringAssign - OCIString Assign String to String
2892  PARAMETERS:
2893  env (IN/OUT) - OCI environment handle initialized in object mode.
2894  err (IN/OUT) - error handle. If there is an error, it is
2895  recorded in 'err' and this function returns OCI_ERROR.
2896  The error recorded in 'err' can be retrieved by calling
2897  OCIErrorGet().
2898  rhs (IN) - RHS of the assignment, the type of rhs is also OCIString
2899  lhs (IN/OUT) - LHS of the assignment
2900  DESCRIPTION:
2901  Assign 'rhs' string to 'lhs' string. The 'lhs' string may be
2902  resized depending upon the size of the 'rhs'. The assigned string is
2903  null-terminated. The 'length' field will not include the extra byte
2904  needed for null termination.
2905  RETURNS:
2906  OCI_SUCCESS if the function completes successfully.
2907  OCI_INVALID_HANDLE if 'env' or 'err' is NULL.
2908  OCI_ERROR if
2909  out of space error
2910  */
2911 
2912 /*---------------------- OCIStringAssignText --------------------------------*/
2913 
2914 sword OCIStringAssignText( OCIEnv *env, OCIError *err, const oratext *rhs,
2915  ub4 rhs_len, OCIString **lhs );
2916 /*
2917  NAME: OCIStringAssignText - OCIString Assign Text string to String
2918  PARAMETERS:
2919  env (IN/OUT) - OCI environment handle initialized in object mode.
2920  err (IN/OUT) - error handle. If there is an error, it is
2921  recorded in 'err' and this function returns OCI_ERROR.
2922  The error recorded in 'err' can be retrieved by calling
2923  OCIErrorGet().
2924  rhs (IN) - RHS of the assignment, the type of rhs is a text string
2925  rhs_len (IN) - length of the 'rhs' string
2926  lhs (IN/OUT) - LHS of the assignment
2927  DESCRIPTION:
2928  Assign 'rhs' string to 'lhs' string. The 'lhs' string may be
2929  resized depending upon the size of the 'rhs'. The assigned string is
2930  null-terminated. The 'length' field will not include the extra byte
2931  needed for null termination.
2932  RETURNS:
2933  OCI_SUCCESS if the function completes successfully.
2934  OCI_INVALID_HANDLE if 'env' or 'err' is NULL.
2935  OCI_ERROR if
2936  out of space error
2937  */
2938 
2939 /*-------------------------- OCIStringResize --------------------------------*/
2940 
2941 sword OCIStringResize( OCIEnv *env, OCIError *err, ub4 new_size,
2942  OCIString **str );
2943 /*
2944  NAME: OCIStringResize - OCIString ReSiZe string memory
2945  PARAMETERS:
2946  env (IN/OUT) - OCI environment handle initialized in object mode.
2947  err (IN/OUT) - error handle. If there is an error, it is
2948  recorded in 'err' and this function returns OCI_ERROR.
2949  The error recorded in 'err' can be retrieved by calling
2950  OCIErrorGet().
2951  new_size (IN) - new memory size of the string in bytes
2952  str (IN/OUT) - allocated memory for the string is freed from the
2953  OOCI heap
2954  DESCRIPTION:
2955  This function resizes the memory of the given variable-length string in
2956  the object cache. The contents of the string are NOT preserved.
2957  This function may allocate the string in a new memory region in
2958  which case the original memory occupied by the given string will
2959  be freed. If the input string is null (str == NULL), then this
2960  function will allocate memory for the string.
2961 
2962  If the new_size is 0, then this function frees the memory occupied
2963  by 'str' and a null pointer value is returned.
2964 
2965  NOTE: The caller must compute 'new_size' taking into account space
2966  for the null character ('\0').
2967  RETURNS:
2968  OCI_SUCCESS if the function completes successfully.
2969  OCI_INVALID_HANDLE if 'env' or 'err' is NULL.
2970  OCI_ERROR if
2971  out of space error
2972  */
2973 
2974 /*---------------------------- OCIStringSize --------------------------------*/
2975 
2976 ub4 OCIStringSize( OCIEnv *env, const OCIString *vs );
2977 /*
2978  NAME: OCIStringSize - OCIString Get String siZe
2979  PARAMETERS:
2980  env(IN) - pointer to OCI environment handle
2981  vs (IN) - string whose size is returned
2982  DESCRIPTION:
2983  Return the size of the given string.
2984  RETURNS:
2985  size of the string in bytes is returned
2986  */
2987 
2988 /*----------------------------- OCIStringPtr --------------------------------*/
2989 
2990 oratext *OCIStringPtr( OCIEnv *env, const OCIString *vs );
2991 /*
2992  NAME: OCIStringPtr - OCIString Get String Pointer
2993  PARAMETERS:
2994  env(IN) - pointer to OCI environment handle
2995  vs (IN) - pointer to the text of this string is returned
2996  DESCRIPTION:
2997  Return the pointer to the text of the given string.
2998  RETURNS:
2999  pointer to the text of the string is returned
3000  */
3001 
3002 /*----------------------- OCIStringAllocSize --------------------------------*/
3003 
3004 sword OCIStringAllocSize( OCIEnv *env, OCIError *err, const OCIString *vs,
3005  ub4 *allocsize );
3006 /*
3007  NAME: OCIStringAllocSize - OCIString get Allocated SiZe of string memory
3008  in bytes
3009  PARAMETERS:
3010  env (IN/OUT) - OCI environment handle initialized in object mode.
3011  err (IN/OUT) - error handle. If there is an error, it is
3012  recorded in 'err' and this function returns OCI_ERROR.
3013  The error recorded in 'err' can be retrieved by calling
3014  OCIErrorGet().
3015  vs (IN) - string whose allocated size in bytes is returned
3016  allocsize (OUT) - allocated size of string memory in bytes is returned
3017  DESCRIPTION:
3018  Return the allocated size of the string memory in bytes. The
3019  allocated size is >= actual string size.
3020  REQUIRES:
3021  vs is a non-null pointer
3022  RETURNS:
3023  OCI_SUCCESS if the function completes successfully.
3024  OCI_INVALID_HANDLE if 'env' or 'err' is NULL.
3025  OCI_ERROR on error
3026  */
3027 
3028 /*****************************************************************************/
3029 /* VARIABLE-LENGTH RAW */
3030 /*****************************************************************************/
3031 
3032 /*
3033  * The variable-length raw is represented in C as a pointer to OCIRaw
3034  * structure. The OCIRaw structure is opaque to the user. Functions are
3035  * provided to allow the user to manipulate a variable-length raw.
3036  *
3037  * A variable-length raw can be declared as:
3038  *
3039  * OCIRaw *raw;
3040  *
3041  * For binding variables of type OCIRaw* in OCI calls (OCIBindByName(),
3042  * OCIBindByPos() and OCIDefineByPos()) use the external type code SQLT_LVB.
3043  */
3044 typedef struct OCIRaw OCIRaw;
3045 
3046 /*-------------------------- OCIRawAssignRaw --------------------------------*/
3047 
3048 sword OCIRawAssignRaw( OCIEnv *env, OCIError *err, const OCIRaw *rhs,
3049  OCIRaw **lhs );
3050 /*
3051  NAME: OCIRawAssignRaw - OCIRaw Assign Raw (of type OCIRaw* ) to
3052  Raw (of type OCIRaw* )
3053  PARAMETERS:
3054  env (IN/OUT) - OCI environment handle initialized in object mode.
3055  err (IN/OUT) - error handle. If there is an error, it is
3056  recorded in 'err' and this function returns OCI_ERROR.
3057  The error recorded in 'err' can be retrieved by calling
3058  OCIErrorGet().
3059  rhs (IN) - RHS of the assignment, the type of rhs is also OCIRaw
3060  lhs (IN/OUT) - LHS of the assignment
3061  DESCRIPTION:
3062  Assign 'rhs' raw to 'lhs' raw. The 'lhs' raw may be
3063  resized depending upon the size of the 'rhs'.
3064  RETURNS:
3065  OCI_SUCCESS if the function completes successfully.
3066  OCI_INVALID_HANDLE if 'env' or 'err' is NULL.
3067  OCI_ERROR if
3068  out of space error
3069  */
3070 
3071 /*------------------------ OCIRawAssignBytes --------------------------------*/
3072 
3073 sword OCIRawAssignBytes( OCIEnv *env, OCIError *err, const ub1 *rhs,
3074  ub4 rhs_len, OCIRaw **lhs );
3075 /*
3076  NAME: OCIRawAssignBytes - OCIRaw Assign raw Bytes (of type ub1* ) to Raw
3077  (of type OCIRaw* )
3078  PARAMETERS:
3079  env (IN/OUT) - OCI environment handle initialized in object mode.
3080  err (IN/OUT) - error handle. If there is an error, it is
3081  recorded in 'err' and this function returns OCI_ERROR.
3082  The error recorded in 'err' can be retrieved by calling
3083  OCIErrorGet().
3084  rhs (IN) - RHS of the assignment, the type of rhs is ub1 *
3085  rhs_len (IN) - length of the 'rhs' raw
3086  lhs (IN/OUT) - LHS of the assignment
3087  DESCRIPTION:
3088  Assign 'rhs' raw to 'lhs' raw. The 'lhs' raw may be
3089  resized depending upon the size of the 'rhs'.
3090  RETURNS:
3091  OCI_SUCCESS if the function completes successfully.
3092  OCI_INVALID_HANDLE if 'env' or 'err' is NULL.
3093  OCI_ERROR if
3094  out of space error
3095  */
3096 
3097 /*---------------------------- OCIRawResize ---------------------------------*/
3098 
3099 sword OCIRawResize( OCIEnv *env, OCIError *err, ub4 new_size,
3100  OCIRaw **raw );
3101 /*
3102  NAME: OCIRawResize - OCIRaw ReSiZe memory of variable-length raw
3103  PARAMETERS:
3104  env (IN/OUT) - OCI environment handle initialized in object mode.
3105  err (IN/OUT) - error handle. If there is an error, it is
3106  recorded in 'err' and this function returns OCI_ERROR.
3107  The error recorded in 'err' can be retrieved by calling
3108  OCIErrorGet().
3109  new_size (IN) - new size of the raw data in bytes
3110  raw (IN) - variable-length raw pointer; the raw is
3111  resized to 'new_size'
3112  DESCRIPTION:
3113  This function resizes the memory of the given variable-length raw in
3114  the object cache.
3115  The previous contents of the raw are NOT preserved.
3116  This function may allocate the raw in a new memory region in
3117  which case the original memory occupied by the given raw will
3118  be freed. If the input raw is null (raw == NULL), then this
3119  function will allocate memory for the raw data.
3120 
3121  If the new_size is 0, then this function frees the memory occupied
3122  by 'raw' and a null pointer value is returned.
3123  RETURNS:
3124  OCI_SUCCESS if the function completes successfully.
3125  OCI_INVALID_HANDLE if 'env' or 'err' is NULL.
3126  OCI_ERROR if
3127  out of space error
3128  */
3129 
3130 /*------------------------------- OCIRawSize --------------------------------*/
3131 
3132 ub4 OCIRawSize( OCIEnv * env, const OCIRaw *raw );
3133 /*
3134  NAME: OCIRawSize - OCIRaw Get Raw siZe
3135  PARAMETERS:
3136  env (IN) - pointer to OCI environment handle
3137  raw (INT) - raw whose size is returned
3138  DESCRIPTION:
3139  Return the size of the given raw.
3140  RETURNS:
3141  size of the raw in bytes is returned
3142  */
3143 
3144 /*--------------------------------- OCIRawPtr -------------------------------*/
3145 ub1 *OCIRawPtr( OCIEnv * env, const OCIRaw *raw );
3146 /*
3147  NAME: OCIRawPtr - OCIRaw Get Raw data Pointer
3148  PARAMETERS:
3149  env (IN) - pointer to OCI environment handle
3150  raw (IN) - pointer to the data of this raw is returned
3151  DESCRIPTION:
3152  Return the pointer to the data of the given raw.
3153  RETURNS:
3154  pointer to the data of the raw is returned
3155  */
3156 
3157 /*------------------------------ OCIRawAllocSize ----------------------------*/
3158 
3159 sword OCIRawAllocSize( OCIEnv *env, OCIError *err, const OCIRaw *raw,
3160  ub4 *allocsize );
3161 /*
3162  NAME: OCIRawAllocSize - OCIRaw get Allocated SiZe of raw memory in bytes
3163  PARAMETERS:
3164  env (IN/OUT) - OCI environment handle initialized in object mode.
3165  err (IN/OUT) - error handle. If there is an error, it is
3166  recorded in 'err' and this function returns OCI_ERROR.
3167  The error recorded in 'err' can be retrieved by calling
3168  OCIErrorGet().
3169  raw (IN) - raw whose allocated size in bytes is returned
3170  allocsize (OUT) - allocated size of raw memory in bytes is returned
3171  DESCRIPTION:
3172  Return the allocated size of the raw memory in bytes. The
3173  allocated size is >= actual raw size.
3174  REQUIRES:
3175  raw is a non-null pointer
3176  RETURNS:
3177  OCI_SUCCESS if the function completes successfully.
3178  OCI_INVALID_HANDLE if 'env' or 'err' is NULL.
3179  OCI_ERROR upon error
3180  *)
3181 
3182 (*****************************************************************************
3183  * OBJECT REFERENCE OPERATIONS *
3184  *****************************************************************************)
3185 
3186 (*
3187  * See the definition of OCIRef in oro.h.
3188  *
3189  * For binding variables of type OCIRef* in OCI calls (OCIBindByName(),
3190  * OCIBindByPos() and OCIDefineByPos()) use the code SQLT_REF.
3191  *
3192  *)
3193 
3194 (*------------------------- OBJECT REFERENCE (REF) --------------------------*)
3195 
3196  PPOCIRef = ^POCIRef;
3197  POCIRef = Pointer;
3198 (*
3199  * OCIRef - OCI object REFerence
3200  *
3201  * In the Oracle object runtime environment, an object is identified by an
3202  * object reference (ref) which contains the object identifier plus other
3203  * runtime information. The contents of a ref is opaque to clients. Use
3204  * OCIObjectNew() to construct a ref.
3205  *)
3206 
3207 (*---------------------------- OCIRefClear ----------------------------------*)
3208  TOCIRefClear = procedure(env: POCIEnv; ref: POCIRef);
3209 (*
3210  NAME: OCIRefClear - OCIRef CLeaR or nullify a ref
3211  PARAMETERS:
3212  env (IN) - pointer to OCI environment handle
3213  ref (IN/OUT) - ref to clear
3214  DESCRIPTION:
3215  Clear or nullify the given ref. A ref is considered to be a null ref
3216  if it does not contain a valid OID (and thus doesn't point to an
3217  object). Logically, a null ref is a dangling ref.
3218 
3219  Note that a null ref is still a valid SQL value and is not SQL-ly null.
3220  It can be used as a valid non-null constant ref value for NOT NULL
3221  column or attribute of a row in a table.
3222 
3223  If a null pointer value is passed as a ref,
3224  then this function is a no-op.
3225  *)
3226 
3227 (*--------------------------- OCIRefAssign ----------------------------------*)
3228 
3229  TOCIRefAssign = function(env: POCIEnv; err: POCIError; const source: POCIRef;
3230  target: PPOCIRef): sword; cdecl;
3231 (*
3232  NAME: OCIRefAssign - OCIRef CoPY a ref to another
3233  PARAMETERS:
3234  env (IN/OUT) - OCI environment handle initialized in object mode.
3235  err (IN/OUT) - error handle. If there is an error, it is
3236  recorded in 'err' and this function returns OCI_ERROR.
3237  The error recorded in 'err' can be retrieved by calling
3238  OCIErrorGet().
3239  source (IN) - ref to copy from
3240  target (IN/OUT) - ref to copy to
3241  DESCRIPTION:
3242  Copy 'source' ref to 'target' ref; both then reference the same
3243  object. If the target ref pointer is null (i.e. *target == NULL)
3244  then the copy function will allocate memory for the target ref
3245  in OOCI heap prior to the copy.
3246  RETURNS:
3247  OCI_SUCCESS if the function completes successfully.
3248  OCI_INVALID_HANDLE if 'env' or 'err' is NULL.
3249  OCI_ERROR if
3250  1) out of memory
3251  */
3252 
3253 /*-------------------------- OCIRefIsEqual ----------------------------------*/
3254 boolean OCIRefIsEqual( OCIEnv *env, const OCIRef *x, const OCIRef *y );
3255 /*
3256  NAME: OCIRefIsEqual - OCIRef compare two refs for EQUality
3257  PARAMETERS:
3258  env (IN) - pointer to OCI environment handle
3259  x (IN) - ref to compare
3260  y (IN) - ref to compare
3261  DESCRIPTION:
3262  Compare the given refs for equality.
3263  Two refs are equal if and only if:
3264  - they are both referencing the same persistent object, or
3265  - they are both referencing the same transient object.
3266 
3267  NOTE THAT TWO NULL REFS ARE CONSIDERED NOT EQUAL BY THIS FUNCTION.
3268  RETURNS:
3269  TRUE if the two refs are equal
3270  FALSE if the two refs are not equal, or X is NULL, or Y is NULL
3271  */
3272 
3273 /*--------------------------- OCIRefIsNull ----------------------------------*/
3274 boolean OCIRefIsNull( OCIEnv *env, const OCIRef *ref );
3275 /*
3276  NAME: OCIRefIsNull - OCIRef test if a ref is NULl
3277  PARAMETERS:
3278  env (IN) - pointer to OCI environment handle
3279  ref (IN) - ref to test for null
3280  DESCRIPTION:
3281  Return TRUE if the given ref is null; otherwise, return FALSE.
3282  A ref is null if and only if:
3283  - it is supposed to be referencing a persistent object, but
3284  its OID is null, or
3285  - it is supposed to be referencing a transient object, but it is
3286  currently not pointing to an object.
3287  A ref is a dangling ref if the object that it points to does not
3288  exist.
3289  RETURNS:
3290  TRUE if the given ref is NULL
3291  FALSE if the given ref is not NULL
3292  */
3293 
3294 /*-------------------------- OCIRefHexSize ----------------------------------*/
3295 ub4 OCIRefHexSize( OCIEnv *env, const OCIRef *ref );
3296 /*
3297  NAME: OCIRefHexSize - OCIRef Hexadecimal buffer SiZe in bytes
3298  PARAMETERS:
3299  env (IN) - pointer to OCI environment handle
3300  ref (IN) - ref whose size in hexadecimal representation in bytes is
3301  returned
3302  DESCRIPTION:
3303  Return the size of the buffer in bytes required for the hexadecimal
3304  representation of the ref. A buffer of at-least this size must be
3305  passed to ref-to-hex (OCIRefToHex) conversion function.
3306  RETURNS:
3307  size of hexadecimal representation of ref
3308  */
3309 
3310 /*-------------------------- OCIRefFromHex ---------------------------------*/
3311 sword OCIRefFromHex( OCIEnv *env, OCIError *err, const OCISvcCtx *svc,
3312  const oratext *hex, ub4 length, OCIRef **ref );
3313 /*
3314  NAME:
3315  OCIRefFromHex - OCIRef convert a Hexadecimal string TO a Ref
3316  PARAMETERS:
3317  env (IN/OUT) - OCI environment handle initialized in object mode
3318  err (IN/OUT) - error handle. If there is an error, it is
3319  recorded in 'err' and this function returns OCI_ERROR.
3320  The error recorded in 'err' can be retrieved by
3321  calling OCIErrorGet().
3322  svc (IN) - OCI service context handle; if the resulting ref is
3323  initialized with this service context
3324  hex (IN) - hexadecimal string (that was produced by 'OCIRefToHex()"
3325  previously) to be convert into a ref
3326  length (IN) - length of the hexadecimal string
3327  ref (IN/OUT) - ref is initialized with the given value ('hex').
3328  If *ref is null, then space for the ref is allocated in the
3329  object cache, otherwise the memory occupied by the given ref
3330  is re-used.
3331  DESCRIPTION:
3332  Convert the given hexadecimal string into a ref. This function
3333  ensures that the resulting ref is well formed. It does NOT ensure
3334  that the object pointed to by the resulting ref exists or not.
3335  RETURNS:
3336  OCI_SUCCESS if the function completes successfully.
3337  OCI_INVALID_HANDLE if 'env' or 'err' is NULL.
3338  OCI_ERROR if
3339  */
3340 
3341 /*--------------------------- OCIRefToHex -----------------------------------*/
3342 sword OCIRefToHex( OCIEnv *env, OCIError *err, const OCIRef *ref,
3343  oratext *hex, ub4 *hex_length );
3344 /*
3345  NAME:
3346  OCIRefToHex - OCIRef convert ref to a Hexadecimal string
3347  PARAMETERS:
3348  env (IN/OUT) - OCI environment handle initialized in object mode
3349  err (IN/OUT) - error handle. If there is an error, it is
3350  recorded in 'err' and this function returns OCI_ERROR.
3351  The error recorded in 'err' can be retrieved by
3352  calling OCIErrorGet().
3353  ref (IN) - ref to be converted into a hexadecimal string; if the
3354  ref is a null ref (i.e. OCIRefIsNull(ref) == TRUE) then
3355  a zero hex_length value is returned
3356  hex (OUT) - buffer that is large enough to contain the resulting
3357  hexadecimal string; the contents of the string is opaque
3358  to the caller
3359  hex_length (IN/OUT) - on input specifies the size of the 'hex' buffer,
3360  on output specifies the actual size of the hexadecimal
3361  string being returned in 'hex'
3362  DESCRIPTION:
3363  Convert the given ref into a hexadecimal string, and return the length
3364  of the string. The resulting string is opaque to the caller.
3365  RETURNS:
3366  OCI_SUCCESS if the function completes successfully.
3367  OCI_INVALID_HANDLE if 'env' or 'err' is NULL.
3368  OCI_ERROR if
3369  the given buffer is not big enough to hold the resulting string
3370  */
3371 
3372 
3373 /*****************************************************************************/
3374 /* COLLECTION FUNCTIONS */
3375 /*****************************************************************************/
3376 
3377 /*
3378  The generic collection is represented by the type 'OCIColl'. The following
3379  operations OCIColl*() are provided on a generic collection:
3380  - get current size of collection
3381  - get upper bound of collection
3382  - get pointer to an element given its index
3383  - set element at given index (assign element)
3384  - append an element
3385  - trim the given number of elements from the end of the collection
3386  - collection assignment
3387 
3388  The following iterator based scanning functions are also provided on a
3389  generic collection. These functions make use of an iterator which is
3390  defined to be of type OCIIter.
3391 
3392  - create an iterator for scanning collection
3393  - destroy iterator
3394  - reset iterator to the beginning of collection
3395  - get pointer to current element pointed by iterator
3396  - get pointer to next element
3397  - get pointer to previous element
3398 
3399  The collections variable-length array (varray) and nested table
3400  are sub-types of generic collection. This means that the OCIColl*()
3401  functions can also be used to manipulate varray and nested table.
3402 
3403  The varray is represented by OCIArray type and nested table by OCITable.
3404  Besides OCIColl*() functions no additional functions are provided for
3405  manipulating varrays. The OCIColl*() functions are a complete set of
3406  functions to manipulate varrays.
3407 
3408  Besides OCIColl*() functions, the following functions OCITable*() can be
3409  used to manipulate nested table. The OCITable*() functions operate on
3410  nested tables only and should not be used on a varray.
3411 
3412  - delete an element at index i. Note that the position
3413  ordinals of the remaining elements of the table is not changed by the
3414  delete operation. So delete creates "holes" in the table.
3415  - check if an element exists at the given index i
3416  - return the smallest value of i for which exists(i) is true
3417  - return the largest value of i for which exists(i) is true
3418  - return pointer to the smallest position j, greater than i, such that
3419  OCITableExists(j) is true
3420  - return pointer to the largest position j, less than i, such that
3421  OCITableExists(j) is true
3422 
3423  For binding variables of type OCIColl* or OCITable* in OCI calls
3424  (OCIBindByName(), OCIBindByPos() and OCIDefineByPos()) use the external
3425  type code SQLT_NTY.
3426  */
3427 
3428 /* OCIColl - generic collection type */
3429 typedef struct OCIColl OCIColl;
3430 
3431 /* OCIArray - varray collection type */
3432 typedef OCIColl OCIArray;
3433 
3434 /* OCITable - nested table collection type */
3435 typedef OCIColl OCITable;
3436 
3437 /* OCIIter - collection iterator */
3438 typedef struct OCIIter OCIIter;
3439 
3440 /*----------------------------- OCICollSize ---------------------------------*/
3441 
3442 sword OCICollSize( OCIEnv *env, OCIError *err, const OCIColl *coll,
3443  sb4 *size );
3444 /*
3445  NAME: OCICollSize - OCIColl return current SIZe of the given collection
3446  PARAMETERS:
3447  env(IN) - pointer to OCI environment handle
3448  err (IN/OUT) - error handle. If there is an error, it is
3449  recorded in 'err' and this function returns OCI_ERROR.
3450  The error recorded in 'err' can be retrieved by calling
3451  OCIErrorGet().
3452  coll (IN) - collection whose number of elements is returned
3453  size (OUT) - current number of elements in the collection
3454  DESCRIPTION:
3455  Returns the current number of elements in the given collection.
3456 
3457  For collections of type nested table wherein 'delete element'
3458  operation is allowed, the count returned by OCICollSize() will
3459  NOT be decremented upon deleting elements. For example:
3460 
3461  OCICollSize(...);
3462  // assume 'size' returned is equal to 5
3463  OCITableDelete(...); // delete one element
3464  OCICollSize(...);
3465  // 'size' returned will still be 5
3466 
3467  To get the count minus the deleted elements use OCITableSize().
3468  Continuing the above example,
3469 
3470  OCITableSize(...)
3471  // 'size' returned will be equal to 4
3472 
3473  Note, a trim operation (OCICollTrim) will decrement the count
3474  by the number of trimmed elements. Continuing the above example,
3475 
3476  OCICollTrim(..,1..); // trim one element
3477  OCICollSize(...);
3478  // 'size' returned will be equal to 4
3479  RETURNS:
3480  OCI_SUCCESS if the function completes successfully.
3481  OCI_INVALID_HANDLE if 'env' or 'err' is NULL.
3482  OCI_ERROR if
3483  error during loading of collection into object cache
3484  any of the input parameters is null
3485  */
3486 
3487 /*------------------------------ OCICollMax ---------------------------------*/
3488 
3489 sb4 OCICollMax( OCIEnv *env, const OCIColl *coll );
3490 /*
3491  NAME: OCICollMax - OCIColl return MAXimum size (upper-bound) of the
3492  given collection (in number of elements)
3493  PARAMETERS:
3494  env(IN) - pointer to OCI environment handle
3495  coll (IN) - collection whose upper-bound in number of elements
3496  is returned
3497  DESCRIPTION:
3498  Returns the max number of elements that the given collection can hold.
3499  A value 0 indicates that the collection has no upper-bound.
3500  REQUIRES:
3501  coll must point to a valid collection descriptor
3502  RETURNS:
3503  upper-bound of the given collection
3504  */
3505 
3506 /*-------------------------- OCICollGetElem ---------------------------------*/
3507 
3508 sword OCICollGetElem( OCIEnv *env, OCIError *err, const OCIColl *coll,
3509  sb4 index, boolean *exists, void **elem,
3510  void **elemind );
3511 /*
3512  NAME: OCICollGetElem - OCIColl GET pointer to the element at the given index
3513  PARAMETERS:
3514  env (IN/OUT) - OCI environment handle initialized in object mode.
3515  err (IN/OUT) - error handle. If there is an error, it is
3516  recorded in 'err' and this function returns OCI_ERROR.
3517  The error recorded in 'err' can be retrieved by calling
3518  OCIErrorGet().
3519  coll (IN) - pointer to the element in this collection is returned
3520  index (IN) - index of the element whose pointer is returned
3521  exists (OUT) - set to FALSE if element at the specified index does
3522  not exist else TRUE
3523  elem (OUT) - address of the desired element is returned
3524  elemind (OUT) [optional] - address of the null indicator information
3525  is returned; if (elemind == NULL) then the null indicator
3526  information will NOT be returned
3527  DESCRIPTION:
3528  Get the address of the element at the given position. Optionally
3529  this function also returns the address of the element's null indicator
3530  information.
3531 
3532  The following table describes for each collection element type
3533  what the corresponding element pointer type is. The element pointer
3534  is returned via the 'elem' parameter of OCICollGetElem().
3535 
3536  Element Type *elem is set to
3537  ----------------------- ---------------
3538  Oracle Number (OCINumber) OCINumber*
3539  Date (OCIDate) OCIDate*
3540  Variable-length string (OCIString* ) OCIString**
3541  Variable-length raw (OCIRaw* ) OCIRaw**
3542  object reference (OCIRef* ) OCIRef**
3543  lob locator (OCILobLocator* ) OCILobLocator**
3544  object type (e.g. person) person*
3545 
3546  The element pointer returned by OCICollGetElem() is in a form
3547  such that it can not only be used to access the
3548  element data but also is in a form that can be used as the target
3549  (i.e left-hand-side) of an assignment statement.
3550 
3551  For example, assume the user is iterating over the elements of
3552  a collection whose element type is object reference (OCIRef* ). A call
3553  to OCICollGetElem() returns pointer to a reference handle
3554  (i.e. OCIRef** ). After getting, the pointer to the collection
3555  element, the user may wish to modify it by assigning a new reference.
3556  This can be accomplished via the ref assignment function shown below:
3557 
3558  sword OCIRefAssign( OCIEnv *env, OCIError *err, const OCIRef *source,
3559  OCIRef **target );
3560 
3561  Note that the 'target' parameter of OCIRefAssign() is of type
3562  'OCIRef**'. Hence OCICollGetElem() returns 'OCIRef**'.
3563  If '*target == NULL' a new ref will be allocated by OCIRefAssign()
3564  and returned via the 'target' parameter.
3565 
3566  Similarly, if the collection element was of type string (OCIString* ),
3567  OCICollGetElem() returns pointer to string handle
3568  (i.e. OCIString** ). If a new string is assigned, via
3569  OCIStringAssign() or OCIStringAssignText() the type of the target
3570  must be 'OCIString **'.
3571 
3572  If the collection element is of type Oracle number, OCICollGetElem()
3573  returns OCINumber*. The prototype of OCINumberAssign() is shown below:
3574 
3575  sword OCINumberAssign(OCIError *err, const OCINumber *from,
3576  OCINumber *to);
3577  RETURNS:
3578  OCI_SUCCESS if the function completes successfully.
3579  OCI_INVALID_HANDLE if 'env' or 'err' is NULL.
3580  OCI_ERROR if
3581  any of the input parameters is null
3582  */
3583 
3584 /*------------------------- OCICollGetElemArray -----------------------------*/
3585 
3586 sword OCICollGetElemArray( OCIEnv *env, OCIError *err, const OCIColl *coll,
3587  sb4 index, boolean *exists, void **elem,
3588  void **elemind, uword *nelems);
3589 /*
3590  NAME: OCICollGetElemArray - OCIColl GET pointers to elements from given index
3591  PARAMETERS:
3592  env (IN/OUT) - OCI environment handle initialized in object mode.
3593  err (IN/OUT) - error handle. If there is an error, it is
3594  recorded in 'err' and this function returns OCI_ERROR.
3595  The error recorded in 'err' can be retrieved by calling
3596  OCIErrorGet().
3597  coll (IN) - pointers to the elements in this collection is returned
3598  index (IN) - starting index of the element
3599  exists (OUT) - set to FALSE if element at the specified index does
3600  not exist else TRUE
3601  elem (OUT) - address of the desired elements is returned
3602  elemind (OUT) [optional] - address of the null indicators information
3603  is returned; if (elemind == NULL) then the null indicator
3604  information will NOT be returned
3605  nelems(IN/OUT) - Upper bound of elem and/or elemind array
3606  DESCRIPTION:
3607  Get the address of the elements from the given position. Optionally
3608  this function also returns the address of the element's null indicator
3609  information.
3610 
3611  The following table describes for each collection element type
3612  what the corresponding element pointer type is. The element pointer
3613  is returned via the 'elem' parameter of OCICollGetElem().
3614 
3615  Element Type *elem is set to
3616  ----------------------- ---------------
3617  Oracle Number (OCINumber) OCINumber*
3618  Date (OCIDate) OCIDate*
3619  Variable-length string (OCIString* ) OCIString**
3620  Variable-length raw (OCIRaw* ) OCIRaw**
3621  object reference (OCIRef* ) OCIRef**
3622  lob locator (OCILobLocator* ) OCILobLocator**
3623  object type (e.g. person) person*
3624 
3625  The element pointer returned by OCICollGetElem() is in a form
3626  such that it can not only be used to access the
3627  element data but also is in a form that can be used as the target
3628  (i.e left-hand-side) of an assignment statement.
3629 
3630  For example, assume the user is iterating over the elements of
3631  a collection whose element type is object reference (OCIRef* ). A call
3632  to OCICollGetElem() returns pointer to a reference handle
3633  (i.e. OCIRef** ). After getting, the pointer to the collection
3634  element, the user may wish to modify it by assigning a new reference.
3635  This can be accomplished via the ref assignment function shown below:
3636 
3637  sword OCIRefAssign( OCIEnv *env, OCIError *err, const OCIRef *source,
3638  OCIRef **target );
3639 
3640  Note that the 'target' parameter of OCIRefAssign() is of type
3641  'OCIRef**'. Hence OCICollGetElem() returns 'OCIRef**'.
3642  If '*target == NULL' a new ref will be allocated by OCIRefAssign()
3643  and returned via the 'target' parameter.
3644 
3645  Similarly, if the collection element was of type string (OCIString* ),
3646  OCICollGetElem() returns pointer to string handle
3647  (i.e. OCIString** ). If a new string is assigned, via
3648  OCIStringAssign() or OCIStringAssignText() the type of the target
3649  must be 'OCIString **'.
3650 
3651  If the collection element is of type Oracle number, OCICollGetElem()
3652  returns OCINumber*. The prototype of OCINumberAssign() is shown below:
3653 
3654  sword OCINumberAssign(OCIError *err, const OCINumber *from,
3655  OCINumber *to);
3656  RETURNS:
3657  OCI_SUCCESS if the function completes successfully.
3658  OCI_INVALID_HANDLE if 'env' or 'err' is NULL.
3659  OCI_ERROR if
3660  any of the input parameters is null
3661  */
3662 
3663 /*----------------------- OCICollAssignElem ---------------------------------*/
3664 
3665 sword OCICollAssignElem( OCIEnv *env, OCIError *err, sb4 index,
3666  const void *elem,
3667  const void *elemind, OCIColl *coll );
3668 /*
3669  NAME: OCICollAssignElem - OCIColl ASsign Element
3670  PARAMETERS:
3671  env (IN/OUT) - OCI environment handle initialized in object mode.
3672  err (IN/OUT) - error handle. If there is an error, it is
3673  recorded in 'err' and this function returns OCI_ERROR.
3674  The error recorded in 'err' can be retrieved by calling
3675  OCIErrorGet().
3676  index (IN) - index of the element whose is assigned to
3677  elem (IN) - element which is assigned from (source element)
3678  elemind (IN) [optional] - pointer to the element's null indicator
3679  information; if (elemind == NULL) then the null indicator
3680  information of the assigned element will be set to non-null.
3681  coll (IN/OUT) - collection to be updated
3682  DESCRIPTION:
3683  Assign the given element value 'elem' to the element at coll[index].
3684  If the collection is of type nested table, the element at the given
3685  index may not exist (i.e. may have been deleted). In this case, the
3686  given element is inserted at index 'index'.
3687  Otherwise, the element at index 'index' is updated with the value
3688  of 'elem'.
3689 
3690  Note that the given element is deep-copied and
3691  'elem' is strictly an input parameter.
3692  RETURNS:
3693  OCI_SUCCESS if the function completes successfully.
3694  OCI_INVALID_HANDLE if 'env' or 'err' is NULL.
3695  OCI_ERROR if
3696  any of the input parameters is null
3697  out of memory error
3698  given index is out of bounds of the given collection
3699  */
3700 
3701 /*--------------------------- OCICollAssign ---------------------------------*/
3702 
3703 sword OCICollAssign( OCIEnv *env, OCIError *err, const OCIColl *rhs,
3704  OCIColl *lhs );
3705 /*
3706  NAME: OCICollAssign - OCIColl ASsiGn collection
3707  PARAMETERS:
3708  env (IN/OUT) - OCI environment handle initialized in object mode.
3709  err (IN/OUT) - error handle. If there is an error, it is
3710  recorded in 'err' and this function returns OCI_ERROR.
3711  The error recorded in 'err' can be retrieved by calling
3712  OCIErrorGet().
3713  rhs (IN) - collection to be assigned from
3714  lhs (OUT) - collection to be assigned to
3715  DESCRIPTION:
3716  Assign 'rhs' to 'lhs'. The 'lhs' collection may be decreased or
3717  increased depending upon the size of 'rhs'. If the 'lhs' contains
3718  any elements then the elements will be deleted prior to the
3719  assignment. This function performs a deep-copy. The memory for the
3720  elements comes from the object cache.
3721 
3722  An error is returned if the element types of the lhs and rhs
3723  collections do not match. Also, an error is returned if the
3724  upper-bound of the lhs collection is less than the current number of
3725  elements in the rhs collection.
3726  RETURNS:
3727  OCI_SUCCESS if the function completes successfully.
3728  OCI_INVALID_HANDLE if 'env' or 'err' is NULL.
3729  OCI_ERROR if
3730  any of the input parameters is null
3731  out of memory error
3732  type mis-match of lhs and rhs collections
3733  upper-bound of lhs collection is less than the current number of
3734  elements in the rhs collection
3735  */
3736 
3737 /*--------------------------- OCICollAppend ---------------------------------*/
3738 
3739 sword OCICollAppend( OCIEnv *env, OCIError *err, const void *elem,
3740  const void *elemind, OCIColl *coll );
3741 /*
3742  NAME: OCICollAppend - OCIColl APPend collection
3743  PARAMETERS:
3744  env (IN/OUT) - OCI environment handle initialized in object mode.
3745  err (IN/OUT) - error handle. If there is an error, it is
3746  recorded in 'err' and this function returns OCI_ERROR.
3747  The error recorded in 'err' can be retrieved by calling
3748  OCIErrorGet().
3749  elem (IN) - pointer to the element which is appended to the end
3750  of the given collection
3751  elemind (IN) [optional] - pointer to the element's null indicator
3752  information; if (elemind == NULL) then the null indicator
3753  information of the appended element will be set to non-null.
3754  coll (IN/OUT) - updated collection
3755  DESCRIPTION:
3756  Append the given element to the end of the given collection.
3757  Appending an element is equivalent to:
3758  - increasing the size of the collection by 1 element
3759  - updating (deep-copying) the last element's data with the given
3760  element's data
3761 
3762  Note that the pointer to the given element 'elem' will not be saved
3763  by this function. So 'elem' is strictly an input parameter.
3764  An error is returned if the current size of the collection
3765  is equal to the max size (upper-bound) of the collection prior to
3766  appending the element.
3767  RETURNS:
3768  OCI_SUCCESS if the function completes successfully.
3769  OCI_INVALID_HANDLE if 'env' or 'err' is NULL.
3770  OCI_ERROR if
3771  any of the input parameters is null
3772  out of memory error
3773  current size of collection == max size of the collection
3774  */
3775 
3776 /*----------------------------- OCICollTrim ---------------------------------*/
3777 
3778 sword OCICollTrim( OCIEnv *env, OCIError *err, sb4 trim_num,
3779  OCIColl *coll );
3780 /*
3781  NAME: OCICollTrim - OCIColl Trim elements from the end of the collection
3782  PARAMETERS:
3783  env (IN/OUT) - OCI environment handle initialized in object mode.
3784  err (IN/OUT) - error handle. If there is an error, it is
3785  recorded in 'err' and this function returns OCI_ERROR.
3786  The error recorded in 'err' can be retrieved by calling
3787  OCIErrorGet().
3788  trim_num (IN) - number of elements to trim
3789  coll (IN/OUT) - 'trim_num' of elements are removed (freed) from the
3790  end of the collection
3791  DESCRIPTION:
3792  Trim the collection by the given number of elements. The elements are
3793  removed from the end of the collection.
3794 
3795  An error is returned if the 'trim_num' is greater than the current
3796  size of the collection.
3797  RETURNS:
3798  OCI_SUCCESS if the function completes successfully.
3799  OCI_INVALID_HANDLE if 'env' or 'err' is NULL.
3800  OCI_ERROR if
3801  any of the input parameters is null
3802  'trim_num' is greater than the current size of the collection.
3803  */
3804 
3805 /*--------------------------- OCICollIsLocator ------------------------------*/
3806 
3807 sword OCICollIsLocator(OCIEnv *env, OCIError *err, const OCIColl *coll,
3808  boolean *result );
3809 /*
3810 Name: OCICollIsLocator - OCIColl indicates whether a collection is locator
3811  based or not.
3812 Parameters:
3813  env(IN) - pointer to OCI environment handle
3814  err (IN/OUT) - error handle. If there is an error, it is
3815  recorded in 'err' and this function returns OCI_ERROR.
3816  The error recorded in 'err' can be retrieved by calling
3817  OCIErrorGet().
3818  coll (IN) - collection item.
3819  result (OUT) - TRUE if the collection item is a locator, FALSE
3820  otherwise
3821 Description:
3822  Returns TRUE in the result OUT parameter if the collection item is a
3823  locator, otherwise returns FALSE.
3824 Returns:
3825  OCI_SUCCESS if the function completes successfully.
3826  OCI_INVALID_HANDLE if 'env' or 'err' is NULL.
3827 */
3828 
3829 /*---------------------------- OCIIterCreate --------------------------------*/
3830 
3831 sword OCIIterCreate( OCIEnv *env, OCIError *err, const OCIColl *coll,
3832  OCIIter **itr );
3833 /*
3834  NAME: OCIIterCreate - OCIColl Create an ITerator to scan the collection
3835  elements
3836  PARAMETERS:
3837  env (IN/OUT) - OCI environment handle initialized in object mode.
3838  err (IN/OUT) - error handle. If there is an error, it is
3839  recorded in 'err' and this function returns OCI_ERROR.
3840  The error recorded in 'err' can be retrieved by calling
3841  OCIErrorGet().
3842  coll (IN) - collection which will be scanned; the different
3843  collection types are varray and nested table
3844  itr (OUT) - address to the allocated collection iterator is
3845  returned by this function
3846  DESCRIPTION:
3847  Create an iterator to scan the elements of the collection. The
3848  iterator is created in the object cache. The iterator is initialized
3849  to point to the beginning of the collection.
3850 
3851  If the next function (OCIIterNext) is called immediately
3852  after creating the iterator then the first element of the collection
3853  is returned.
3854  If the previous function (OCIIterPrev) is called immediately after
3855  creating the iterator then "at beginning of collection" error is
3856  returned.
3857  RETURNS:
3858  OCI_SUCCESS if the function completes successfully.
3859  OCI_INVALID_HANDLE if 'env' or 'err' is NULL.
3860  OCI_ERROR if
3861  any of the input parameters is null
3862  out of memory error
3863  */
3864 
3865 /*----------------------------- OCIIterDelete ------------------------------*/
3866 
3867 sword OCIIterDelete( OCIEnv *env, OCIError *err, OCIIter **itr );
3868 /*
3869  NAME: OCIIterDelete - OCIColl Delete ITerator
3870  PARAMETERS:
3871  env (IN/OUT) - OCI environment handle initialized in object mode.
3872  err (IN/OUT) - error handle. If there is an error, it is
3873  recorded in 'err' and this function returns OCI_ERROR.
3874  The error recorded in 'err' can be retrieved by calling
3875  OCIErrorGet().
3876  itr (IN/OUT) - the allocated collection iterator is destroyed and
3877  the 'itr' is set to NULL prior to returning
3878  DESCRIPTION:
3879  Delete the iterator which was previously created by a call to
3880  OCIIterCreate.
3881  RETURNS:
3882  OCI_SUCCESS if the function completes successfully.
3883  OCI_INVALID_HANDLE if 'env' or 'err' is NULL.
3884  OCI_ERROR if
3885  any of the input parameters is null
3886  to be discovered
3887  */
3888 
3889 /*----------------------------- OCIIterInit ---------------------------------*/
3890 
3891 sword OCIIterInit( OCIEnv *env, OCIError *err, const OCIColl *coll,
3892  OCIIter *itr );
3893 /*
3894  NAME: OCIIterInit - OCIColl Initialize ITerator to scan the given
3895  collection
3896  PARAMETERS:
3897  env (IN/OUT) - OCI environment handle initialized in object mode.
3898  err (IN/OUT) - error handle. If there is an error, it is
3899  recorded in 'err' and this function returns OCI_ERROR.
3900  The error recorded in 'err' can be retrieved by calling
3901  OCIErrorGet().
3902  coll (IN) - collection which will be scanned; the different
3903  collection types are varray and nested table
3904  itr (IN/OUT) - pointer to an allocated collection iterator
3905  DESCRIPTION:
3906  Initializes the given iterator to point to the beginning of the
3907  given collection. This function can be used to:
3908 
3909  a. reset an iterator to point back to the beginning of the collection
3910  b. reuse an allocated iterator to scan a different collection
3911  RETURNS:
3912  OCI_SUCCESS if the function completes successfully.
3913  OCI_INVALID_HANDLE if 'env' or 'err' is NULL.
3914  OCI_ERROR if
3915  any of the input parameters is null
3916  *)
3917 
3918 (*------------------------ OCIIterGetCurrent --------------------------------*)
3919 
3920  TOCIIterGetCurrent = function(hndl: POCIEnv; err: POCIError; itr: POCIIter;
3921  elem: PPointer; elemind: PPointer): sword; cdecl;
3922 (*
3923  NAME: OCIIterGetCurrent - OCIColl Iterator based, get CURrent collection
3924  element
3925  PARAMETERS:
3926  env (IN/OUT) - OCI environment handle initialized in object mode.
3927  err (IN/OUT) - error handle. If there is an error, it is
3928  recorded in 'err' and this function returns OCI_ERROR.
3929  The error recorded in 'err' can be retrieved by calling
3930  OCIErrorGet().
3931  itr (IN) - iterator which points to the current element
3932  elem (OUT) - address of the element pointed by the iterator is returned
3933  elemind (OUT) [optional] - address of the element's null indicator
3934  information is returned; if (elemind == NULL) then the null
3935  indicator information will NOT be returned
3936  DESCRIPTION:
3937  Returns pointer to the current element and its corresponding null
3938  information.
3939  RETURNS:
3940  OCI_SUCCESS if the function completes successfully.
3941  OCI_INVALID_HANDLE if 'env' or 'err' is NULL.
3942  OCI_ERROR if
3943  any of the input parameters is null
3944  *)
3945 
3946 (*------------------------------ OCIIterNext --------------------------------*)
3947 
3948  TOCIIterNext = function(hndl: POCIEnv; err: POCIError; itr: POCIIter;
3949  elem: PPointer; elemind: PPointer; eoc: PBoolean): sword; cdecl;
3950 (*
3951  NAME: OCIIterNext - OCIColl Iterator based, get NeXT collection element
3952  PARAMETERS:
3953  env (IN/OUT) - OCI environment handle initialized in object mode.
3954  err (IN/OUT) - error handle. If there is an error, it is
3955  recorded in 'err' and this function returns OCI_ERROR.
3956  The error recorded in 'err' can be retrieved by calling
3957  OCIErrorGet().
3958  itr (IN/OUT) - iterator is updated to point to the next element
3959  elem (OUT) - after updating the iterator to point to the next element,
3960  address of the element is returned
3961  elemind (OUT) [optional] - address of the element's null indicator
3962  information is returned; if (elemind == NULL) then the null
3963  indicator information will NOT be returned
3964  eoc (OUT) - TRUE if iterator is at End Of Collection (i.e. next
3965  element does not exist) else FALSE
3966  DESCRIPTION:
3967  Returns pointer to the next element and its corresponding null
3968  information. The iterator is updated to point to the next element.
3969 
3970  If the iterator is pointing to the last element of the collection
3971  prior to executing this function, then calling this function will
3972  set eoc flag to TRUE. The iterator will be left unchanged in this
3973  situation.
3974  RETURNS:
3975  OCI_SUCCESS if the function completes successfully.
3976  OCI_INVALID_HANDLE if 'env' or 'err' is NULL.
3977  OCI_ERROR if
3978  any of the input parameters is null
3979  *)
3980 
3981 (*------------------------------ OCIIterPrev --------------------------------*)
3982 
3983  TOCIIterPrev = function(hndl: POCIEnv; err: POCIError; itr: POCIIter;
3984  elem: PPointer; elemind: PPointer; boc: PBoolean): sword; cdecl;
3985 (*
3986  NAME: OCIIterPrev - OCIColl Iterator based, get PReVious collection element
3987  PARAMETERS:
3988  env (IN/OUT) - OCI environment handle initialized in object mode.
3989  err (IN/OUT) - error handle. If there is an error, it is
3990  recorded in 'err' and this function returns OCI_ERROR.
3991  The error recorded in 'err' can be retrieved by calling
3992  OCIErrorGet().
3993  itr (IN/OUT) - iterator is updated to point to the previous
3994  element
3995  elem (OUT) - after updating the iterator to point to the previous
3996  element, address of the element is returned
3997  elemind (OUT) [optional] - address of the element's null indicator
3998  information is returned; if (elemind == NULL) then the null
3999  indicator information will NOT be returned
4000  boc (OUT) - TRUE if iterator is at Beginning Of Collection (i.e.
4001  previous element does not exist) else FALSE.
4002  DESCRIPTION:
4003  Returns pointer to the previous element and its corresponding null
4004  information. The iterator is updated to point to the previous element.
4005 
4006  If the iterator is pointing to the first element of the collection
4007  prior to executing this function, then calling this function will
4008  set 'boc' to TRUE. The iterator will be left unchanged in this
4009  situation.
4010  RETURNS:
4011  OCI_SUCCESS if the function completes successfully.
4012  OCI_INVALID_HANDLE if 'env' or 'err' is NULL.
4013  OCI_ERROR if
4014  any of the input parameters is null
4015  *)
4016 (*****************************************************************************
4017  * FUNCTIONS WHICH OPERATE ONLY ON NESTED TABLE OCITable*() *
4018  *****************************************************************************
4019 
4020  *---------------------------- OCITableSize ---------------------------------*)
4021 
4022  TOCITableSize = function(hndl: POCIEnv; err: POCIError; const tbl: POCITable;
4023  size: psb4): sword; cdecl;
4024 (*
4025  NAME: OCITableSize - OCITable return current SIZe of the given
4026  nested table (not including deleted elements)
4027  PARAMETERS:
4028  env(IN) - pointer to OCI environment handle
4029  err (IN/OUT) - error handle. If there is an error, it is
4030  recorded in 'err' and this function returns OCI_ERROR.
4031  The error recorded in 'err' can be retrieved by calling
4032  OCIErrorGet().
4033  tbl (IN) - nested table whose number of elements is returned
4034  size (OUT) - current number of elements in the nested table. The count
4035  does not include deleted elements.
4036  DESCRIPTION:
4037  Returns the count of elements in the given nested table.
4038 
4039  The count returned by OCITableSize() will be decremented upon
4040  deleting elements from the nested table. So, this count DOES NOT
4041  includes any "holes" created by deleting elements.
4042  For example:
4043 
4044  OCITableSize(...);
4045  // assume 'size' returned is equal to 5
4046  OCITableDelete(...); // delete one element
4047  OCITableSize(...);
4048  // 'size' returned will be equal to 4
4049 
4050  To get the count plus the count of deleted elements use
4051  OCICollSize(). Continuing the above example,
4052 
4053  OCICollSize(...)
4054  // 'size' returned will still be equal to 5
4055  RETURNS:
4056  OCI_SUCCESS if the function completes successfully.
4057  OCI_INVALID_HANDLE if 'env' or 'err' is NULL.
4058  OCI_ERROR if
4059  error during loading of nested table into object cache
4060  any of the input parameters is null
4061  *)
4062 
4063 (*---------------------- OCITableExists ---------------------------------*)
4064 
4065  TOCITableExists = function(hndl: POCIEnv; err: POCIError; const tbl: POCITable;
4066  index: sb4; exists: PBoolean): sword; cdecl;
4067 (*
4068  NAME: OCITableExists - OCITable test whether element at the given index
4069  EXIsts
4070  PARAMETERS:
4071  env (IN/OUT) - OCI environment handle initialized in object mode.
4072  err (IN/OUT) - error handle. If there is an error, it is
4073  recorded in 'err' and this function returns OCI_ERROR.
4074  The error recorded in 'err' can be retrieved by calling
4075  OCIErrorGet().
4076  tbl (IN) - table in which the given index is checked
4077  index (IN) - index of the element which is checked for existence
4078  exists (OUT) - set to TRUE if element at given 'index' exists
4079  else set to FALSE
4080  DESCRIPTION:
4081  Test whether an element exists at the given 'index'.
4082  RETURNS:
4083  OCI_SUCCESS if the function completes successfully.
4084  OCI_INVALID_HANDLE if 'env' or 'err' is NULL.
4085  OCI_ERROR if
4086  any of the input parameters is null
4087  *)
4088 
4089 (*--------------------------- OCITableDelete -------------------------------*)
4090 
4091  TOCITableDelete = function(hndl: POCIEnv; err: POCIError; index: sb4;
4092  tbl: POCITable): sword; cdecl;
4093 (*
4094  NAME: OCITableDelete - OCITable DELete element at the specified index
4095  PARAMETERS:
4096  env (IN/OUT) - OCI environment handle initialized in object mode.
4097  err (IN/OUT) - error handle. If there is an error, it is
4098  recorded in 'err' and this function returns OCI_ERROR.
4099  The error recorded in 'err' can be retrieved by calling
4100  OCIErrorGet().
4101  index (IN) - index of the element which must be deleted
4102  tbl (IN) - table whose element is deleted
4103  DESCRIPTION:
4104  Delete the element at the given 'index'. Note that the position
4105  ordinals of the remaining elements of the table is not changed by the
4106  delete operation. So delete creates "holes" in the table.
4107 
4108  An error is returned if the element at the specified 'index' has
4109  been previously deleted.
4110  RETURNS:
4111  OCI_SUCCESS if the function completes successfully.
4112  OCI_INVALID_HANDLE if 'env' or 'err' is NULL.
4113  OCI_ERROR if
4114  any of the input parameters is null
4115  given index is not valid
4116  *)
4117 
4118 (*--------------------------- OCITableFirst ---------------------------------*)
4119 
4120  TOCITableFirst = function(hndl: POCIEnv; err: POCIError; const tbl: POCITable;
4121  index: sb4): sword; cdecl;
4122 (*
4123  NAME: OCITableFirst - OCITable return FirST index of table
4124  PARAMETERS:
4125  env (IN/OUT) - OCI environment handle initialized in object mode.
4126  err (IN/OUT) - error handle. If there is an error, it is
4127  recorded in 'err' and this function returns OCI_ERROR.
4128  The error recorded in 'err' can be retrieved by calling
4129  OCIErrorGet().
4130  tbl (IN) - table which is scanned
4131  index (OUT) - first index of the element which exists in the given
4132  table is returned
4133  DESCRIPTION:
4134  Return the first index of the element which exists in the given
4135  table.
4136  RETURNS:
4137  OCI_SUCCESS if the function completes successfully.
4138  OCI_INVALID_HANDLE if 'env' or 'err' is NULL.
4139  OCI_ERROR if
4140  table is empty
4141  *)
4142 
4143 (*---------------------------- OCITableLast ---------------------------------*)
4144 
4145  TOCITableLast = function(hndl: POCIEnv; err: POCIError; const tbl: POCITable;
4146  index: sb4): sword; cdecl;
4147 (*
4148  NAME: OCITableFirst - OCITable return LaST index of table
4149  PARAMETERS:
4150  env (IN/OUT) - OCI environment handle initialized in object mode.
4151  err (IN/OUT) - error handle. If there is an error, it is
4152  recorded in 'err' and this function returns OCI_ERROR.
4153  The error recorded in 'err' can be retrieved by calling
4154  OCIErrorGet().
4155  tbl (IN) - table which is scanned
4156  index (OUT) - last index of the element which exists in the given
4157  table is returned
4158  DESCRIPTION:
4159  Return the last index of the element which exists in the given
4160  table.
4161  RETURNS:
4162  OCI_SUCCESS if the function completes successfully.
4163  OCI_INVALID_HANDLE if 'env' or 'err' is NULL.
4164  OCI_ERROR if
4165  table is empty
4166  *)
4167 
4168 (*---------------------------- OCITableNext ---------------------------------*)
4169 
4170  TOCITableNext = function(hndl: POCIEnv; err: POCIError; index: sb4;
4171  const tbl: POCITable; next_index: psb4;
4172  exists: PBoolean): sword; cdecl;
4173 (*
4174  NAME: OCITableNext - OCITable return NeXT available index of table
4175  PARAMETERS:
4176  env (IN/OUT) - OCI environment handle initialized in object mode.
4177  err (IN/OUT) - error handle. If there is an error, it is
4178  recorded in 'err' and this function returns OCI_ERROR.
4179  The error recorded in 'err' can be retrieved by calling
4180  OCIErrorGet().
4181  index (IN) - starting at 'index' the index of the next element
4182  which exists is returned
4183  tbl (IN) - table which is scanned
4184  next_index (OUT) - index of the next element which exists
4185  is returned
4186  exists (OUT) - FALSE if no next index available else TRUE
4187  DESCRIPTION:
4188  Return the smallest position j, greater than 'index', such that
4189  exists(j) is TRUE.
4190  RETURNS:
4191  OCI_SUCCESS if the function completes successfully.
4192  OCI_INVALID_HANDLE if 'env' or 'err' is NULL.
4193  OCI_ERROR if
4194  no next index available
4195  */
4196 
4197 /*---------------------------- OCITablePrev ---------------------------------*)
4198 
4199  TOCITablePrev = function(hndl: POCIEnv; err: POCIError; index: sb4;
4200  const tbl: POCITable; prev_index: psb4;
4201  exists: PBoolean): sword; cdecl;
4202 (*
4203  NAME: OCITablePrev - OCITable return PReVious available index of table
4204  PARAMETERS:
4205  env (IN/OUT) - OCI environment handle initialized in object mode.
4206  err (IN/OUT) - error handle. If there is an error, it is
4207  recorded in 'err' and this function returns OCI_ERROR.
4208  The error recorded in 'err' can be retrieved by calling
4209  OCIErrorGet().
4210  index (IN) - starting at 'index' the index of the previous element
4211  which exists is returned
4212  tbl (IN) - table which is scanned
4213  prev_index (OUT) - index of the previous element which exists
4214  is returned
4215  exists (OUT) - FALSE if no next index available else TRUE
4216  DESCRIPTION:
4217  Return the largest position j, less than 'index', such that
4218  exists(j) is TRUE.
4219  RETURNS:
4220  OCI_SUCCESS if the function completes successfully.
4221  OCI_INVALID_HANDLE if 'env' or 'err' is NULL.
4222  OCI_ERROR if
4223  no previous index available
4224  *)
4225 
4226 (*--------------------------------orciap.h-----------------------------------*
4227 
4228 (*-------------------------------- OCIPing ----------------------------------*)
4229  TOCIPing = function(svchp: POCISvcCtx; errhp: POCIError; mode: ub4): sword; cdecl;
4230 (*---------------------------------orid.h------------------------------------*
4231  * PUBLIC FUNCTIONS *
4232  *---------------------------------------------------------------------------*)
4233 
4234 (*-------------------------- OCIObjectSetAttr ----------------------------*)
4235  TOCIObjectSetAttr = function(env: POCIEnv; err: POCIError; instance: Pointer;
4236  null_struct: pointer; tdo: POCIType; const names: PPAnsiChar;
4237  const lengths: pub4; const name_count: ub4;
4238  const indexes: pub4; const index_count: ub4;
4239  const null_status: POCIInd; const attr_null_struct: Pointer;
4240  const attr_value: Pointer): sword; cdecl;
4241 (*
4242  NAME: OCIObjectSetAttr - ORID SET value
4243  PARAMETERS:
4244  env (IN) - OCI environment handle initialized in object mode
4245  err (IN) - error handle. If there is an error, it is
4246  recorded in 'err' and this function returns OCI_ERROR.
4247  The error recorded in 'err' can be retrieved by calling
4248  OCIErrorGet().
4249  instance (IN) - pointer to an ADT instance
4250  null_struct (IN) - the null structure of the ADT instance or array
4251  tdo (IN) - pointer to the TDO
4252  names (IN) - array of attribute names. This is used to specify
4253  the names of the attributes in the path expression.
4254  lengths (IN) - array of lengths of attribute names.
4255  name_count (IN) - number of element in the array 'names'.
4256  indexes (IN) [OPTIONAL] - currently NOT SUPPORTED, pass (ub4 * )0.
4257  index_count (IN) [OPTIONAL] - currently NOT SUPPORTED, pass (ub4)0.
4258  attr_null_status (IN) - the null status of the attribute if the type of
4259  attribute is primitive.
4260  attr_null_struct (IN) - the null structure of an ADT or collection
4261  attribute.
4262  attr_value (IN) - pointer to the attribute value.
4263  REQUIRES:
4264  DESCRIPTION:
4265  This function set the attribute of the given object with the given
4266  value. The position of the attribute is specified as a path
4267  expression which is an array of names and an array of indexes.
4268  RETURNS:
4269  one of OROSTA*
4270  EXAMPLES:
4271  For path expression stanford.cs.stu[5].addr, the arrays will look like
4272  names = {"stanford", "cs", "stu", "addr"}
4273  lengths = {8, 2, 3, 4}
4274  indexes = {5}
4275 
4276  Also see the above example.
4277  */
4278 
4279 (*-------------------------- OCIObjectGetAttr ----------------------------*)
4280  TOCIObjectGetAttr = function(env: POCIEnv; err: POCIError; instance: Pointer;
4281  null_struct: Pointer; tdo: POCIType;
4282  const names: PPoratext; const lengths: pub4;
4283  const name_count: ub4; const indexes: pub4;
4284  const index_count: ub4; attr_null_status: PPOCIInd;
4285  attr_null_struct, attr_value: PPointer;
4286  attr_tdo: PPOCIType): sword; cdecl;
4287 (*
4288  NAME: OCIObjectGetAttr - ORID GET value
4289  PARAMETERS:
4290  env (IN) - OCI environment handle initialized in object mode
4291  err (IN) - error handle. If there is an error, it is
4292  recorded in 'err' and this function returns OCI_ERROR.
4293  The error recorded in 'err' can be retrieved by calling
4294  OCIErrorGet().
4295  instance (IN) - pointer to an ADT instance
4296  null_struct (IN) - the null structure of the ADT instance or array
4297  tdo (IN) - pointer to the TDO
4298  names (IN) - array of attribute names. This is used to specify
4299  the names of the attributes in the path expression.
4300  lengths (IN) - array of lengths of attribute names.
4301  name_count (IN) - number of element in the array 'names'.
4302  indexes (IN) [OPTIONAL] - currently NOT SUPPORTED, pass (ub4 * )0.
4303  index_count (IN) [OPTIONAL] - currently NOT SUPPORTED, pass (ub4)0.
4304  attr_null_status (OUT) - the null status of the attribute if the type
4305  of attribute is primitive.
4306  attr_null_struct (OUT) - the null structure of an ADT or collection
4307  attribute.
4308  attr_value (OUT) - pointer to the attribute value.
4309  attr_tdo (OUT) - pointer to the TDO of the attribute.
4310  REQUIRES:
4311  - a valid OCI environment handle must be given.
4312  DESCRIPTION:
4313  This function gets a value from an ADT instance or from an array.
4314  If the parameter 'instance' points to an ADT instance, then the path
4315  expression specifies the location of the attribute in the ADT.
4316  It is assumed that the object is pinned and that the value returned
4317  is valid until the object is unpinned.
4318  RETURNS:
4319  one of OROSTA*
4320  EXAMPLES:
4321  See example in OCIObjectSetAttr(). Also see the above example.
4322  *)
4323 
4324  {--------------------------------ori.h-------------------------------------- }
4325  { PUBLIC TYPES AND CONSTANTS }
4326  {--------------------------------------------------------------------------- }
4327  { Also see oro.h. }
4328  {--------------------------------------------------------------------------- }
4329  { PUBLIC FUNCTIONS }
4330  {--------------------------------------------------------------------------- }
4331  {--------------------------------------------------------------------------- }
4332  { OBJECT/INSTANCE OPERATIONS }
4333  {--------------------------------------------------------------------------- }
4334  {--------------------------- OCIObjectNew ---------------------------------- }
4335  OCITypeCode = ub2;
4336  TOCIObjectNew = function(env: POCIEnv; err: POCIError; const svc: POCISvcCtx;
4337  const typecode: OCITypeCode; const tdo: POCIType; const table: Pointer;
4338  const duration: OCIDuration; const value: boolean;
4339  instance: PPointer): sword; cdecl;
4340  {
4341  NAME: OCIObjectNew - OCI new (create) a standalone instance
4342  PARAMETERS:
4343  env (IN/OUT) - OCI environment handle initialized in object mode
4344  err (IN/OUT) - error handle. If there is an error, it is
4345  recorded in 'err' and this function returns OCI_ERROR.
4346  The error recorded in 'err' can be retrieved by calling
4347  OCIErrorGet().
4348  svc (IN) - OCI service handle.
4349  typecode (IN) - the typecode of the type of the instance.
4350  tdo (IN, optional) - pointer to the type descriptor object. The
4351  TDO describes the type of the instance that is to be
4352  created. Refer to OCITypeByName() for obtaining a TDO.
4353  The TDO is required for creating a named type (e.g. an
4354  object or a collection).
4355  table (IN, optional) - pointer to a table object which specifies a
4356  table in the server. This parameter can be set to NULL
4357  if no table is given. See the description below to find
4358  out how the table object and the TDO are used together
4359  to determine the kind of instances (persistent,
4360  transient, value) to be created. Also see
4361  OCIObjectPinTable() for retrieving a table object.
4362  duration (IN) - this is an overloaded parameter. The use of this
4363  parameter is based on the kind of the instance that is
4364  to be created.
4365  a) persistent object. This parameter specifies the
4366  pin duration.
4367  b) transient object. This parameter specififes the
4368  allocation duration and pin duration.
4369  c) value. This parameter specifies the allocation
4370  duration.
4371  value (IN) - specifies whether the created object is a value.
4372  If TRUE, then a value is created. Otherwise, a
4373  referenceable object is created. If the instance is
4374  not an object, then this parameter is ignored.
4375  instance (OUT) - address of the newly created instance
4376 
4377  REQUIRES:
4378  - a valid OCI environment handle must be given.
4379  DESCRIPTION:
4380  This function creates a new instance of the type specified by the
4381  typecode or the TDO. Based on the parameters 'typecode' (or 'tdo'),
4382  'value' and 'table', different kinds of instances can be created:
4383 
4384  The parameter 'table' is not NULL?
4385 
4386  yes no
4387  ----------------------------------------------------------------
4388  | object type (value=TRUE) | value | value |
4389  ----------------------------------------------------------------
4390  | object type (value=FALSE) | persistent obj | transient obj |
4391  type ----------------------------------------------------------------
4392  | built-in type | value | value |
4393  ----------------------------------------------------------------
4394  | collection type | value | value |
4395  ----------------------------------------------------------------
4396 
4397  This function allocates the top level memory chunk of an OTS instance.
4398  The attributes in the top level memory are initialized (e.g. an
4399  attribute of varchar2 is initialized to a vstring of 0 length).
4400 
4401  If the instance is an object, the object is marked existed but is
4402  atomically null.
4403 
4404  FOR PERSISTENT OBJECTS:
4405  The object is marked dirty and existed. The allocation duration for
4406  the object is session. The object is pinned and the pin duration is
4407  specified by the given parameter 'duration'.
4408 
4409  FOR TRANSIENT OBJECTS:
4410  The object is pinned. The allocation duration and the pin duration are
4411  specified by the given parameter 'duration'.
4412 
4413  FOR VALUES:
4414  The allocation duration is specified by the given parameter 'duration'.
4415 
4416  RETURNS:
4417  if environment handle or error handle is null, return
4418  OCI_INVALID_HANDLE.
4419  if operation suceeds, return OCI_SUCCESS.
4420  if operation fails, return OCI_ERROR.
4421  }
4422  {--------------------------- OCIObjectPin ---------------------------------- }
4423  POCIComplexObject = Pointer;
4424  PPOCIComplexObject = ^POCIComplexObject;
4425  OCIPinOpt = ub2;
4426  OCILockOpt = pub2;
4427 
4428  TOCIObjectPin = function(env: POCIEnv; err: POCIError;
4429  const object_ref: POCIRef; const corhdl: POCIComplexObject;
4430  const pin_option: OCIPinOpt; const pin_duration: OCIDuration;
4431  const lock_option: OCILockOpt; _object: PPointer): sword; cdecl;
4432  {
4433  NAME: OCIObjectPin - OCI pin a referenceable object
4434  PARAMETERS:
4435  env (IN/OUT) - OCI environment handle initialized in object mode
4436  err (IN/OUT) - error handle. If there is an error, it is
4437  recorded in 'err' and this function returns
4438  OCI_ERROR. The error recorded in 'err' can be
4439  retrieved by calling OCIErrorGet().
4440  object_ref (IN) - the reference to the object.
4441  corhdl (IN) - handle for complex object retrieval.
4442  pin_option (IN) - See description below.
4443  pin_duration (IN) - The duration of which the object is being accesed
4444  by a client. The object is implicitly unpinned at
4445  the end of the pin duration.
4446  If OCI_DURATION_NULL is passed, there is no pin
4447  promotion if the object is already loaded into
4448  the cache. If the object is not yet loaded, then
4449  the pin duration is set to OCI_DURATION_DEFAULT.
4450  lock_option (IN) - lock option (e.g., exclusive). If a lock option
4451  is specified, the object is locked in the server.
4452  See 'oro.h' for description about lock option.
4453  object (OUT) - the pointer to the pinned object.
4454 
4455  REQUIRES:
4456  - a valid OCI environment handle must be given.
4457  DESCRIPTION:
4458 
4459  This function pins a referenceable object instance given the object
4460  reference. The process of pinning serves three purposes:
4461 
4462  1) locate an object given its reference. This is done by the object
4463  cache which keeps track of the objects in the object heap.
4464 
4465  2) notify the object cache that an object is being in use. An object
4466  can be pinned many times. A pinned object will remain in memory
4467  until it is completely unpinned (see OCIObjectUnpin()).
4468 
4469  3) notify the object cache that a persistent object is being in use
4470  such that the persistent object cannot be aged out. Since a
4471  persistent object can be loaded from the server whenever is needed,
4472  the memory utilization can be increased if a completely unpinned
4473  persistent object can be freed (aged out), even before the
4474  allocation duration is expired.
4475 
4476  Also see OCIObjectUnpin() for more information about unpinning.
4477 
4478  FOR PERSISTENT OBJECTS:
4479 
4480  When pinning a persistent object, if it is not in the cache, the object
4481  will be fetched from the persistent store. The allocation duration of
4482  the object is session. If the object is already in the cache, it is
4483  returned to the client. The object will be locked in the server if a
4484  lock option is specified.
4485 
4486  This function will return an error for a non-existent object.
4487 
4488  A pin option is used to specify the copy of the object that is to be
4489  retrieved:
4490 
4491  1) If option is OCI_PIN_ANY (pin any), if the object is already
4492  in the environment heap, return this object. Otherwise, the object
4493  is retrieved from the database. This option is useful when the
4494  client knows that he has the exclusive access to the data in a
4495  session.
4496 
4497  2) If option is OCI_PIN_LATEST (pin latest), if the object is
4498  not cached, it is retrieved from the database. If the object is
4499  cached, it is refreshed with the latest version. See
4500  OCIObjectRefresh() for more information about refreshing.
4501 
4502  3) If option is OCI_PIN_RECENT (pin recent), if the object is loaded
4503  into the cache in the current transaction, the object is returned.
4504  If the object is not loaded in the current transaction, the object
4505  is refreshed from the server.
4506 
4507  FOR TRANSIENT OBJECTS:
4508 
4509  This function will return an error if the transient object has already
4510  been freed. This function does not return an error if an exclusive
4511  lock is specified in the lock option.
4512 
4513  RETURNS:
4514  if environment handle or error handle is null, return
4515  OCI_INVALID_HANDLE.
4516  if operation suceeds, return OCI_SUCCESS.
4517  if operation fails, return OCI_ERROR.
4518  }
4519  {------------------------------ OCIObjectUnpin ----------------------------- }
4520  TOCIObjectUnpin = function(env: POCIEnv; err: POCIError;
4521  const _object: Pointer): sword; cdecl;
4522  {
4523  NAME: OCIObjectUnpin - OCI unpin a referenceable object
4524  PARAMETERS:
4525  env (IN/OUT) - OCI environment handle initialized in object mode
4526  err (IN/OUT) - error handle. If there is an error, it is
4527  recorded in 'err' and this function returns OCI_ERROR.
4528  The error recorded in 'err' can be retrieved by
4529  calling OCIErrorGet().
4530  object (IN) - pointer to an object
4531  REQUIRES:
4532  - a valid OCI environment handle must be given.
4533  - The specified object must be pinned.
4534  DESCRIPTION:
4535  This function unpins an object. An object is completely unpinned when
4536  1) the object was unpinned N times after it has been pinned N times
4537  (by calling OCIObjectPin()).
4538  2) it is the end of the pin duration
4539  3) the function OCIObjectPinCountReset() is called
4540 
4541  There is a pin count associated with each object which is incremented
4542  whenever an object is pinned. When the pin count of the object is zero,
4543  the object is said to be completely unpinned. An unpinned object can
4544  be freed without error.
4545 
4546  FOR PERSISTENT OBJECTS:
4547  When a persistent object is completely unpinned, it becomes a candidate
4548  for aging. The memory of an object is freed when it is aged out. Aging
4549  is used to maximize the utilization of memory. An dirty object cannot
4550  be aged out unless it is flushed.
4551 
4552  FOR TRANSIENT OBJECTS:
4553  The pin count of the object is decremented. A transient can be freed
4554  only at the end of its allocation duration or when it is explicitly
4555  deleted by calling OCIObjectFree().
4556 
4557  FOR VALUE:
4558  This function will return an error for value.
4559 
4560  RETURNS:
4561  if environment handle or error handle is null, return
4562  OCI_INVALID_HANDLE.
4563  if operation suceeds, return OCI_SUCCESS.
4564  if operation fails, return OCI_ERROR.
4565  }
4566  {---------------------------- OCIObjectPinCountReset ----------------------- }
4567  TOCIObjectPinCountReset = function (env: POCIEnv; err: POCIError;
4568  const _object: pointer): sword; cdecl;
4569  {
4570  NAME: OCIObjectPinCountReset - OCI resets the pin count of a referenceable
4571  object
4572  PARAMETERS:
4573  env (IN/OUT) - OCI environment handle initialized in object mode
4574  err (IN/OUT) - error handle. If there is an error, it is
4575  recorded in 'err' and this function returns OCI_ERROR.
4576  The error recorded in 'err' can be retrieved by
4577  calling OCIErrorGet().
4578  object (IN) - pointer to an object
4579  REQUIRES:
4580  - a valid OCI environment handle must be given.
4581  - The specified object must be pinned.
4582  DESCRIPTION:
4583  This function completely unpins an object. When an object is
4584  completely unpinned, it can be freed without error.
4585 
4586  FOR PERSISTENT OBJECTS:
4587  When a persistent object is completely unpinned, it becomes a candidate
4588  for aging. The memory of an object is freed when it is aged out. Aging
4589  is used to maximize the utilization of memory. An dirty object cannot
4590  be aged out unless it is flushed.
4591 
4592  FOR TRANSIENT OBJECTS:
4593  The pin count of the object is decremented. A transient can be freed
4594  only at the end of its allocation duration or when it is explicitly
4595  freed by calling OCIObjectFree().
4596 
4597  FOR VALUE:
4598  This function will return an error for value.
4599 
4600  RETURNS:
4601  if environment handle or error handle is null, return
4602  OCI_INVALID_HANDLE.
4603  if operation suceeds, return OCI_SUCCESS.
4604  if operation fails, return OCI_ERROR.
4605  }
4606  {--------------------------- OCIObjectLock --------------------------------- }
4607  TOCIObjectLock = function(env: POCIEnv; err: POCIError;
4608  const _object: pointer): sword; cdecl;
4609 
4610  {
4611  NAME: OCIObjectLock - OCI lock a persistent object
4612  PARAMETERS:
4613  env (IN/OUT) - OCI environment handle initialized in object mode
4614  err (IN/OUT) - error handle. If there is an error, it is
4615  recorded in 'err' and this function returns OCI_ERROR.
4616  The error recorded in 'err' can be retrieved by
4617  calling OCIErrorGet().
4618  object (IN) - pointer to the persistent object
4619  REQUIRES:
4620  - a valid OCI environment handle must be given.
4621  - The specified object must be pinned.
4622  DESCRIPTION:
4623  This function locks a persistent object at the server. Unlike
4624  OCIObjectLockNoWait() this function waits if another user currently
4625  holds a lock on the desired object. This function
4626  returns an error if:
4627  1) the object is non-existent.
4628 
4629  This function will return an error for transient objects and values.
4630  The lock of an object is released at the end of a transaction.
4631 
4632  RETURNS:
4633  if environment handle or error handle is null, return
4634  OCI_INVALID_HANDLE.
4635  if operation suceeds, return OCI_SUCCESS.
4636  if operation fails, return OCI_ERROR.
4637  }
4638  {------------------------ OCIObjectLockNoWait ------------------------------ }
4639  TOCIObjectLockNoWait = function(env: POCIEnv; err: POCIError;
4640  const _object: pointer): sword; cdecl;
4641 
4642  {
4643  NAME: OCIObjectLockNoWait - OCI lock a persistent object, do not wait for
4644  the lock, return error if lock not available
4645  PARAMETERS:
4646  env (IN/OUT) - OCI environment handle initialized in object mode
4647  err (IN/OUT) - error handle. If there is an error, it is
4648  recorded in 'err' and this function returns OCI_ERROR.
4649  The error recorded in 'err' can be retrieved by
4650  calling OCIErrorGet().
4651  object (IN) - pointer to the persistent object
4652  REQUIRES:
4653  - a valid OCI environment handle must be given.
4654  - The specified object must be pinned.
4655  DESCRIPTION:
4656  This function locks a persistent object at the server. Unlike
4657  OCIObjectLock() this function will not wait if another user holds
4658  the lock on the desired object. This function returns an error if:
4659  1) the object is non-existent.
4660  2) the object is currently locked by another user in which
4661  case this function returns with an error.
4662 
4663  This function will return an error for transient objects and values.
4664  The lock of an object is released at the end of a transaction.
4665 
4666  RETURNS:
4667  if environment handle or error handle is null, return
4668  OCI_INVALID_HANDLE.
4669  if operation suceeds, return OCI_SUCCESS.
4670  if operation fails, return OCI_ERROR.
4671  }
4672  {--------------------------- OCIObjectMarkUpdate --------------------------- }
4673  TOCIObjectMarkUpdate = function(env: POCIEnv; err: POCIError;
4674  const _object: pointer): sword; cdecl;
4675 
4676  {
4677  NAME: OCIObjectMarkUpdate - OCI marks an object as updated
4678  PARAMETERS:
4679  env (IN/OUT) - OCI environment handle initialized in object mode
4680  err (IN/OUT) - error handle. If there is an error, it is
4681  recorded in 'err' and this function returns OCI_ERROR.
4682  The error recorded in 'err' can be retrieved by
4683  calling OCIErrorGet().
4684  object (IN) - pointer to the persistent object
4685  REQUIRES:
4686  - a valid OCI environment handle must be given.
4687  - The specified object must be pinned.
4688  DESCRIPTION:
4689  FOR PERSISTENT OBJECTS:
4690  This function marks the specified persistent object as updated. The
4691  persistent objects will be written to the server when the object cache
4692  is flushed. The object is not locked or flushed by this function. It
4693  is an error to update a deleted object.
4694 
4695  After an object is marked updated and flushed, this function must be
4696  called again to mark the object as updated if it has been dirtied
4697  after it is being flushed.
4698 
4699  FOR TRANSIENT OBJECTS:
4700  This function marks the specified transient object as updated. The
4701  transient objects will NOT be written to the server. It is an error
4702  to update a deleted object.
4703 
4704  FOR VALUES:
4705  It is an no-op for values.
4706 
4707  RETURNS:
4708  if environment handle or error handle is null, return
4709  OCI_INVALID_HANDLE.
4710  if operation suceeds, return OCI_SUCCESS.
4711  if operation fails, return OCI_ERROR.
4712  }
4713  {----------------------------- OCIObjectUnmark ----------------------------- }
4714  TOCIObjectUnmark = function(env: POCIEnv; err: POCIError;
4715  const _object:pointer): sword; cdecl;
4716 
4717  {
4718  NAME: OCIObjectUnmark - OCI unmarks an object
4719  PARAMETERS:
4720  env (IN/OUT) - OCI environment handle initialized in object mode
4721  err (IN/OUT) - error handle. If there is an error, it is
4722  recorded in 'err' and this function returns OCI_ERROR.
4723  The error recorded in 'err' can be retrieved by
4724  calling OCIErrorGet().
4725  object (IN) - pointer to the persistent object
4726  REQUIRES:
4727  - a valid OCI environment handle must be given.
4728  - The specified object must be pinned.
4729  DESCRIPTION:
4730  FOR PERSISTENT OBJECTS AND TRANSIENT OBJECTS:
4731  This function unmarks the specified persistent object as dirty. Changes
4732  that are made to the object will not be written to the server. If the
4733  object is marked locked, it remains marked locked. The changes that
4734  have already made to the object will not be undone implicitly.
4735 
4736  FOR VALUES:
4737  It is an no-op for values.
4738 
4739  RETURNS:
4740  if environment handle or error handle is null, return
4741  OCI_INVALID_HANDLE.
4742  if operation suceeds, return OCI_SUCCESS.
4743  if operation fails, return OCI_ERROR.
4744  }
4745  {----------------------------- OCIObjectUnmarkByRef ------------------------ }
4746  TOCIObjectUnmarkByRef = function(env: POCIEnv; err: POCIError;
4747  const ref: POCIRef): sword; cdecl;
4748 
4749  {
4750  NAME: OCIObjectUnmarkByRef - OCI unmarks an object by Ref
4751  PARAMETERS:
4752  env (IN/OUT) - OCI environment handle initialized in object mode
4753  err (IN/OUT) - error handle. If there is an error, it is
4754  recorded in 'err' and this function returns OCI_ERROR.
4755  The error recorded in 'err' can be retrieved by
4756  calling OCIErrorGet().
4757  ref (IN) - reference of the object
4758  REQUIRES:
4759  - a valid OCI environment handle must be given.
4760  - The specified object must be pinned.
4761  DESCRIPTION:
4762  FOR PERSISTENT OBJECTS AND TRANSIENT OBJECTS:
4763  This function unmarks the specified persistent object as dirty. Changes
4764  that are made to the object will not be written to the server. If the
4765  object is marked locked, it remains marked locked. The changes that
4766  have already made to the object will not be undone implicitly.
4767 
4768  FOR VALUES:
4769  It is an no-op for values.
4770 
4771  RETURNS:
4772  if environment handle or error handle is null, return
4773  OCI_INVALID_HANDLE.
4774  if operation suceeds, return OCI_SUCCESS.
4775  if operation fails, return OCI_ERROR.
4776  }
4777  {--------------------------- OCIObjectFree --------------------------------- }
4778  TOCIObjectFree = function(env: POCIEnv; err: POCIError;
4779  const instance: pointer; const flags: ub2): sword; cdecl;
4780 
4781  {
4782  NAME: OCIObjectFree - OCI free (and unpin) an standalone instance
4783  PARAMETERS:
4784  env (IN/OUT) - OCI environment handle initialized in object mode
4785  err (IN/OUT) - error handle. If there is an error, it is
4786  recorded in 'err' and this function returns
4787  OCI_ERROR. The error recorded in 'err' can be
4788  retrieved by calling OCIErrorGet().
4789  instance (IN) - pointer to a standalone instance.
4790  flags (IN) - If OCI_OBJECT_FREE_FORCE is set, free the object
4791  even if it is pinned or dirty.
4792  If OCI_OBJECT_FREE_NONULL is set, the null
4793  structure will not be freed.
4794  REQUIRES:
4795  - a valid OCI environment handle must be given.
4796  - The instance to be freed must be standalone.
4797  - If the instance is a referenceable object, the object must be pinned.
4798  DESCRIPTION:
4799  This function deallocates all the memory allocated for an OTS instance,
4800  including the null structure.
4801 
4802  FOR PERSISTENT OBJECTS:
4803  This function will return an error if the client is attempting to free
4804  a dirty persistent object that has not been flushed. The client should
4805  either flush the persistent object or set the parameter 'flag' to
4806  OCI_OBJECT_FREE_FORCE.
4807 
4808  This function will call OCIObjectUnpin() once to check if the object
4809  can be completely unpin. If it succeeds, the rest of the function will
4810  proceed to free the object. If it fails, then an error is returned
4811  unless the parameter 'flag' is set to OCI_OBJECT_FREE_FORCE.
4812 
4813  Freeing a persistent object in memory will not change the persistent
4814  state of that object at the server. For example, the object will
4815  remain locked after the object is freed.
4816 
4817  FOR TRANSIENT OBJECTS:
4818 
4819  This function will call OCIObjectUnpin() once to check if the object
4820  can be completely unpin. If it succeeds, the rest of the function will
4821  proceed to free the object. If it fails, then an error is returned
4822  unless the parameter 'flag' is set to OCI_OBJECT_FREE_FORCE.
4823 
4824  FOR VALUES:
4825  The memory of the object is freed immediately.
4826 
4827  RETURNS:
4828  if environment handle or error handle is null, return
4829  OCI_INVALID_HANDLE.
4830  if operation suceeds, return OCI_SUCCESS.
4831  if operation fails, return OCI_ERROR.
4832  }
4833  {----------------------- OCIObjectMarkDeleteByRef -------------------------- }
4834  TOCIObjectMarkDeleteByRef = function(env: POCIEnv; err: POCIError;
4835  const object_ref:POCIRef): sword; cdecl;
4836 
4837  {
4838  NAME: OCIObjectMarkDeleteByRef - OCI "delete" (and unpin) an object given
4839  a reference
4840  PARAMETERS:
4841  env (IN/OUT) - OCI environment handle initialized in object mode
4842  err (IN/OUT) - error handle. If there is an error, it is
4843  recorded in 'err' and this function returns
4844  OCI_ERROR. The error recorded in 'err' can be
4845  retrieved by calling OCIErrorGet().
4846  object_ref (IN) - ref of the object to be deleted
4847 
4848  REQUIRES:
4849  - a valid OCI environment handle must be given.
4850  DESCRIPTION:
4851  This function marks the object designated by 'object_ref' as deleted.
4852 
4853  FOR PERSISTENT OBJECTS:
4854  If the object is not loaded, then a temporary object is created and is
4855  marked deleted. Otherwise, the object is marked deleted.
4856 
4857  The object is deleted in the server when the object is flushed.
4858 
4859  FOR TRANSIENT OBJECTS:
4860  The object is marked deleted. The object is not freed until it is
4861  unpinned.
4862 
4863  RETURNS:
4864  if environment handle or error handle is null, return
4865  OCI_INVALID_HANDLE.
4866  if operation suceeds, return OCI_SUCCESS.
4867  if operation fails, return OCI_ERROR.
4868  }
4869  {--------------------------- OCIObjectMarkDelete --------------------------- }
4870  TOCIObjectMarkDelete = function(env: POCIEnv; err: POCIError;
4871  const instance:pointer): sword; cdecl;
4872 
4873  {
4874  NAME: OCIObjectMarkDelete - OCI "delete" an instance given a Pointer
4875  PARAMETERS:
4876  env (IN/OUT) - OCI environment handle initialized in object mode
4877  err (IN/OUT) - error handle. If there is an error, it is
4878  recorded in 'err' and this function returns
4879  OCI_ERROR. The error recorded in 'err' can be
4880  retrieved by calling OCIErrorGet().
4881  instance (IN) - pointer to the instance
4882  REQUIRES:
4883  - a valid OCI environment handle must be given.
4884  - The instance must be standalone.
4885  - If the instance is a referenceable object, then it must be pinned.
4886  DESCRIPTION:
4887 
4888  FOR PERSISTENT OBJECTS:
4889  The object is marked deleted. The memory of the object is not freed.
4890  The object is deleted in the server when the object is flushed.
4891 
4892  FOR TRANSIENT OBJECTS:
4893  The object is marked deleted. The memory of the object is not freed.
4894 
4895  FOR VALUES:
4896  This function frees a value immediately.
4897 
4898  RETURNS:
4899  if environment handle or error handle is null, return
4900  OCI_INVALID_HANDLE.
4901  if operation suceeds, return OCI_SUCCESS.
4902  if operation fails, return OCI_ERROR.
4903  }
4904  {---------------------------- OCIObjectFlush ------------------------------- }
4905  TOCIObjectFlush = function(env: POCIEnv; err: POCIError;
4906  const _object: pointer): sword; cdecl;
4907 
4908  {
4909  NAME: OCIObjectFlush - OCI flush a persistent object
4910  PARAMETERS:
4911  env (IN/OUT) - OCI environment handle initialized in object mode
4912  err (IN/OUT) - error handle. If there is an error, it is
4913  recorded in 'err' and this function returns
4914  OCI_ERROR. The error recorded in 'err' can be
4915  retrieved by calling OCIErrorGet().
4916  object (IN) - pointer to the persistent object
4917  REQUIRES:
4918  - a valid OCI environment handle must be given.
4919  - The specified object must be pinned.
4920  DESCRIPTION:
4921  This function flushes a modified persistent object to the server.
4922  An exclusive lock is obtained implicitly for the object when flushed.
4923 
4924  When the object is written to the server, triggers may be fired.
4925  Objects can be modified by the triggers at the server. To keep the
4926  objects in the object cache being coherent with the database, the
4927  clients can free or refresh the objects in the cache.
4928 
4929  This function will return an error for transient objects and values.
4930 
4931  RETURNS:
4932  if environment handle or error handle is null, return
4933  OCI_INVALID_HANDLE.
4934  if operation suceeds, return OCI_SUCCESS.
4935  if operation fails, return OCI_ERROR.
4936  }
4937  {------------------------ OCIObjectRefresh --------------------------------- }
4938  TOCIObjectRefresh = function(env: POCIEnv; err: POCIError;
4939  _object: pointer): sword; cdecl;
4940 
4941  {
4942  NAME: OCIObjectRefresh - OCI refresh a persistent object
4943  PARAMETERS:
4944  env (IN/OUT) - OCI environment handle initialized in object mode
4945  err (IN/OUT) - error handle. If there is an error, it is
4946  recorded in 'err' and this function returns
4947  OCI_ERROR. The error recorded in 'err' can be
4948  retrieved by calling OCIErrorGet().
4949  object (IN) - pointer to the persistent object
4950  REQUIRES:
4951  - a valid OCI environment handle must be given.
4952  - The specified object must be pinned.
4953  DESCRIPTION:
4954  This function refreshes an unmarked object with data retrieved from the
4955  latest snapshot in the server. An object should be refreshed when the
4956  objects in the cache are inconsistent with the objects at
4957  the server:
4958  1) When an object is flushed to the server, triggers can be fired to
4959  modify more objects in the server. The same objects (modified by
4960  the triggers) in the object cache become obsolete.
4961  2) When the user issues a SQL or executes a PL/SQL procedure to modify
4962  any object in the server, the same object in the cache becomes
4963  obsolete.
4964 
4965  The object that is refreshed will be 'replaced-in-place'. When an
4966  object is 'replaced-in-place', the top level memory of the object will
4967  be reused so that new data can be loaded into the same memory address.
4968  The top level memory of the null structre is also reused. Unlike the
4969  top level memory chunk, the secondary memory chunks may be resized and
4970  reallocated. The client should be careful when holding onto a pointer
4971  to the secondary memory chunk (e.g. assigning the address of a
4972  secondary memory to a local variable), since this pointer can become
4973  invalid after the object is refreshed.
4974 
4975  The object state will be modified as followed after being refreshed:
4976  - existent : set to appropriate value
4977  - pinned : unchanged
4978  - allocation duration : unchanged
4979  - pin duration : unchanged
4980 
4981  This function is an no-op for transient objects or values.
4982 
4983  RETURNS:
4984  if environment handle or error handle is null, return
4985  OCI_INVALID_HANDLE.
4986  if operation suceeds, return OCI_SUCCESS.
4987  if operation fails, return OCI_ERROR.
4988  }
4989  {---------------------------- OCIObjectCopy -------------------------------- }
4990  TOCIObjectCopy = function(env: POCIEnv; err: POCIError; const svc: POCISvcCtx;
4991  const source, null_source, target, null_target: pointer; const tdo: POCIType;
4992  const duration: OCIDuration; const option: ub1): sword; cdecl;
4993 
4994  {
4995  NAME: OCIObjectCopy - OCI copy one instance to another
4996  PARAMETERS:
4997  env (IN/OUT) - OCI environment handle initialized in object mode
4998  err (IN/OUT) - error handle. If there is an error, it is
4999  recorded in 'err' and this function returns
5000  OCI_ERROR. The error recorded in 'err' can be
5001  retrieved by calling OCIErrorGet().
5002  svc (IN) - OCI service context handle
5003  source (IN) - pointer to the source instance
5004  null_source (IN) - pointer to the null structure of the source
5005  target (IN) - pointer to the target instance
5006  null_target (IN) - pointer to the null structure of the target
5007  tdo (IN) - the TDO for both source and target
5008  duration (IN) - allocation duration of the target memory
5009  option (IN) - specify the copy option:
5010  OROOCOSFN - Set Reference to Null. All references
5011  in the source will not be copied to the target. The
5012  references in the target are set to null.
5013  REQUIRES:
5014  - a valid OCI environment handle must be given.
5015  - If source or target is referenceable, it must be pinned.
5016  - The target or the containing instance of the target must be already
5017  be instantiated (e.g. created by OCIObjectNew()).
5018  - The source and target instances must be of the same type. If the
5019  source and target are located in a different databases, then the
5020  same type must exist in both databases.
5021  DESCRIPTION:
5022  This function copies the contents of the 'source' instance to the
5023  'target' instance. This function performs a deep-copy such that the
5024  data that is copied/duplicated include:
5025  a) all the top level attributes (see the exceptions below)
5026  b) all the secondary memory (of the source) that is reachable from the
5027  top level attributes.
5028  c) the null structure of the instance
5029 
5030  Memory is allocated with the specified allocation duration.
5031 
5032  Certain data items are not copied:
5033  a) If the option OCI_OBJECTCOPY_NOREF is specified, then all references
5034  in the source are not copied. Instead, the references in the target
5035  are set to null.
5036  b) If the attribute is a LOB, then it is set to null.
5037 
5038  RETURNS:
5039  if environment handle or error handle is null, return
5040  OCI_INVALID_HANDLE.
5041  if operation suceeds, return OCI_SUCCESS.
5042  if operation fails, return OCI_ERROR.
5043  }
5044  {---------------------------- OCIObjectGetTypeRef -------------------------- }
5045  TOCIObjectGetTypeRef = function(env: POCIEnv; err: POCIError;
5046  const instance:pointer; type_ref: POCIRef): sword; cdecl;
5047 
5048  {
5049  NAME: OCIObjectGetTypeRef - get the type reference of a standalone object
5050  PARAMETERS:
5051  env (IN/OUT) - OCI environment handle initialized in object mode
5052  err (IN/OUT) - error handle. If there is an error, it is
5053  recorded in 'err' and this function returns
5054  OCI_ERROR. The error recorded in 'err' can be
5055  retrieved by calling OCIErrorGet().
5056  instance (IN) - pointer to an standalone instance
5057  type_ref (OUT) - reference to the type of the object. The reference
5058  must already be allocated.
5059  REQUIRES:
5060  - a valid OCI environment handle must be given.
5061  - The instance must be standalone.
5062  - If the object is referenceable, the specified object must be pinned.
5063  - The reference must already be allocated.
5064  DESCRIPTION:
5065  This function returns a reference to the TDO of a standalone instance.
5066  RETURNS:
5067  if environment handle or error handle is null, return
5068  OCI_INVALID_HANDLE.
5069  if operation suceeds, return OCI_SUCCESS.
5070  if operation fails, return OCI_ERROR.
5071  }
5072  {--------------------------- OCIObjectGetObjectRef ------------------------- }
5073  TOCIObjectGetObjectRef = function(env: POCIEnv; err: POCIError;
5074  const _object: pointer; bject_ref: POCIRef): sword; cdecl;
5075 
5076  {
5077  NAME: OCIObjectGetObjectRef - OCI get the object reference of an
5078  referenceable object
5079  PARAMETERS:
5080  env (IN/OUT) - OCI environment handle initialized in object mode
5081  err (IN/OUT) - error handle. If there is an error, it is
5082  recorded in 'err' and this function returns
5083  OCI_ERROR. The error recorded in 'err' can be
5084  retrieved by calling OCIErrorGet().
5085  object (IN) - pointer to a persistent object
5086  object_ref (OUT) - reference of the given object. The reference must
5087  already be allocated.
5088  REQUIRES:
5089  - a valid OCI environment handle must be given.
5090  - The specified object must be pinned.
5091  - The reference must already be allocated.
5092  DESCRIPTION:
5093  This function returns a reference to the given object. It returns an
5094  error for values.
5095  RETURNS:
5096  if environment handle or error handle is null, return
5097  OCI_INVALID_HANDLE.
5098  if operation suceeds, return OCI_SUCCESS.
5099  if operation fails, return OCI_ERROR.
5100  }
5101  {--------------------------- OCIObjectMakeObjectRef ----------------------- }
5102  TOCIObjectMakeObjectRef = function(env: POCIEnv; err: POCIError;
5103  const svc: POCISvcCtx; const table: pointer; const values: PPointer;
5104  const array_len: ub4; object_ref: POCIRef): sword; cdecl;
5105 
5106  {
5107  NAME: OCIObjectMakeObjectRef - OCI Create an object reference to a
5108  referenceable object.
5109  PARAMETERS:
5110  env (IN/OUT) - OCI environment handle initialized in object mode
5111  err (IN/OUT) - error handle. If there is an error, it is
5112  recorded in 'err' and this function returns
5113  OCI_ERROR. The error recorded in 'err' can be
5114  retrieved by calling OCIErrorGet().
5115  svc (IN) - the service context
5116  table (IN) - A pointer to the table object (must be pinned)
5117  attrlist (IN) - A list of values (OCI type values) from which
5118  the ref is to be created.
5119  attrcnt (IN) - The length of the attrlist array.
5120  object_ref (OUT) - reference of the given object. The reference must
5121  already be allocated.
5122  REQUIRES:
5123  - a valid OCI environment handle must be given.
5124  - The specified table object must be pinned.
5125  - The reference must already be allocated.
5126  DESCRIPTION:
5127  This function creates a reference given the values that make up the
5128  reference and also a pointer to the table object.
5129  Based on the table's OID property, whether it is a pk based OID or
5130  a system generated OID, the function creates a sys-generated REF or
5131  a pk based REF.
5132  In case of system generated REFs pass in a OCIRaw which is 16 bytes
5133  long contatining the sys generated OID.
5134  In case of PK refs pass in the OCI equivalent for numbers, chars etc..
5135  RETURNS:
5136  if environment handle or error handle is null, return
5137  OCI_INVALID_HANDLE.
5138  if operation suceeds, return OCI_SUCCESS.
5139  if operation fails, return OCI_ERROR.
5140  }
5141  {--------------------------- OCIObjectGetPrimaryKeyTypeRef --------------- }
5142  TOCIObjectGetPrimaryKeyTypeRef = function(env: POCIEnv; err: POCIError;
5143  const svc:POCISvcCtx; const table: pointer;
5144  type_ref: POCIRef): sword; cdecl;
5145 
5146  {
5147  NAME: OCIObjectGetPrimaryKeyTypeRef - OCI get the REF to the pk OID type
5148  PARAMETERS:
5149  env (IN/OUT) - OCI environment handle initialized in object mode
5150  err (IN/OUT) - error handle. If there is an error, it is
5151  recorded in 'err' and this function returns
5152  OCI_ERROR. The error recorded in 'err' can be
5153  retrieved by calling OCIErrorGet().
5154  svc (IN) - the service context
5155  table (IN) - pointer to the table object
5156  type_ref (OUT) - reference of the pk type. The reference must
5157  already be allocated.
5158  REQUIRES:
5159  - a valid OCI environment handle must be given.
5160  - The specified table object must be pinned.
5161  - The reference must already be allocated.
5162  DESCRIPTION:
5163  This function returns a reference to the pk type. It returns an
5164  error for values. If the table is not a Pk oid table/view, then
5165  it returns error.
5166  RETURNS:
5167  if environment handle or error handle is null, return
5168  OCI_INVALID_HANDLE.
5169  if operation suceeds, return OCI_SUCCESS.
5170  if operation fails, return OCI_ERROR.
5171  }
5172  {-------------------------- OCIObjectGetInd -------------------------------- }
5173  TOCIObjectGetInd = function(env: POCIEnv; err: POCIError;
5174  const instance: pointer; null_struct: PPointer): sword; cdecl;
5175 
5176  {
5177  NAME: OCIObjectGetInd - OCI get the null structure of a standalone object
5178  PARAMETERS:
5179  env (IN/OUT) - OCI environment handle initialized in object mode
5180  err (IN/OUT) - error handle. If there is an error, it is
5181  recorded in 'err' and this function returns
5182  OCI_ERROR. The error recorded in 'err' can be
5183  retrieved by calling OCIErrorGet().
5184  instance (IN) - pointer to the instance
5185  null_struct (OUT) - null structure
5186  REQUIRES:
5187  - a valid OCI environment handle must be given.
5188  - The object must be standalone.
5189  - If the object is referenceable, the specified object must be pinned.
5190  DESCRIPTION:
5191  This function returns the null structure of an instance. This function
5192  will allocate the top level memory of the null structure if it is not
5193  already allocated. If an null structure cannot be allocated for the
5194  instance, then an error is returned. This function only works for
5195  ADT or row type instance.
5196  RETURNS:
5197  if environment handle or error handle is null, return
5198  OCI_INVALID_HANDLE.
5199  if operation suceeds, return OCI_SUCCESS.
5200  if operation fails, return OCI_ERROR.
5201  }
5202  {------------------------- OCIObjectExists -------------------------------- }
5203  TOCIObjectExists = function(env: POCIEnv; err: POCIError; const ins: pointer;
5204  exist: PBoolean): sword; cdecl;
5205 
5206  {
5207  NAME: OCIObjectExist - OCI checks if the object exists
5208  PARAMETERS:
5209  env (IN/OUT) - OCI environment handle initialized in object mode
5210  err (IN/OUT) - error handle. If there is an error, it is
5211  recorded in 'err' and this function returns
5212  OCI_ERROR. The error recorded in 'err' can be
5213  retrieved by calling OCIErrorGet().
5214  ins (IN) - pointer to an instance
5215  exist (OUT) - return TRUE if the object exists
5216  REQUIRES:
5217  - a valid OCI environment handle must be given.
5218  - The object must be standalone.
5219  - if object is a referenceable, it must be pinned.
5220  DESCRIPTION:
5221  This function returns the existence of an instance. If the instance
5222  is a value, this function always returns TRUE.
5223  RETURNS:
5224  if environment handle or error handle is null, return
5225  OCI_INVALID_HANDLE.
5226  if operation suceeds, return OCI_SUCCESS.
5227  if operation fails, return OCI_ERROR.
5228  }
5229  {------------------------- OCIObjectGetProperty --------------------------- }
5230  TOCIObjectGetProperty = function(envh: POCIEnv; errh: POCIError;
5231  const obj: pointer; const propertyId: OCIObjectPropId;
5232  _property: pointer; size: Pub4): sword; cdecl;
5233 
5234  {
5235  NAME: OCIObjectGetProperty - OCIObject Get Property of given object
5236  PARAMETERS:
5237  env (IN/OUT) - OCI environment handle initialized in object mode
5238  err (IN/OUT) - error handle. If there is an error, it is
5239  recorded in 'err' and this function returns
5240  OCI_ERROR. The error recorded in 'err' can be
5241  retrieved by calling OCIErrorGet().
5242  obj (IN) - object whose property is returned
5243  propertyId (IN) - id which identifies the desired property
5244  property (OUT) - buffer into which the desired property is
5245  copied
5246  size (IN/OUT) - on input specifies the size of the property buffer
5247  passed by caller, on output will contain the
5248  size in bytes of the property returned.
5249  This parameter is required for string type
5250  properties only (e.g OCI_OBJECTPROP_SCHEMA,
5251  OCI_OBJECTPROP_TABLE). For non-string
5252  properties this parameter is ignored since
5253  the size is fixed.
5254  DESCRIPTION:
5255  This function returns the specified property of the object.
5256  The desired property is identified by 'propertyId'. The property
5257  value is copied into 'property' and for string typed properties
5258  the string size is returned via 'size'.
5259 
5260  Objects are classified as persistent, transient and value
5261  depending upon the lifetime and referenceability of the object.
5262  Some of the properties are applicable only to persistent
5263  objects and some others only apply to persistent and
5264  transient objects. An error is returned if the user tries to
5265  get a property which in not applicable to the given object.
5266  To avoid such an error, the user should first check whether
5267  the object is persistent or transient or value
5268  (OCI_OBJECTPROP_LIFETIME property) and then appropriately
5269  query for other properties.
5270 
5271  The different property ids and the corresponding type of
5272  'property' argument is given below.
5273 
5274  OCI_OBJECTPROP_LIFETIME
5275  This identifies whether the given object is a persistent
5276  object (OCI_OBJECT_PERSISTENT) or a
5277  transient object (OCI_OBJECT_TRANSIENT) or a
5278  value instance (OCI_OBJECT_VALUE).
5279  'property' argument must be a pointer to a variable of
5280  type OCIObjectLifetime.
5281 
5282  OCI_OBJECTPROP_SCHEMA
5283  This returns the schema name of the table in which the
5284  object exists. An error is returned if the given object
5285  points to a transient instance or a value. If the input
5286  buffer is not big enough to hold the schema name an error
5287  is returned, the error message will communicate the
5288  required size. Upon success, the size of the returned
5289  schema name in bytes is returned via 'size'.
5290  'property' argument must be an array of type text and 'size'
5291  should be set to size of array in bytes by the caller.
5292 
5293  OCI_OBJECTPROP_TABLE
5294  This returns the table name in which the object exists. An
5295  error is returned if the given object points to a
5296  transient instance or a value. If the input buffer is not
5297  big enough to hold the table name an error is returned,
5298  the error message will communicate the required size. Upon
5299  success, the size of the returned table name in bytes is
5300  returned via 'size'. 'property' argument must be an array
5301  of type text and 'size' should be set to size of array in
5302  bytes by the caller.
5303 
5304  OCI_OBJECTPROP_PIN_DURATION
5305  This returns the pin duration of the object.
5306  An error is returned if the given object points to a value
5307  instance. Valid pin durations are: OCI_DURATION_SESSION and
5308  OCI_DURATION_TRANS.
5309  'property' argument must be a pointer to a variable of type
5310  OCIDuration.
5311 
5312  OCI_OBJECTPROP_ALLOC_DURATION
5313  This returns the allocation duration of the object.
5314  Valid allocation durations are: OCI_DURATION_SESSION and
5315  OCI_DURATION_TRANS.
5316  'property' argument must be a pointer to a variable of type
5317  OCIDuration.
5318 
5319  OCI_OBJECTPROP_LOCK
5320  This returns the lock status of the
5321  object. The possible lock status is enumerated by OCILockOpt.
5322  An error is returned if the given object points to a transient
5323  or value instance.
5324  'property' argument must be a pointer to a variable of
5325  type OCILockOpt.
5326  Note, the lock status of an object can also be retrieved by
5327  calling OCIObjectIsLocked().
5328 
5329  OCI_OBJECTPROP_MARKSTATUS
5330  This returns the status flag which indicates whether the
5331  object is a new object, updated object and/or deleted object.
5332  The following macros can be used to test the mark status
5333  flag:
5334 
5335  OCI_OBJECT_IS_UPDATED(flag)
5336  OCI_OBJECT_IS_DELETED(flag)
5337  OCI_OBJECT_IS_NEW(flag)
5338  OCI_OBJECT_IS_DIRTY(flag)
5339 
5340  An object is dirty if it is a new object or marked deleted or
5341  marked updated.
5342  An error is returned if the given object points to a transient
5343  or value instance. 'property' argument must be of type
5344  OCIObjectMarkStatus.
5345 
5346  OCI_OBJECTPROP_VIEW
5347  This identifies whether the specified object is a view object
5348  or not. If property value returned is TRUE, it indicates the
5349  object is a view otherwise it is not.
5350  'property' argument must be of type boolean.
5351 
5352  RETURNS:
5353  if environment handle or error handle is null, return
5354  OCI_INVALID_HANDLE.
5355  if operation suceeds, return OCI_SUCCESS.
5356  if operation fails, return OCI_ERROR. Possible errors are TBD
5357  }
5358  {---------------------------- OCIObjectIsLocked -------------------------- }
5359  TOCIObjectIsLocked = function(env: POCIEnv; err: POCIError; const ins: pointer;
5360  lock: Pboolean): sword; cdecl;
5361 
5362  {
5363  NAME: OCIObjectIsLocked - OCI get the lock status of a standalone object
5364  PARAMETERS:
5365  env (IN/OUT) - OCI environment handle initialized in object mode
5366  err (IN/OUT) - error handle. If there is an error, it is
5367  recorded in 'err' and this function returns
5368  OCI_ERROR. The error recorded in 'err' can be
5369  retrieved by calling OCIErrorGet().
5370  ins (IN) - pointer to an instance
5371  lock (OUT) - return value for the lock status.
5372  REQUIRES:
5373  - a valid OCI environment handle must be given.
5374  - The instance must be standalone.
5375  - If the object is referenceable, the specified object must be pinned.
5376  DESCRIPTION:
5377  This function returns the lock status of an instance. If the instance
5378  is a value, this function always returns FALSE.
5379  RETURNS:
5380  if environment handle or error handle is null, return
5381  OCI_INVALID_HANDLE.
5382  if operation suceeds, return OCI_SUCCESS.
5383  if operation fails, return OCI_ERROR.
5384  }
5385  {------------------------- OCIObjectIsDirty ------------------------------ }
5386  TOCIObjectIsDirty = function(env: POCIEnv; err: POCIError; const ins: pointer;
5387  dirty:Pboolean): sword; cdecl;
5388 
5389  {
5390  NAME: OCIObjectIsDirty - OCI get the dirty status of a standalone object
5391  PARAMETERS:
5392  env (IN/OUT) - OCI environment handle initialized in object mode
5393  err (IN/OUT) - error handle. If there is an error, it is
5394  recorded in 'err' and this function returns
5395  OCI_ERROR. The error recorded in 'err' can be
5396  retrieved by calling OCIErrorGet().
5397  ins (IN) - pointer to an instance
5398  dirty (OUT) - return value for the dirty status.
5399  REQUIRES:
5400  - a valid OCI environment handle must be given.
5401  - The instance must be standalone.
5402  - if instance is an object, the instance must be pinned.
5403  DESCRIPTION:
5404  This function returns the dirty status of an instance. If the instance
5405  is a value, this function always returns FALSE.
5406  RETURNS:
5407  if environment handle or error handle is null, return
5408  OCI_INVALID_HANDLE.
5409  if operation suceeds, return OCI_SUCCESS.
5410  if operation fails, return OCI_ERROR.
5411  }
5412  {--------------------------- OCIObjectPinTable ----------------------------- }
5413  TOCIObjectPinTable = function(env: POCIEnv; err: POCIError;
5414  const svc:POCISvcCtx; const schema_name: Poratext; const s_n_length: ub4;
5415  const object_name: Poratext; const o_n_length:ub4;
5416  const scope_obj_ref: POCIRef; const pin_duration: OCIDuration;
5417  _object: PPointer): sword; cdecl;
5418 
5419  {
5420  NAME: OCIObjectPinTable - OCI get table object
5421  PARAMETERS:
5422  env (IN/OUT) - OCI environment handle initialized in object mode
5423  err (IN/OUT) - error handle. If there is an error, it is
5424  recorded in 'err' and this function returns
5425  OCI_ERROR. The error recorded in 'err' can be
5426  retrieved by calling OCIErrorGet().
5427  svc (IN) - OCI service context handle
5428  schema_name (IN, optional) - schema name of the table
5429  s_n_length (IN, optional) - length of the schema name
5430  object_name (IN) - name of the table
5431  o_n_length (IN) - length of the table name
5432  scope_obj_ref (IN, optional) - reference of the scoping object
5433  pin_duration (IN) - pin duration. See description in OCIObjectPin().
5434  object (OUT) - the pinned table object
5435  REQUIRES:
5436  - a valid OCI environment handle must be given.
5437  DESCRIPTION:
5438  This function pin a table object with the specified pin duration.
5439  The client can unpin the object by calling OCIObjectUnpin(). See
5440  OCIObjectPin() and OCIObjectUnpin() for more information about pinning
5441  and unpinning.
5442  RETURNS:
5443  if environment handle or error handle is null, return
5444  OCI_INVALID_HANDLE.
5445  if operation suceeds, return OCI_SUCCESS.
5446  if operation fails, return OCI_ERROR.
5447  }
5448  {------------------------- OCIObjectArrayPin ------------------------------- }
5449  TOCIObjectArrayPin = function(env: POCIEnv; err: POCIError;
5450  const ref_array: PPOCIRef; const array_size: ub4;
5451  const cor_array: PPOCIComplexObject; const cor_array_size: ub4;
5452  const pin_option: OCIPinOpt; const pin_duration: OCIDuration;
5453  const lock: OCILockOpt; obj_array: PPointer;
5454  pos: Pub4): sword; cdecl;
5455 
5456  {
5457  NAME: OCIObjectArrayPin - ORIO array pin
5458  PARAMETERS:
5459  env (IN/OUT) - OCI environment handle initialized in object mode
5460  err (IN/OUT) - error handle. If there is an error, it is
5461  recorded in 'err' and this function returns
5462  OCI_ERROR. The error recorded in 'err' can be
5463  retrieved by calling OCIErrorGet().
5464  ref_array (IN) - array of references to be pinned
5465  array_size (IN) - number of elements in the array of references
5466  pin_option (IN) - pin option. See OCIObjectPin().
5467  pin_duration (IN) - pin duration. See OCIObjectPin().
5468  lock_option (IN) - lock option. See OCIObjectPin().
5469  obj_array (OUT) - If this argument is not NULL, the pinned objects
5470  will be returned in the array. The user must
5471  allocate this array with element type being
5472  'void *'. The size of this array is identical to
5473  'array'.
5474  pos (OUT) - If there is an error, this argument will contain
5475  the element that is causing the error. Note that
5476  this argument is set to 1 for the first element in
5477  the ref_array.
5478  REQUIRE:
5479  - a valid OCI environment handle must be given.
5480  - If 'obj_array' is not NULL, then it must already be allocated and
5481  the size of 'obj_array' is 'array_size'.
5482  DESCRIPTION:
5483  This function pin an array of references. All the pinned objects are
5484  retrieved from the database in one network roundtrip. If the user
5485  specifies an output array ('obj_array'), then the address of the
5486  pinned objects will be assigned to the elements in the array. See
5487  OCIObjectPin() for more information about pinning.
5488  RETURNS:
5489  if environment handle or error handle is null, return
5490  OCI_INVALID_HANDLE.
5491  if operation suceeds, return OCI_SUCCESS.
5492  if operation fails, return OCI_ERROR.
5493  }
5494  {--------------------------------------------------------------------------- }
5495  { HEAP/CACHE OPERATIONS }
5496  {--------------------------------------------------------------------------- }
5497  {--------------------------- OCICacheFlush --------------------------------- }
5498  TOCICacheFlushGet = function(context: pointer; last: Pub1): POCIRef; cdecl;
5499  TOCICacheFlush = function(env: POCIEnv; err: POCIError; const svc:POCISvcCtx;
5500  const context: pointer; const get: TOCICacheFlushGet;
5501  ref: PPOCIRef): sword; cdecl;
5502 
5503  {
5504  NAME: OCICacheFlush - OCI flush persistent objects
5505  PARAMETERS:
5506  env (IN/OUT) - OCI environment handle initialized in object mode
5507  err (IN/OUT) - error handle. If there is an error, it is
5508  recorded in 'err' and this function returns
5509  OCI_ERROR. The error recorded in 'err' can be
5510  retrieved by calling OCIErrorGet().
5511  svc (IN) [optional] - OCI service context. If null pointer is
5512  specified, then the dirty objects in all connections
5513  will be flushed.
5514  context (IN) [optional] - specifies an user context that is an
5515  argument to the client callback function 'get'. This
5516  parameter is set to NULL if there is no user context.
5517  get (IN) [optional] - an client-defined function which acts an
5518  iterator to retrieve a batch of dirty objects that need
5519  to be flushed. If the function is not NULL, this function
5520  will be called to get a reference of a dirty object.
5521  This is repeated until a null reference is returned by
5522  the client function or the parameter 'last' is set to
5523  TRUE. The parameter 'context' is passed to get()
5524  for each invocation of the client function. This
5525  parameter should be NULL if user callback is not given.
5526  If the object that is returned by the client function is
5527  not a dirtied persistent object, the object is ignored.
5528  All the objects that are returned from the client
5529  function must be from newed or pinned the same service
5530  context, otherwise, an error is signalled. Note that the
5531  returned objects are flushed in the order in which they
5532  are marked dirty.
5533  ref (OUT) [optional] - if there is an error in flushing the
5534  objects, (*ref) will point to the object that
5535  is causing the error. If 'ref' is NULL, then the object
5536  will not be returned. If '*ref' is NULL, then a
5537  reference will be allocated and set to point to the
5538  object. If '*ref' is not NULL, then the reference of
5539  the object is copied into the given space. If the
5540  error is not caused by any of the dirtied object,
5541  the given ref is initalized to be a NULL reference
5542  (OCIRefIsNull(*ref) is TRUE).
5543  REQUIRES:
5544  - a valid OCI environment handle must be given.
5545  DESCRIPTION:
5546  This function flushes the modified persistent objects from the
5547  environment heap to the server. The objects are flushed in the order
5548  that they are marked updated or deleted.
5549 
5550  See OCIObjectFlush() for more information about flushing.
5551 
5552  RETURNS:
5553  if environment handle or error handle is null, return
5554  OCI_INVALID_HANDLE.
5555  if operation suceeds, return OCI_SUCCESS.
5556  if operation fails, return OCI_ERROR.
5557  }
5558  {--------------------------- OCICacheRefresh ------------------------------- }
5559  TOCICacheRefreshGet = function(context: pointer): POCIRef; cdecl;
5560  TOCICacheRefresh = function(env: POCIEnv; err: POCIError;
5561  const svc: POCISvcCtx; const option: OCIRefreshOpt; const context: pointer;
5562  get: TOCICacheRefreshGet; ref: PPOCIRef): sword; cdecl;
5563 
5564  {
5565  NAME: OCICacheRefresh - OCI ReFreSh persistent objects
5566  PARAMETERS:
5567  env (IN/OUT) - OCI environment handle initialized in object mode
5568  err (IN/OUT) - error handle. If there is an error, it is
5569  recorded in 'err' and this function returns
5570  OCI_ERROR. The error recorded in 'err' can be
5571  retrieved by calling OCIErrorGet().
5572  svc (IN) [optional] - OCI service context. If null pointer is
5573  specified, then the persistent objects in all connections
5574  will be refreshed.
5575  option (IN) [optional] - if OCI_REFRESH_LOAD is specified, all
5576  objects that is loaded within the transaction are
5577  refreshed. If the option is OCI_REFERSH_LOAD and the
5578  parameter 'get' is not NULL, this function will ignore
5579  the parameter.
5580  context (IN) [optional] - specifies an user context that is an
5581  argument to the client callback function 'get'. This
5582  parameter is set to NULL if there is no user context.
5583  get (IN) [optional] - an client-defined function which acts an
5584  iterator to retrieve a batch of objects that need to be
5585  refreshed. If the function is not NULL, this function
5586  will be called to get a reference of an object. If
5587  the reference is not NULL, then the object will be
5588  refreshed. These steps are repeated until a null
5589  reference is returned by this function. The parameter
5590  'context' is passed to get() for each invocation of the
5591  client function. This parameter should be NULL if user
5592  callback is not given.
5593  ref (OUT) [optional] - if there is an error in refreshing the
5594  objects, (*ref) will point to the object that
5595  is causing the error. If 'ref' is NULL, then the object
5596  will not be returned. If '*ref' is NULL, then a
5597  reference will be allocated and set to point to the
5598  object. If '*ref' is not NULL, then the reference of
5599  the object is copied into the given space. If the
5600  error is not caused by any of the object,
5601  the given ref is initalized to be a NULL reference
5602  (OCIRefIsNull(*ref) is TRUE).
5603  REQUIRES:
5604  - a valid OCI environment handle must be given.
5605  DESCRIPTION:
5606  This function refreshes all pinned persistent objects. All unpinned
5607  persistent objects are freed. See OCIObjectRefresh() for more
5608  information about refreshing.
5609  RETURNS:
5610  if environment handle or error handle is null, return
5611  OCI_INVALID_HANDLE.
5612  if operation suceeds, return OCI_SUCCESS.
5613  if operation fails, return OCI_ERROR.
5614  }
5615  {---------------------------- OCICacheUnpin -------------------------------- }
5616  TOCICacheUnpin = function(env: POCIEnv; err: POCIError;
5617  const svc:POCISvcCtx): sword; cdecl;
5618 
5619  {
5620  NAME: OCICacheUnpin - OCI UNPin objects
5621  PARAMETERS:
5622  env (IN/OUT) - OCI environment handle initialized in object mode
5623  err (IN/OUT) - error handle. If there is an error, it is
5624  recorded in 'err' and this function returns
5625  OCI_ERROR. The error recorded in 'err' can be
5626  retrieved by calling OCIErrorGet().
5627  svc (IN) [optional] - OCI service context. If null pointer is
5628  specified, then the objects in all connections
5629  will be unpinned.
5630  REQUIRES:
5631  - a valid OCI environment handle must be given.
5632  DESCRIPTION:
5633  If a connection is specified, this function completely unpins the
5634  persistent objects in that connection. Otherwise, all persistent
5635  objects in the heap are completely unpinned. All transient objects in
5636  the heap are also completely unpinned. See OCIObjectUnpin() for more
5637  information about unpinning.
5638  RETURNS:
5639  if environment handle or error handle is null, return
5640  OCI_INVALID_HANDLE.
5641  if operation suceeds, return OCI_SUCCESS.
5642  if operation fails, return OCI_ERROR.
5643  }
5644  {----------------------------- OCICacheFree -------------------------------- }
5645  TOCICacheFree = function(env: POCIEnv; err: POCIError;
5646  const svc: POCISvcCtx): sword; cdecl;
5647 
5648  {
5649  NAME: OCICacheFree - OCI FREe instances
5650  PARAMETERS:
5651  env (IN/OUT) - OCI environment handle initialized in object mode
5652  err (IN/OUT) - error handle. If there is an error, it is
5653  recorded in 'err' and this function returns
5654  OCI_ERROR. The error recorded in 'err' can be
5655  retrieved by calling OCIErrorGet().
5656  svc (IN) [optional] - OCI service context. If null pointer is
5657  specified, then the objects in all connections
5658  will be freed.
5659  REQUIRES:
5660  - a valid OCI environment handle must be given.
5661  DESCRIPTION:
5662  If a connection is specified, this function frees the persistent
5663  objects, transient objects and values allocated for that connection.
5664  Otherwise, all persistent objects, transient objects and values in the
5665  heap are freed. Objects are freed regardless of their pin count. See
5666  OCIObjectFree() for more information about freeing an instance.
5667  RETURNS:
5668  if environment handle or error handle is null, return
5669  OCI_INVALID_HANDLE.
5670  if operation suceeds, return OCI_SUCCESS.
5671  if operation fails, return OCI_ERROR.
5672  }
5673  {---------------------------- OCICacheUnmark ------------------------------- }
5674  TOCICacheUnmark = function(env: POCIEnv; err: POCIError;
5675  const svc: POCISvcCtx): sword; cdecl;
5676 
5677  {
5678  NAME: OCICacheUnmark - OCI Unmark all dirty objects
5679  PARAMETERS:
5680  env (IN/OUT) - OCI environment handle initialized in object mode
5681  err (IN/OUT) - error handle. If there is an error, it is
5682  recorded in 'err' and this function returns
5683  OCI_ERROR. The error recorded in 'err' can be
5684  retrieved by calling OCIErrorGet().
5685  svc (IN) [optional] - OCI service context. If null pointer is
5686  specified, then the objects in all connections
5687  will be unmarked.
5688  REQUIRES:
5689  - a valid OCI environment handle must be given.
5690  DESCRIPTION:
5691  If a connection is specified, this function unmarks all dirty objects
5692  in that connection. Otherwise, all dirty objects in the cache are
5693  unmarked. See OCIObjectUnmark() for more information about unmarking
5694  an object.
5695  RETURNS:
5696  if environment handle or error handle is null, return
5697  OCI_INVALID_HANDLE.
5698  if operation suceeds, return OCI_SUCCESS.
5699  if operation fails, return OCI_ERROR.
5700  }
5701  TOCIDurationBegin = function(env: POCIEnv; err: POCIError;
5702  svc: POCISvcCtx; const parent: OCIDuration;
5703  dur: POCIDuration): sword; cdecl;
5704 
5705  {
5706  NAME: OCIDurationBegin - OCI DURATION BEGIN
5707  PARAMETERS:
5708  env (IN/OUT) - OCI environment handle initialized in object mode
5709  This should be passed NULL, when cartridge services
5710  are to be used.
5711  err (IN/OUT) - error handle. If there is an error, it is
5712  recorded in 'err' and this function returns OCI_ERROR.
5713  The error recorded in 'err' can be retrieved by calling
5714  OCIErrorGet().
5715  svc (IN/OUT) - OCI service handle.
5716  parent (IN) - parent for the duration to be started.
5717  dur (OUT) - newly created user duration
5718  REQUIRES:
5719  - a valid OCI environment handle must be given for non-cartridge
5720  services.
5721  - For cartridge services, NULL should be given for environment handle
5722  - A valid service handle must be given in all cases.
5723  DESCRIPTION:
5724  This function starts a new user duration. A user can have multiple
5725  active user durations simultaneously. The user durations do not have
5726  to be nested.
5727 
5728  The object subsystem predefines 3 durations :
5729  1) session - memory allocated with session duration comes from
5730  the UGA heap (OCI_DURATION_SESSION). A session
5731  duration terminates at the end of the user session.
5732  2) transaction - memory allocated with transaction duration comes
5733  from the UGA heap (OCI_DURATION_TRANS). A trans-
5734  action duration terminates at the end of the user
5735  transaction.
5736  3) call - memory allocated with call duration comes from PGA
5737  heap (OCI_DURATION_CALL). A call duration terminates
5738  at the end of the user call.
5739 
5740  Each user duration has a parent duration. A parent duration can be a
5741  predefined duration or another user duration. The relationship between
5742  a user duration and its parent duration (child duration) are:
5743 
5744  1) An user duration is nested within the parent duration. When its
5745  parent duration terminates, the user duration will also terminate.
5746  2) The memory allocated with an user duration comes from the heap of
5747  its parent duration. For example, if the parent duration of an
5748  user duration is call, then the memory allocated with the user
5749  duration will also come from the PGA heap.
5750 
5751  This function can be used as both part of cartridge services as well
5752  as without cartridge services.
5753  The difference in the function in the case of cartridge and
5754  non-cartridge services is:
5755  In case of cartridge services, as descibed above a new user
5756  duration is created as a child of the "parent" duration.
5757  But when used for non-cartridge purposes, when a pre-defined
5758  duration is passed in as parent, it is mapped to the cache duration
5759  for that connection (which is created if not already present) and
5760  the new user duration will be child of the cache duration.
5761 
5762  RETURNS:
5763  if environment handle and service handle is null or if error
5764  handle is null return OCI_INVALID_HANDLE.
5765  if operation suceeds, return OCI_SUCCESS.
5766  if operation fails, return OCI_ERROR.
5767  }
5768  TOCIDurationEnd = function(env: POCIEnv; err: POCIError; svc: POCISvcCtx;
5769  duration: OCIDuration): sword; cdecl;
5770 
5771  {
5772  NAME: OCIDurationEnd - OCI DURATION END
5773  PARAMETERS:
5774  env (IN/OUT) - OCI environment handle initialized in object mode
5775  This should be passed NULL, when cartridge services
5776  are to be used.
5777  err (IN/OUT) - error handle. If there is an error, it is
5778  recorded in 'err' and this function returns OCI_ERROR.
5779  The error recorded in 'err' can be retrieved by calling
5780  OCIErrorGet().
5781  svc (IN/OUT) - OCI service handle.
5782  dur (OUT) - a previously created user duration using
5783  OCIDurationBegin()
5784  REQUIRES:
5785  - a valid OCI environment handle must be given for non-cartridge
5786  services.
5787  - For cartridge services, NULL should be given for environment handle
5788  - A valid service handle must be given in all cases.
5789  DESCRIPTION:
5790  This function terminates a user duration. All memory allocated for
5791  this duration is freed.
5792 
5793  This function can be used as both part of cartridge services as well
5794  as without cartridge services. In both cased, the heap duration
5795  is freed and all the allocated memory for that duration is freed.
5796  The difference in the function in the case of cartridge and
5797  non-cartridge services is:
5798  In case of non-cartridge services, if the duration is pre-
5799  defined, the associated cache duration (see OCIDurationBegin())
5800  is also terminated and the following is done.
5801  1) The child durations are terminated.
5802  2) All objects pinned for this duration are unpinned.
5803  3) All instances allocated for this duration are freed.
5804 
5805  In case of cartridge services, only the heap duration is
5806  freed. All the context entries allocated for that duration are
5807  freed from the context hash table..
5808 
5809  RETURNS:
5810  if environment handle and service handle is null or if error
5811  handle is null return OCI_INVALID_HANDLE.
5812  if operation suceeds, return OCI_SUCCESS.
5813  if operation fails, return OCI_ERROR.
5814  }
5815 
5816 (*-----------------------------ort.h----------------------------------------*)
5817 
5818  {----------------------------- TYPE DESCRIPTION ---------------------------- }
5819  {
5820  * OCIType - OCI Type Description Object
5821  *
5822  * The contents of an 'OCIType' is private/opaque to clients. Clients just
5823  * need to declare and pass 'OCIType' pointers in to the type manage
5824  * functions.
5825  * The pointer points to the type in the object cache. Thus, clients don't
5826  * need to allocate space for this type and must NEVER free the pointer to the
5827  * 'OCIType'.
5828  }
5829 
5830  type
5831  {------------------------- TYPE ELEMENT DESCRIPTION ------------------------ }
5832  {
5833  * OCITypeElem - OCI Type Element object
5834  *
5835  * The contents of an 'OCITypeElem' is private/opaque to clients. Clients just
5836  * need to declare and pass 'OCITypeElem' pointers in to the type manager
5837  * functions.
5838  *
5839  * 'OCITypeElem' objects contains type element information such as the numeric
5840  * precision for example, for number objects, and the number of elements for
5841  * arrays.
5842  * They ARE used to describe type attributes, collection elements,
5843  * method parameters, and method results. Hence they are pass in or returned
5844  * by attribute, collection, and method parameter/result accessors.
5845  }
5846  {--------------------------- METHOD DESCRIPTION --------------------------- }
5847  {
5848  * OCITypeMethod - OCI Method Description object
5849  *
5850  * The contents of an 'OCITypeMethod' is private/opaque to clients. Clients
5851  * just need to declare and pass 'OCITypeMethod' pointers in to the type
5852  * manager functions.
5853  * The pointer points to the method in the object cache. Thus, clients don't
5854  * need to allocate space for this type and must NEVER free the pointer to
5855  * the 'OCITypeMethod'.
5856  }
5857  {--------------------------- TYPE ACCESS ITERATOR -------------------------- }
5858  {
5859  * OCITypeIter- OCI Type Iterator
5860  *
5861  * The contents of an 'orti' is private/opaque to clients. Clients just
5862  * need to declare and pass 'orti' pointers in to the type manager functions.
5863  * The iterator is used to retreive MDO's and ADO's that belong to the TDO
5864  * one at a time. It needs to be allocated by the 'OCITypeIterNew()' function
5865  * call and deallocated with the 'OCITypeIterFree()' function call.
5866  }
5867  {================== }
5868  { PUBLIC FUNCTIONS }
5869  {================== }
5870  {-------------------------------------------------------------------------- }
5871  { ITERATOR }
5872  {-------------------------------------------------------------------------- }
5873  {-----------------------_- OCITypeIterNew --------------------------------- }
5874  { ** OBSOLETE ** }
5875 
5876  TOCITypeIterNew = function (env: POCIEnv; err: POCIError; const tdo: POCIType;
5877  iterator_ort: PPOCITypeIter):sword; cdecl;
5878 
5879  {
5880  NAME: OCITypeIterNew - OCI Iterator NEW
5881  PARAMETERS:
5882  env (IN/OUT) - OCI environment handle initialized in object mode
5883  err (IN/OUT) - error handle. If there is an error, it is
5884  recorded in 'err' and this function returns OCI_ERROR.
5885  The error recorded in 'err' can be retrieved by calling
5886  OCIErrorGet().
5887  tdo (IN) - pointer to the pinned type in the object cache to
5888  initialize the iterator with
5889  iterator_ort (OUT) - pointer to the pointer to the new iterator created
5890  DESCRIPTION:
5891  Create a new instance of a method/attribute iterator and initalize
5892  it's values.
5893  RETURNS:
5894  OCI_SUCCESS if the function completes successfully.
5895  OCI_INVALID_HANDLE if 'env' or 'err' is null.
5896  OCI_ERROR if
5897  1) any of the required parameters is null.
5898  2) error while allocating space for the iterator.
5899  }
5900  {------------------------ OCITypeIterSet --------------------------------- }
5901  { ** OBSOLETE ** }
5902  TOCITypeIterSet = function(env: POCIEnv; err: POCIError; const tdo: POCIType;
5903  iterator_ort: POCITypeIter): sword; cdecl;
5904 
5905  {
5906  NAME: OCITypeIterSet - OCI Iterator SET
5907  PARAMETERS:
5908  env (IN/OUT) - OCI environment handle initialized in object mode
5909  err (IN/OUT) - error handle. If there is an error, it is
5910  recorded in 'err' and this function returns OCI_ERROR.
5911  The error recorded in 'err' can be retrieved by calling
5912  OCIErrorGet().
5913  tdo (IN) - pointer to the pinned type in the object cache to
5914  initialize the iterator with
5915  iterator_ort (IN/OUT) - pointer to the iterator to set
5916  DESCRIPTION:
5917  Initializes the iterator. This is used to reset the state of the
5918  iterator.
5919  RETURNS:
5920  OCI_SUCCESS if the function completes successfully.
5921  OCI_INVALID_HANDLE if 'env' or 'err' is null.
5922  OCI_ERROR if
5923  1) any of the required parameters is null.
5924  }
5925  {------------------------ OCITypeIterFree --------------------------------- }
5926  { ** OBSOLETE ** }
5927  TOCITypeIterFree = function(env: POCIEnv; err: POCIError;
5928  iterator_ort: POCITypeIter):sword;
5929 
5930  {
5931  NAME: OCITypeIterFree - OCI Iterator FREe
5932  PARAMETERS:
5933  env (IN/OUT) - OCI environment handle initialized in object mode
5934  err (IN/OUT) - error handle. If there is an error, it is
5935  recorded in 'err' and this function returns OCI_ERROR.
5936  The error recorded in 'err' can be retrieved by calling
5937  OCIErrorGet().
5938  iterator_ort (IN/OUT) - pointer to the iterator to free
5939  DESCRIPTION:
5940  Free space allocated for the iterator.
5941  RETURNS:
5942  OCI_SUCCESS if the function completes successfully.
5943  OCI_INVALID_HANDLE if 'env' or 'err' is null.
5944  OCI_ERROR if
5945  1) any of the required parameters is null.
5946  2) error while freeing the iterator, probably bad iterator pointer.
5947  }
5948  {-------------------------------------------------------------------------- }
5949  { TYPE GET }
5950  {-------------------------------------------------------------------------- }
5951  { ** OBSOLETE ** }
5952  TOCITypeByName = function(env: POCIEnv; err: POCIError; const svc: POCISvcCtx;
5953  schema_name: Poratext; const s_length: ub4; const type_name: Poratext;
5954  const t_length: ub4; version_name: Poratext; const v_length: ub4;
5955  const pin_duration: OCIDuration; const get_option: OCITypeGetOpt;
5956  tdo: PPOCIType): sword; cdecl;
5957 
5958  {
5959  NAME: OCITypeByName - OCI Get the most current version of an existing TYPe
5960  by name.
5961  PARAMETERS:
5962  env (IN/OUT) - OCI environment handle initialized in object mode
5963  err (IN/OUT) - error handle. If there is an error, it is
5964  recorded in 'err' and this function returns OCI_ERROR.
5965  The error recorded in 'err' can be retrieved by calling
5966  OCIErrorGet().
5967  svc (IN) - OCI service handle
5968  schema_name (IN, optional) - name of schema associated with the
5969  type. By default, the user's schema name is used.
5970  s_length (IN) - length of the 'schema_name' parameter
5971  type_name (IN) - name of the type to get
5972  t_length (IN) - length of the 'type_name' parameter
5973  version_name (IN, optional) - user readable version of the type.
5974  Pass (oratext *)0 for the most current version.
5975  v_length (IN) - length of version_name in bytes. Should be 0 if
5976  the most current version is to be retrieved.
5977  pin_duration (IN) - pin duration (e.g. until the end of current
5978  transaction). See 'oro.h' for a description of
5979  each option.
5980  get_option (IN) - options for loading the types. It can be one of two
5981  values:
5982  OCI_TYPEGET_HEADER for only the header to be loaded, or
5983  OCI_TYPEGET_ALL for the TDO and all ADO and MDOs to be
5984  loaded.
5985  tdo (OUT) - pointer to the pinned type in the object cache
5986  DESCRIPTION:
5987  Get a pointer to a version of the existing type associated
5988  with schema/type name.
5989  RETURNS:
5990  OCI_SUCCESS if the function completes successfully.
5991  OCI_INVALID_HANDLE if 'env' or 'err' is null.
5992  OCI_ERROR if
5993  1) any of the required parameters is null.
5994  2) the adt type associated with schema/type name does not exist.
5995  NOTE:
5996  Schema and type names are CASE-SENSITIVE. If they have been created
5997  via SQL, you need to use uppercase names.
5998  }
5999  TOCITypeArrayByName = function(env: POCIEnv; err: POCIError; svc: POCISvcCtx;
6000  array_len: ub4; schema_name: PPoratext; s_length: Pub4;
6001  type_name: PPoratext; t_length: Pub4; version_name: PPoratext;
6002  v_length: Pub4; pin_duration: OCIDuration; get_option: OCITypeGetOpt;
6003  tdo: PPOCIType): sword; cdecl;
6004 
6005  {
6006  NAME: OCITypeArrayByName - OCI Get array of TYPes by name.
6007  PARAMETERS:
6008  env (IN/OUT) - OCI environment handle initialized in object mode
6009  err (IN/OUT) - error handle. If there is an error, it is
6010  recorded in 'err' and this function returns OCI_ERROR.
6011  The error recorded in 'err' can be retrieved by calling
6012  OCIErrorGet().
6013  svc (IN) - OCI service handle
6014  array_len (IN) - number of schema_name/type_name/version_name entries to
6015  be retrieved.
6016  schema_name (IN, optional) - array of schema names associated with the
6017  types to be retrieved. The array must have array_len
6018  elements if specified.
6019  If 0 is supplied, the default schema is assumed, otherwise
6020  it MUST have array_len number of elements.
6021  0 can be supplied for one or more of the entries to indicate
6022  that the default schema is desired for those entries.
6023  s_length (IN) - array of schema_name lengths with each entry
6024  corresponding to the length of the corresponding schema_name
6025  entry in the schema_name array in bytes.
6026  The array must either have array_len number of elements or
6027  it MUST be 0 if schema_name is not specified.
6028  type_name (IN) - array of the names of the types to retrieve. This
6029  MUST have array_len number of elements.
6030  t_length (IN) - array of the lengths of type names in the type_name
6031  array in bytes.
6032  version_name (IN) - array of the version names of the types to retrieve
6033  corresponding. This can be 0 to indicate retrieval of the
6034  most current versions, or it MUST have array_len number of
6035  elements.
6036  If 0 is supplied, the most current version is assumed,
6037  otherwise it MUST have array_len number of elements.
6038  0 can be supplied for one or more of the entries to indicate
6039  that the current version is desired for those entries.
6040  v_length (IN) - array of the lengths of version names in the
6041  version_name array in bytes.
6042  pin_duration (IN) - pin duration (e.g. until the end of current
6043  transaction) for the types retreieve. See 'oro.h' for a
6044  description of each option.
6045  get_option (IN) - options for loading the types. It can be one of two
6046  values:
6047  OCI_TYPEGET_HEADER for only the header to be loaded, or
6048  OCI_TYPEGET_ALL for the TDO and all ADO and MDOs to be
6049  loaded.
6050  tdo (OUT) - output array for the pointers to each pinned type in the
6051  object cache. It must have space for array_len pointers.
6052  Use OCIObjectGetObjectRef() to obtain the CREF to each
6053  pinned type descriptor.
6054  DESCRIPTION:
6055  Get pointers to the existing types associated with the schema/type name
6056  array. This is similar to OCITypeByName() except that all the TDO's are
6057  retreived via a single network roundtrip.
6058  RETURNS:
6059  OCI_SUCCESS if the function completes successfully.
6060  OCI_INVALID_HANDLE if 'env' or 'err' is null.
6061  OCI_ERROR if
6062  1) any of the required parameters is null.
6063  2) one or more adt types associated with a schema/type name entry
6064  does not exist.
6065  }
6066  TOCITypeByRef = function(env: POCIEnv; err: POCIError; type_ref: POCIRef;
6067  pin_duration: OCIDuration; get_option: OCITypeGetOpt;
6068  tdo: PPOCIType): sword; cdecl;
6069 
6070  {
6071  NAME: OCITypeArrayByRef - OCI Get array of TYPes by REF.
6072  PARAMETERS:
6073  env (IN/OUT) - OCI environment handle initialized in object mode
6074  err (IN/OUT) - error handle. If there is an error, it is
6075  recorded in 'err' and this function returns OCI_ERROR.
6076  The error recorded in 'err' can be retrieved by calling
6077  OCIErrorGet().
6078  type_ref (IN) - OCIRef * pointing to the particular version of
6079  the type descriptor object to obtain.
6080  The array must have array_len elements if specified.
6081  pin_duration (IN) - pin duration (e.g. until the end of current
6082  transaction) for the type to retreieve. See 'oro.h' for a
6083  description of each option.
6084  get_option (IN) - options for loading the type. It can be one of two
6085  values:
6086  OCI_TYPEGET_HEADER for only the header to be loaded, or
6087  OCI_TYPEGET_ALL for the TDO and all ADO and MDOs to be
6088  loaded.
6089  tdo (OUT) - pointer to the pinned type in the object cache
6090  DESCRIPTION:
6091  Get pointers to the
6092  with the schema/type name array. This is similar to OCITypeByName()
6093  except that all the TDO's are retreived via a single network roundtrip.
6094  RETURNS:
6095  OCI_SUCCESS if the function completes successfully.
6096  OCI_INVALID_HANDLE if 'env' or 'err' is null.
6097  OCI_ERROR if
6098  1) any of the required parameters is null.
6099  2) one or more adt types associated with a schema/type name entry
6100  does not exist.
6101  }
6102  TOCITypeArrayByRef = function(env: POCIEnv; err: POCIError; array_len: ub4;
6103  type_ref: PPOCIRef; pin_duration: OCIDuration; get_option: OCITypeGetOpt;
6104  tdo: PPOCIType): sword; cdecl;
6105 
6106  {
6107  NAME: OCITypeArrayByRef - OCI Get array of TYPes by REF.
6108  PARAMETERS:
6109  env (IN/OUT) - OCI environment handle initialized in object mode
6110  err (IN/OUT) - error handle. If there is an error, it is
6111  recorded in 'err' and this function returns OCI_ERROR.
6112  The error recorded in 'err' can be retrieved by calling
6113  OCIErrorGet().
6114  array_len (IN) - number of schema_name/type_name/version_name entries to
6115  be retrieved.
6116  type_ref (IN) - array of OCIRef * pointing to the particular version of
6117  the type descriptor object to obtain.
6118  The array must have array_len elements if specified.
6119  pin_duration (IN) - pin duration (e.g. until the end of current
6120  transaction) for the types retreieve. See 'oro.h' for a
6121  description of each option.
6122  get_option (IN) - options for loading the types. It can be one of two
6123  values:
6124  OCI_TYPEGET_HEADER for only the header to be loaded, or
6125  OCI_TYPEGET_ALL for the TDO and all ADO and MDOs to be
6126  loaded.
6127  tdo (OUT) - output array for the pointers to each pinned type in the
6128  object cache. It must have space for array_len pointers.
6129  Use OCIObjectGetObjectRef() to obtain the CREF to each
6130  pinned type descriptor.
6131  DESCRIPTION:
6132  Get pointers to the
6133  with the schema/type name array. This is similar to OCITypeByName()
6134  except that all the TDO's are retreived via a single network roundtrip.
6135  RETURNS:
6136  OCI_SUCCESS if the function completes successfully.
6137  OCI_INVALID_HANDLE if 'env' or 'err' is null.
6138  OCI_ERROR if
6139  1) any of the required parameters is null.
6140  2) one or more adt types associated with a schema/type name entry
6141  does not exist.
6142  }
6143  {-------------------------------------------------------------------------- }
6144  { TYPE ACCESSORS }
6145  {-------------------------------------------------------------------------- }
6146  {---------------------------- OCITypeName --------------------------------- }
6147  { ** OBSOLETE ** }
6148  TOCITypeName = function(env: POCIEnv; err: POCIError; tdo: POCIType;
6149  n_length: Pub4): poratext; cdecl;
6150 
6151  {
6152  NAME: OCITypeName - ORT Get a Type's naME.
6153  PARAMETERS:
6154  env (IN/OUT) - OCI environment handle initialized in object mode
6155  err (IN/OUT) - error handle. If there is an error, it is
6156  recorded in 'err' and this function returns OCI_ERROR.
6157  The error recorded in 'err' can be retrieved by calling
6158  OCIErrorGet().
6159  tdo (IN) - pointer to to the type descriptor in the object cache
6160  n_length (OUT) - length (in bytes) of the returned type name. The
6161  caller must allocate space for the ub4 before calling this
6162  routine.
6163  REQUIRES:
6164  1) All type accessors require that the type be pinned before calling
6165  any accessor.
6166  2) All input parameters must not be NULL and must be valid.
6167  3) 'n_length' must point to an allocated ub4.
6168  DESCRIPTION:
6169  Get the name of the type.
6170  RETURNS:
6171  the name of the type
6172  NOTES:
6173  The type descriptor, 'tdo', must be unpinned when the accessed
6174  information is no longer needed.
6175  }
6176  {------------------------ OCITypeSchema --------------------------------- }
6177  { ** OBSOLETE ** }
6178  TOCITypeSchema = function(env: POCIEnv; err: POCIError; const tdo: POCIType;
6179  n_length: Pub4): poratext; cdecl;
6180 
6181  {
6182  NAME: OCITypeSchema - ORT Get a Type's SCHema name.
6183  PARAMETERS:
6184  env (IN/OUT) - OCI environment handle initialized in object mode
6185  err (IN/OUT) - error handle. If there is an error, it is
6186  recorded in 'err' and this function returns OCI_ERROR.
6187  The error recorded in 'err' can be retrieved by calling
6188  OCIErrorGet().
6189  tdo (IN) - pointer to to the type descriptor in the object cache
6190  n_length (OUT) - length (in bytes) of the returned schema name. The
6191  caller must allocate space for the ub4 before calling this
6192  routine.
6193  REQUIRES:
6194  1) All type accessors require that the type be pinned before calling
6195  any accessor.
6196  2) All input parameters must not be NULL and must be valid.
6197  3) 'n_length' must point to an allocated ub4.
6198  DESCRIPTION:
6199  Get the schema name of the type.
6200  RETURNS:
6201  the schema name of the type
6202  NOTES:
6203  The type descriptor, 'tdo', must be unpinned when the accessed
6204  information is no longer needed.
6205  }
6206  {------------------------ OCITypeTypeCode --------------------------------- }
6207  { ** OBSOLETE ** }
6208  TOCITypeTypeCode = function(env: POCIEnv; err: POCIError;
6209  const tdo: POCIType): OCITypeCode; cdecl;
6210 
6211  {
6212  NAME: OCITypeTypeCode - OCI Get a Type's Type Code.
6213  PARAMETERS:
6214  env (IN/OUT) - OCI environment handle initialized in object mode
6215  err (IN/OUT) - error handle. If there is an error, it is
6216  recorded in 'err' and this function returns OCI_ERROR.
6217  The error recorded in 'err' can be retrieved by calling
6218  OCIErrorGet().
6219  tdo (IN) - pointer to to the type descriptor in the object cache
6220  REQUIRES:
6221  1) All type accessors require that the type be pinned before calling
6222  any accessor.
6223  2) All input parameters must not be NULL and must be valid.
6224  DESCRIPTION:
6225  Get the type code of the type.
6226  RETURNS:
6227  The type code of the type.
6228  NOTES:
6229  The type descriptor, 'tdo', must be unpinned when the accessed
6230  information is no longer needed.
6231  }
6232  {----------------------- OCITypeCollTypeCode ------------------------------- }
6233  { ** OBSOLETE ** }
6234  TOCITypeCollTypeCode = function(env:POCIEnv; err:POCIError;
6235  const tdo: POCIType): OCITypeCode; cdecl;
6236 
6237  {
6238  NAME: OCITypeCollTypeCode - OCI Get a Domain Type's Type Code.
6239  PARAMETERS:
6240  env (IN/OUT) - OCI environment handle initialized in object mode
6241  err (IN/OUT) - error handle. If there is an error, it is
6242  recorded in 'err' and this function returns OCI_ERROR.
6243  The error recorded in 'err' can be retrieved by calling
6244  OCIErrorGet().
6245  tdo (IN) - pointer to to the type descriptor in the object cache
6246  REQUIRES:
6247  1) All type accessors require that the type be pinned before calling
6248  any accessor.
6249  2) All input parameters must not be NULL and must be valid.
6250  3) 'tdo' MUST point to a named collection type.
6251  DESCRIPTION:
6252  Get the type code of the named collection type. For V8.0, named
6253  collection types can only be variable length arrays and nested tables.
6254  RETURNS:
6255  OCI_TYPECODE_VARRAY for variable length array, and
6256  OCI_TYPECODE_TABLE for nested tables.
6257  NOTES:
6258  The type descriptor, 'tdo', should be unpinned when the accessed
6259  information is no longer needed.
6260  }
6261  {------------------------- OCITypeVersion --------------------------------- }
6262  { ** OBSOLETE ** }
6263 (* Const before type ignored *)
6264  TOCITypeVersion = function(env: POCIEnv; err: POCIError; const tdo: POCIType;
6265  v_length: Pub4): poratext; cdecl;
6266 
6267  {
6268  NAME: OCITypeVersion - OCI Get a Type's user-readable VersioN.
6269  PARAMETERS:
6270  env (IN/OUT) - OCI environment handle initialized in object mode
6271  err (IN/OUT) - error handle. If there is an error, it is
6272  recorded in 'err' and this function returns OCI_ERROR.
6273  The error recorded in 'err' can be retrieved by calling
6274  OCIErrorGet().
6275  tdo (IN) - pointer to to the type descriptor in the object cache
6276  v_length (OUT) - length (in bytes) of the returned user-readable
6277  version. The caller must allocate space for the ub4 before
6278  calling this routine.
6279  REQUIRES:
6280  1) All type accessors require that the type be pinned before calling
6281  any accessor.
6282  2) All input parameters must not be NULL and must be valid.
6283  3) 'v_length' must point to an allocated ub4.
6284  DESCRIPTION:
6285  Get the user-readable version of the type.
6286  RETURNS:
6287  The user-readable version of the type
6288  NOTES:
6289  The type descriptor, 'tdo', must be unpinned when the accessed
6290  information is no longer needed.
6291  }
6292  {--------------------------- OCITypeAttrs --------------------------------- }
6293  { ** OBSOLETE ** }
6294  TOCITypeAttrs = function(env: POCIEnv; err: POCIError;
6295  const tdo:POCIType): ub4; cdecl;
6296 
6297  {
6298  NAME: OCITypeAttrs - OCI Get a Type's Number of Attributes.
6299  PARAMETERS:
6300  env (IN/OUT) - OCI environment handle initialized in object mode
6301  err (IN/OUT) - error handle. If there is an error, it is
6302  recorded in 'err' and this function returns OCI_ERROR.
6303  The error recorded in 'err' can be retrieved by calling
6304  OCIErrorGet().
6305  tdo (IN) - pointer to to the type descriptor in the object cache
6306  REQUIRES:
6307  1) All type accessors require that the type be pinned before calling
6308  any accessor.
6309  2) All input parameters must not be NULL and must be valid.
6310  DESCRIPTION:
6311  Get the number of attributes in the type.
6312  RETURNS:
6313  The number of attributes in the type. 0 for ALL non-ADTs.
6314  NOTES:
6315  The type descriptor, 'tdo', must be unpinned when the accessed
6316  information is no longer needed.
6317  }
6318  {------------------------- OCITypeMethods --------------------------------- }
6319  { ** OBSOLETE ** }
6320  TOCITypeMethods = function(env: POCIEnv; err: POCIError;
6321  const tdo: POCIType): ub4; cdecl;
6322 
6323  {
6324  NAME: OCITypeMethods - OCI Get a Type's Number of Methods.
6325  PARAMETERS:
6326  env (IN/OUT) - OCI environment handle initialized in object mode
6327  err (IN/OUT) - error handle. If there is an error, it is
6328  recorded in 'err' and this function returns OCI_ERROR.
6329  The error recorded in 'err' can be retrieved by calling
6330  OCIErrorGet().
6331  tdo (IN) - pointer to to the type descriptor in the object cache
6332  REQUIRES:
6333  1) All type accessors require that the type be pinned before calling
6334  any accessor.
6335  2) All input parameters must not be NULL and must be valid.
6336  DESCRIPTION:
6337  Get the number of methods in a type.
6338  RETURNS:
6339  The number of methods in the type
6340  NOTES:
6341  The type descriptor, 'tdo', must be unpinned when the accessed
6342  information is no longer needed.
6343  }
6344  {-------------------------------------------------------------------------- }
6345  { TYPE ELEMENT INFORMATION ACCESSORS }
6346  {-------------------------------------------------------------------------- }
6347  {------------------------ OCITypeElemName --------------------------------- }
6348  { ** OBSOLETE ** }
6349  TOCITypeElemName = function(env: POCIEnv; err: POCIError;
6350  const elem: POCITypeElem; n_length:Pub4): poratext; cdecl;
6351 
6352  {
6353  NAME: OCITypeElemName - OCI Get an Attribute's NaMe.
6354  PARAMETERS:
6355  env (IN/OUT) - OCI environment handle initialized in object mode
6356  err (IN/OUT) - error handle. If there is an error, it is
6357  recorded in 'err' and this function returns OCI_ERROR.
6358  The error recorded in 'err' can be retrieved by calling
6359  OCIErrorGet().
6360  elem (IN) - pointer to the type element descriptor in the object cache
6361  n_length (OUT) - length (in bytes) of the returned attribute name.
6362  The caller must allocate space for the ub4 before calling this
6363  routine.
6364  REQUIRES:
6365  1) All type accessors require that the type be pinned before calling
6366  any accessor.
6367  2) All input parameters must not be NULL and must be valid.
6368  3) 'n_length' must point to an allocated ub4.
6369  DESCRIPTION:
6370  Get the name of the attribute.
6371  RETURNS:
6372  the name of the attribute and the length in n_length
6373  NOTES:
6374  The type must be unpinned when the accessed information is no
6375  longer needed.
6376  }
6377  {------------------------ OCITypeElemTypeCode ------------------------------ }
6378  { ** OBSOLETE ** }
6379  TOCITypeElemTypeCode = function(env: POCIEnv; err: POCIError;
6380  const elem: POCITypeElem): OCITypeCode; cdecl;
6381 
6382  {
6383  NAME: OCITypeElemTypeCode - OCI Get an Attribute's TypeCode.
6384  PARAMETERS:
6385  env (IN/OUT) - OCI environment handle initialized in object mode
6386  err (IN/OUT) - error handle. If there is an error, it is
6387  recorded in 'err' and this function returns OCI_ERROR.
6388  The error recorded in 'err' can be retrieved by calling
6389  OCIErrorGet().
6390  elem (IN) - pointer to the type element descriptor in the object cache
6391  REQUIRES:
6392  1) All type accessors require that the type be pinned before calling
6393  any accessor.
6394  2) All input parameters must not be NULL and must be valid.
6395  DESCRIPTION:
6396  Get the typecode of an attribute's type.
6397  RETURNS:
6398  the typecode of the attribute's type. If this is a scalar type, the
6399  typecode sufficiently describes the scalar type and no further calls
6400  need to be made. Valid scalar types include: OCI_TYPECODE_SIGNED8,
6401  OCI_TYPECODE_UNSIGNED8, OCI_TYPECODE_SIGNED16, OCI_TYPECODE_UNSIGNED16,
6402  OCI_TYPECODE_SIGNED32, OCI_TYPECODE_UNSIGNED32, OCI_TYPECODE_REAL,
6403  OCI_TYPECODE_DOUBLE, OCI_TYPECODE_DATE,
6404  OCI_TYPECODE_MLSLABEL, OROTCOID, OCI_TYPECODE_OCTET, or OROTCLOB.
6405  This function converts the CREF (stored in the attribute) into a
6406  typecode.
6407  NOTES:
6408  The type must be unpinned when the accessed information is no
6409  longer needed.
6410  }
6411  {------------------------ OCITypeElemType --------------------------------- }
6412  { ** OBSOLETE ** }
6413  TOCITypeElemType = function(env: POCIEnv; err: POCIError;
6414  const elem: POCITypeElem; elem_tdo:PPOCIType): sword; cdecl;
6415 
6416  {
6417  PARAMETERS
6418  env (IN/OUT) - OCI environment handle initialized in object mode
6419  err (IN/OUT) - error handle. If there is an error, it is
6420  recorded in 'err' and this function returns OCI_ERROR.
6421  The error recorded in 'err' can be retrieved by calling
6422  OCIErrorGet().
6423  elem (IN) - pointer to the type element descriptor in the object cache
6424  elem_tdo (OUT) - If the function completes successfully, 'elem_tdo'
6425  points to the type descriptor (in the object cache) of the type of
6426  the element.
6427 
6428  REQUIRES
6429  1) All type accessors require that the type be pinned before calling
6430  any accessor. This can be done by calling 'OCITypeByName()'.
6431  2) if 'elem' is not null, it must point to a valid type element descriptor
6432  in the object cache.
6433 
6434  DESCRIPTION
6435  Get the type tdo of the type of this element.
6436  RETURNS
6437  OCI_SUCCESS if the function completes successfully.
6438  OCI_INVALID_HANDLE if 'env' or 'err' is null.
6439  OCI_ERROR if
6440  1) any of the parameters is null.
6441 
6442  NOTES
6443  The type must be unpinned when the accessed information is no
6444  longer needed. This can be done by calling 'OCIObjectUnpin()'.
6445  }
6446  {------------------------- OCITypeElemFlags ------------------------------- }
6447  { ** OBSOLETE ** }
6448  TOCITypeElemFlags = function(env: POCIEnv; err: POCIError;
6449  const elem: POCITypeElem): ub4; cdecl;
6450 
6451  {
6452  NAME: OCITypeElemFlags - OCI Get a Elem's FLags
6453  (inline, constant, virtual, constructor,
6454  destructor).
6455  PARAMETERS:
6456  env (IN/OUT) - OCI environment handle initialized in object mode
6457  err (IN/OUT) - error handle. If there is an error, it is
6458  recorded in 'err' and this function returns OCI_ERROR.
6459  The error recorded in 'err' can be retrieved by calling
6460  OCIErrorGet().
6461  elem (IN) - pointer to the type element descriptor in the object cache
6462  REQUIRES:
6463  1) All type accessors require that the type be pinned before calling
6464  any accessor.
6465  2) All input parameters must not be NULL and must be valid.
6466  DESCRIPTION:
6467  Get the flags of a type element (attribute, parameter).
6468  RETURNS:
6469  The flags of the type element.
6470  NOTES:
6471  The flag bits are not externally documented. Use only the macros
6472  in the last section (ie. OCI_TYPEPARAM_IS_REQUIRED, and
6473  OCI_TYPEELEM_IS_REF) to test for them only. The type must be unpinned
6474  when the accessed information is no longer needed.
6475  }
6476  {------------------------ OCITypeElemNumPrec ------------------------------ }
6477  { ** OBSOLETE ** }
6478  TOCITypeElemNumPrec = function(env: POCIEnv; err: POCIError;
6479  const elem: POCITypeElem): ub1; cdecl;
6480 
6481  {
6482  NAME: OCITypeElemNumPrec - Get a Number's Precision. This includes float,
6483  decimal, real, double, and oracle number.
6484  PARAMETERS:
6485  env (IN/OUT) - OCI environment handle initialized in object mode
6486  err (IN/OUT) - error handle. If there is an error, it is
6487  recorded in 'err' and this function returns OCI_ERROR.
6488  The error recorded in 'err' can be retrieved by calling
6489  OCIErrorGet().
6490  elem (IN) - pointer to the type element descriptor in the object cache
6491  REQUIRES:
6492  All input parameters must not be NULL and must be valid.
6493  DESCRIPTION:
6494  Get the precision of a float, decimal, long, unsigned long, real,
6495  double, or Oracle number type.
6496  RETURNS:
6497  the precision of the float, decimal, long, unsigned long, real, double,
6498  or Oracle number
6499  }
6500  {------------------------- OCITypeElemNumScale ----------------------------- }
6501  { ** OBSOLETE ** }
6502  TOCITypeElemNumScale = function(env: POCIEnv; err: POCIError;
6503  const elem: POCITypeElem): sb1; cdecl;
6504 
6505  {
6506  NAME: OCITypeElemNumScale - Get a decimal or oracle Number's Scale
6507  PARAMETERS:
6508  env (IN/OUT) - OCI environment handle initialized in object mode
6509  err (IN/OUT) - error handle. If there is an error, it is
6510  recorded in 'err' and this function returns OCI_ERROR.
6511  The error recorded in 'err' can be retrieved by calling
6512  OCIErrorGet().
6513  elem (IN) - pointer to the type element descriptor in the object cache
6514  REQUIRES:
6515  All input parameters must not be NULL and must be valid.
6516  DESCRIPTION:
6517  Get the scale of a decimal, or Oracle number type.
6518  RETURNS:
6519  the scale of the decimal, or Oracle number
6520  }
6521  {------------------------ OCITypeElemLength ------------------------------- }
6522  { ** OBSOLETE ** }
6523  TOCITypeElemLength = function(env: POCIEnv; err: POCIError;
6524  const elem:POCITypeElem): ub4; cdecl;
6525 
6526  {
6527  NAME: OCITypeElemLength - Get a raw, fixed or variable length String's
6528  length in bytes.
6529  PARAMETERS:
6530  env (IN/OUT) - OCI environment handle initialized in object mode
6531  err (IN/OUT) - error handle. If there is an error, it is
6532  recorded in 'err' and this function returns OCI_ERROR.
6533  The error recorded in 'err' can be retrieved by calling
6534  OCIErrorGet().
6535  elem (IN) - pointer to the type element descriptor in the object cache
6536  REQUIRES:
6537  All input parameters must not be NULL and must be valid.
6538  DESCRIPTION:
6539  Get the length of a raw, fixed or variable length string type.
6540  RETURNS:
6541  length of the raw, fixed or variable length string
6542  }
6543  {----------------------- OCITypeElemCharSetID ----------------------------- }
6544  { ** OBSOLETE ** }
6545  TOCITypeElemCharSetID = function(env: POCIEnv; err: POCIError;
6546  const elem: POCITypeElem): ub2; cdecl;
6547 
6548  {
6549  NAME: OCITypeElemCharSetID - Get a fixed or variable length String's
6550  character set ID
6551  PARAMETERS:
6552  env (IN/OUT) - OCI environment handle initialized in object mode
6553  err (IN/OUT) - error handle. If there is an error, it is
6554  recorded in 'err' and this function returns OCI_ERROR.
6555  The error recorded in 'err' can be retrieved by calling
6556  OCIErrorGet().
6557  elem (IN) - pointer to the type element descriptor in the object cache
6558  REQUIRES:
6559  All input parameters must not be NULL and must be valid.
6560  DESCRIPTION:
6561  Get the character set ID of a fixed or variable length string type.
6562  RETURNS:
6563  character set ID of the fixed or variable length string
6564  }
6565  {---------------------- OCITypeElemCharSetForm ---------------------------- }
6566  { ** OBSOLETE ** }
6567  TOCITypeElemCharSetForm = function(env: POCIEnv; err: POCIError;
6568  const elem: POCITypeElem): ub2; cdecl;
6569 
6570  {
6571  NAME: OCITypeElemCharSetForm - Get a fixed or variable length String's
6572  character set specification form.
6573  PARAMETERS:
6574  env (IN/OUT) - OCI environment handle initialized in object mode
6575  err (IN/OUT) - error handle. If there is an error, it is
6576  recorded in 'err' and this function returns OCI_ERROR.
6577  The error recorded in 'err' can be retrieved by calling
6578  OCIErrorGet().
6579  elem (IN) - pointer to the attribute information in the object cache
6580  REQUIRES:
6581  All input parameters must not be NULL and must be valid.
6582  DESCRIPTION:
6583  Get the character form of a fixed or variable length string type.
6584  The character form is an enumerated value that can be one of the
6585  4 values below:
6586  SQLCS_IMPLICIT for CHAR, VARCHAR2, CLOB w/o a specified set
6587  SQLCS_NCHAR for NCHAR, NCHAR VARYING, NCLOB
6588  SQLCS_EXPLICIT for CHAR, etc, with "CHARACTER SET ..." syntax
6589  SQLCS_FLEXIBLE for PL/SQL "flexible" parameters
6590  RETURNS:
6591  character form of the fixed or variable string
6592  }
6593  {--------------------- OCITypeElemParameterizedType ------------------------ }
6594  { ** OBSOLETE ** }
6595  TOCITypeElemParameterizedType = function(env: POCIEnv; err: POCIError;
6596  const elem: POCITypeElem; type_stored: PPOCIType): sword; cdecl;
6597 
6598  {
6599  NAME: OCITypeElemParameterizedType
6600  PARAMETERS:
6601  env (IN/OUT) - OCI environment handle initialized in object mode
6602  err (IN/OUT) - error handle. If there is an error, it is
6603  recorded in 'err' and this function returns OCI_ERROR.
6604  The error recorded in 'err' can be retrieved by calling
6605  OCIErrorGet().
6606  elem (IN) - pointer to the type element descriptor in the object cache
6607  type_stored (OUT) - If the function completes successfully,
6608  and the parameterized type is complex, 'type_stored' is NULL.
6609  Otherwise, 'type_stored' points to the type descriptor (in the
6610  object cache) of the type that is stored in the parameterized
6611  type. The caller must allocate space for the OCIType*
6612  before calling this routine and must not write into the space.
6613  REQUIRES:
6614  All input parameters must be valid.
6615  DESCRIPTION:
6616  Get a descriptor to the parameter type of a parameterized type.
6617  Parameterized types are types of the form:
6618  REF T
6619  VARRAY (n) OF T
6620  etc, where T is the parameter in the parameterized type.
6621  Additionally is_ref is set if the parameter is a PTR or REF.
6622  For example, it is set for REF T or VARRAY(n) OF REF T.
6623  RETURNS:
6624  OCI_SUCCESS if the function completes successfully.
6625  OCI_INVALID_HANDLE if 'env' or 'err' is null.
6626  OCI_ERROR if
6627  1) any of the parameters is null.
6628  2) 'type_stored' is not NULL but points to NULL data.
6629  NOTES:
6630  Complex parameterized types will be in a future release (once
6631  typedefs are supported. When setting the parameterized type
6632  information, the user must typedef the contents if it's a
6633  complex parameterized type. Ex. for varray<varray<car>>, use
6634  'typedef varray<car> varcar' and then use varray<varcar>.
6635  }
6636  {----------------------- OCITypeElemExtTypeCode ---------------------------- }
6637  { ** OBSOLETE ** }
6638  TOCITypeElemExtTypeCode = function(env: POCIEnv; err: POCIError;
6639  const elem: POCITypeElem): OCITypeCode; cdecl;
6640 
6641  {
6642  NAME: OCITypeElemExtTypeCode - OCI Get an element's SQLT constant.
6643  PARAMETERS:
6644  env (IN/OUT) - OCI environment handle initialized in object mode
6645  err (IN/OUT) - error handle. If there is an error, it is
6646  recorded in 'err' and this function returns OCI_ERROR.
6647  The error recorded in 'err' can be retrieved by calling
6648  OCIErrorGet().
6649  elem (IN) - pointer to the type element descriptor in the object cache
6650  REQUIRES:
6651  1) All type accessors require that the type be pinned before calling
6652  any accessor.
6653  2) All input parameters must not be NULL and must be valid.
6654  DESCRIPTION:
6655  Get the internal Oracle typecode associated with an attribute's type.
6656  This is the actual typecode for the attribute when it gets mapped
6657  to a column in the Oracle database.
6658  RETURNS:
6659  The Oracle typecode associated with the attribute's type.
6660  NOTES:
6661  The type must be unpinned when the accessed information is no
6662  longer needed.
6663  }
6664  {-------------------------------------------------------------------------- }
6665  { ATTRIBUTE ACCESSORS }
6666  {-------------------------------------------------------------------------- }
6667  {------------------------ OCITypeAttrByName ------------------------------- }
6668  { ** OBSOLETE ** }
6669  TOCITypeAttrByName = function(env: POCIEnv; err: POCIError;
6670  const tdo: POCIType; const name: Poratext; const n_length: ub4;
6671  elem: PPOCITypeElem): sword; cdecl;
6672 
6673  {
6674  NAME: OCITypeAttrByName - OCI Get an Attribute By Name.
6675  PARAMETERS:
6676  env (IN/OUT) - OCI environment handle initialized in object mode
6677  err (IN/OUT) - error handle. If there is an error, it is
6678  recorded in 'err' and this function returns OCI_ERROR.
6679  The error recorded in 'err' can be retrieved by calling
6680  OCIErrorGet().
6681  tdo (IN) - pointer to to the type descriptor in the object cache
6682  name (IN) - the attribute's name
6683  n_length (IN) - length (in bytes) of the 'name' parameter
6684  elem (OUT) - If this function completes successfully, 'elem' points to
6685  the selected type element descriptor pertaining to the
6686  attributein the object cache.
6687  REQUIRES:
6688  1) All type accessors require that the type be pinned before calling
6689  any accessor.
6690  2) if 'tdo' is not null, it must point to a valid type descriptor
6691  in the object cache.
6692  DESCRIPTION:
6693  Get an attribute given its name.
6694  RETURNS:
6695  OCI_SUCCESS if the function completes successfully.
6696  OCI_INVALID_HANDLE if 'env' or 'err' is null.
6697  OCI_ERROR if
6698  1) any of the required parameters is null.
6699  2) the type does not contain an attribute with the input 'name'.
6700  3) 'name' is NULL.
6701  NOTES:
6702  The type descriptor, 'tdo', must be unpinned when the accessed
6703  information is no longer needed.
6704  Schema and type names are CASE-SENSITIVE. If they have been created
6705  via SQL, you need to use uppercase names.
6706  }
6707  {------------------------ OCITypeAttrNext --------------------------------- }
6708  { ** OBSOLETE ** }
6709  TOCITypeAttrNext = function(env: POCIEnv; err: POCIError;
6710  iterator_ort: POCITypeIter; elem: PPOCITypeElem): sword; cdecl;
6711 
6712  {
6713  NAME: OCITypeAttrNext - OCI Get an Attribute By Iteration.
6714  PARAMETERS:
6715  env (IN/OUT) - OCI environment handle initialized in object mode
6716  err (IN/OUT) - error handle. If there is an error, it is
6717  recorded in 'err' and this function returns OCI_ERROR.
6718  The error recorded in 'err' can be retrieved by calling
6719  OCIErrorGet().
6720  iterator_ort (IN/OUT) - iterator for retrieving the next attribute;
6721  see OCITypeIterNew() to initialize iterator.
6722  elem (OUT) - If this function completes successfully, 'elem' points to
6723  the selected type element descriptor pertaining to the
6724  attributein the object cache.
6725  REQUIRES:
6726  1) All type accessors require that the type be pinned before calling
6727  any accessor.
6728  2) if 'tdo' is not null, it must point to a valid type descriptor
6729  in the object cache.
6730  DESCRIPTION:
6731  Iterate to the next attribute to retrieve.
6732  RETURNS:
6733  OCI_SUCCESS if the function completes successfully.
6734  OCI_NO_DATA if there are no more attributes to iterate on; use
6735  OCITypeIterSet() to reset the iterator if necessary.
6736  OCI_INVALID_HANDLE if 'env' or 'err' is null.
6737  OCI_ERROR if
6738  1) any of the required parameters is null.
6739  NOTES:
6740  The type must be unpinned when the accessed information is no
6741  longer needed.
6742  }
6743  {-------------------------------------------------------------------------- }
6744  { COLLECTION ACCESSORS }
6745  {-------------------------------------------------------------------------- }
6746  {------------------------ OCITypeCollElem --------------------------------- }
6747  { ** OBSOLETE ** }
6748  TOCITypeCollElem = function(env: POCIEnv; err: POCIError; const tdo:POCIType;
6749  element: PPOCITypeElem): sword; cdecl;
6750 
6751  {
6752  NAME: OCITypeCollElem
6753  PARAMETERS:
6754  env (IN/OUT) - OCI environment handle initialized in object mode
6755  err (IN/OUT) - error handle. If there is an error, it is
6756  recorded in 'err' and this function returns OCI_ERROR.
6757  The error recorded in 'err' can be retrieved by calling
6758  OCIErrorGet().
6759  tdo (IN) - pointer to the type descriptor in the object cache
6760  element (IN/OUT) - If the function completes successfully, this
6761  points to the descriptor for the collection's element.
6762  It is stored in the same format as an ADT attribute's
6763  descriptor.
6764  If *element is NULL, OCITypeCollElem() implicitly allocates a
6765  new instance of OCITypeElem in the object cache. This instance
6766  will be
6767  automatically freed at the end of the session, and does not have
6768  to be freed explicitly.
6769  If *element is not NULL, OCITypeCollElem() assumes that it
6770  points to a valid OCITypeElem descriptor and will copy the
6771  results into it.
6772  REQUIRES:
6773  All input parameters must be valid.
6774  DESCRIPTION:
6775  Get a pointer to the descriptor (OCITypeElem) of the element of an
6776  array or the rowtype of a nested table.
6777  RETURNS:
6778  OCI_SUCCESS if the function completes successfully.
6779  OCI_INVALID_HANDLE if 'env' or 'err' is null.
6780  OCI_ERROR if
6781  1) any of the parameters is null.
6782  2) the type TDO does not point to a valid collection's type.
6783  NOTES:
6784  Complex parameterized types will be in a future release (once
6785  typedefs are supported. When setting the parameterized type
6786  information, the user must typedef the contents if it's a
6787  complex parameterized type. Ex. for varray<varray<car>>, use
6788  'typedef varray<car> varcar' and then use varray<varcar>.
6789  }
6790  {------------------------ OCITypeCollSize --------------------------------- }
6791  { ** OBSOLETE ** }
6792  TOCITypeCollSize = function(env: POCIEnv; err: POCIError; const tdo: POCIType;
6793  num_elems: Pub4): sword; cdecl;
6794 
6795  {
6796  NAME: OCITypeCollSize - OCI Get a Collection's Number of Elements.
6797  PARAMETERS:
6798  env (IN/OUT) - OCI environment handle initialized in object mode
6799  err (IN/OUT) - error handle. If there is an error, it is
6800  recorded in 'err' and this function returns OCI_ERROR.
6801  The error recorded in 'err' can be retrieved by calling
6802  OCIErrorGet().
6803  tdo (IN) - pointer to the type descriptor in the object cache
6804  num_elems (OUT) - number of elements in collection
6805  REQUIRES:
6806  All input parameters must be valid. tdo points to an array type
6807  defined as a domain.
6808  DESCRIPTION:
6809  Get the number of elements stored in a fixed array or the maximum
6810  number of elements in a variable array.
6811  RETURNS:
6812  OCI_SUCCESS if the function completes successfully.
6813  OCI_INVALID_HANDLE if 'env' or 'err' is null.
6814  OCI_ERROR if
6815  1) any of the parameters is null.
6816  2) 'tdo' does not point to a domain with a collection type.
6817  NOTES:
6818  Complex parameterized types will be in a future release (once
6819  typedefs are supported. When setting the parameterized type
6820  information, the user must typedef the contents if it's a
6821  complex parameterized type. Ex. for varray<varray<car>>, use
6822  'typedef varray<car> varcar' and then use varray<varcar>.
6823  }
6824  {------------------------ OCITypeCollExtTypeCode --------------------------- }
6825  { ** OBSOLETE ** }
6826  TOCITypeCollExtTypeCode = function(env: POCIEnv; err: POCIError;
6827  const tdo:POCIType; sqt_code: POCITypeCode): sword; cdecl;
6828 
6829  {
6830  NAME: ortcsqt - OCI Get a Collection element's DTY constant.
6831  PARAMETERS:
6832  env (IN/OUT) - OCI environment handle initialized in object mode
6833  err (IN/OUT) - error handle. If there is an error, it is
6834  recorded in 'err' and this function returns OCI_ERROR.
6835  The error recorded in 'err' can be retrieved by calling
6836  OCIErrorGet().
6837  tdo (IN) - pointer to the type descriptor in the object cache
6838  sqt_code (OUT) - SQLT code of type element.
6839  REQUIRES:
6840  1) All type accessors require that the type be pinned before calling
6841  any accessor.
6842  2) All input parameters must not be NULL and must be valid.
6843  DESCRIPTION:
6844  Get the SQLT constant associated with an domain's element type.
6845  The SQLT codes are defined in <sqldef.h> and are needed for OCI/OOCI
6846  use.
6847  RETURNS:
6848  OCI_SUCCESS if the function completes successfully.
6849  OCI_INVALID_HANDLE if 'env' or 'err' is null.
6850  OCI_ERROR if
6851  1) any of the parameters is null.
6852  2) 'tdo' does not point to a domain with a collection type.
6853  NOTES:
6854  The type must be unpinned when the accessed information is no
6855  longer needed.
6856  }
6857  {-------------------------------------------------------------------------- }
6858  { METHOD ACCESSORS }
6859  {-------------------------------------------------------------------------- }
6860  {------------------------- OCITypeMethodOverload -------------------------- }
6861  { ** OBSOLETE ** }
6862  TOCITypeMethodOverload = function(env: POCIEnv; err: POCIError;
6863  const tdo: POCIType; const method_name: Poratext;
6864  const m_length: ub4): ub4; cdecl;
6865 
6866  {
6867  NAME: OCITypeMethodOverload - OCI Get type's Number of Overloaded names
6868  for the given method name.
6869  PARAMETERS:
6870  gp (IN/OUT) - pga environment handle. Any errors are recorded here.
6871  tdo (IN) - pointer to to the type descriptor in the object cache
6872  method_name (IN) - the method's name
6873  m_length (IN) - length (in bytes) of the 'method_name' parameter
6874  REQUIRES:
6875  1) All type accessors require that the type be pinned before calling
6876  any accessor.
6877  2) if 'tdo' is not null, it must point to a valid type descriptor
6878  in the object cache.
6879  DESCRIPTION:
6880  Overloading of methods implies that more than one method may have the
6881  same method name. This routine returns the number of methods that
6882  have the given method name. If there are no methods with the input
6883  method name, 'num_methods' is 0. The caller uses this information when
6884  allocating space for the array of mdo and/or position pointers before
6885  calling 'OCITypeMethodByName()' or 'ortgmps()'.
6886  RETURNS:
6887  The number of methods with the given name. 0 if none contains the
6888  name.
6889  NOTES:
6890  Schema and type names are CASE-SENSITIVE. If they have been created
6891  via SQL, you need to use uppercase names.
6892  }
6893  {------------------------ OCITypeMethodByName ------------------------------ }
6894  { ** OBSOLETE ** }
6895  TOCITypeMethodByName = function(env: POCIEnv; err: POCIError;
6896  const tdo: POCIType; const method_name: Poratext; const m_length: ub4;
6897  mdos: PPOCITypeMethod): sword; cdecl;
6898 
6899  {
6900  NAME: OCITypeMethodByName - OCI Get one or more Methods with Name.
6901  PARAMETERS:
6902  env (IN/OUT) - OCI environment handle initialized in object mode
6903  err (IN/OUT) - error handle. If there is an error, it is
6904  recorded in 'err' and this function returns OCI_ERROR.
6905  The error recorded in 'err' can be retrieved by calling
6906  OCIErrorGet().
6907  tdo (IN) - pointer to to the type descriptor in the object cache
6908  method_name (IN) - the methods' name
6909  m_length (IN) - length (in bytes) of the 'name' parameter
6910  mdos (OUT) - If this function completes successfully, 'mdos' points to
6911  the selected methods in the object cache. The caller must
6912  allocate space for the array of OCITypeMethod pointers before
6913  calling this routine and must not write into the space.
6914  The number of OCITypeMethod pointers that will be returned can
6915  be obtained by calling 'OCITypeMethodOverload()'.
6916  REQUIRES:
6917  1) All type accessors require that the type be pinned before calling
6918  any accessor.
6919  2) if 'tdo' is not null, it must point to a valid type descriptor
6920  in the object cache.
6921  DESCRIPTION:
6922  Get one or more methods given the name.
6923  RETURNS:
6924  OCI_SUCCESS if the function completes successfully.
6925  OCI_INVALID_HANDLE if 'env' or 'err' is null.
6926  OCI_ERROR if
6927  1) any of the required parameters is null.
6928  2) No methods in type has name 'name'.
6929  3) 'mdos' is not NULL but points to NULL data.
6930  NOTES:
6931  The type must be unpinned when the accessed information is no
6932  longer needed.
6933  Schema and type names are CASE-SENSITIVE. If they have been created
6934  via SQL, you need to use uppercase names.
6935  }
6936  {------------------------ OCITypeMethodNext -------------------------------- }
6937  { ** OBSOLETE ** }
6938  TOCITypeMethodNext = function(env: POCIEnv; err: POCIError;
6939  iterator_ort: POCITypeIter; mdo: PPOCITypeMethod): sword; cdecl;
6940 
6941  {
6942  NAME: OCITypeMethodNext - OCI Get a Method By Iteration.
6943  PARAMETERS:
6944  env (IN/OUT) - OCI environment handle initialized in object mode
6945  err (IN/OUT) - error handle. If there is an error, it is
6946  recorded in 'err' and this function returns OCI_ERROR.
6947  The error recorded in 'err' can be retrieved by calling
6948  OCIErrorGet().
6949  iterator_ort (IN/OUT) - iterator for retrieving the next method;
6950  see OCITypeIterNew() to set iterator.
6951  mdo (OUT) - If this function completes successfully, 'mdo' points to
6952  the selected method descriptor in the object cache. Positions
6953  start at 1. The caller must allocate space for the
6954  OCITypeMethod* before calling this routine and must not write
6955  nto the space.
6956  REQUIRES:
6957  1) All type accessors require that the type be pinned before calling
6958  any accessor.
6959  2) if 'tdo' is not null, it must point to a valid type descriptor
6960  in the object cache.
6961  DESCRIPTION:
6962  Iterate to the next method to retrieve.
6963  RETURNS:
6964  OCI_SUCCESS if the function completes successfully.
6965  OCI_NO_DATA if there are no more attributes to iterate on; use
6966  OCITypeIterSet() to reset the iterator if necessary.
6967  OCI_INVALID_HANDLE if 'env' or 'err' is null.
6968  OCI_ERROR if
6969  1) any of the required parameters is null.
6970  2) 'mdo' is not NULL but points to NULL data.
6971  NOTES:
6972  The type must be unpinned when the accessed information is no
6973  longer needed.
6974  }
6975  {------------------------ OCITypeMethodName -------------------------------- }
6976  { ** OBSOLETE ** }
6977  TOCITypeMethodName = function(env:POCIEnv; err: POCIError;
6978  const mdo: POCITypeMethod; n_length: Pub4): poratext; cdecl;
6979  {
6980  NAME: OCITypeMethodName - OCI Get a Method's NaMe.
6981  PARAMETERS:
6982  env (IN/OUT) - OCI environment handle initialized in object mode
6983  err (IN/OUT) - error handle. If there is an error, it is
6984  recorded in 'err' and this function returns OCI_ERROR.
6985  The error recorded in 'err' can be retrieved by calling
6986  OCIErrorGet().
6987  mdo (IN) - pointer to the method descriptor in the object cache
6988  n_length (OUT) - length (in bytes) of the 'name' parameter. The caller
6989  must allocate space for the ub4 before calling this routine.
6990  REQUIRES:
6991  1) All type accessors require that the type be pinned before calling
6992  any accessor.
6993  2) All input parameters must not be NULL and must be valid.
6994  DESCRIPTION:
6995  Get the (non-unique) real name of the method.
6996  RETURNS:
6997  the non-unique name of the method or NULL if there is an error.
6998  NOTES:
6999  The type must be unpinned when the accessed information is no
7000  longer needed.
7001  }
7002  {------------------------ OCITypeMethodEncap ------------------------------- }
7003  { ** OBSOLETE ** }
7004  TOCITypeMethodEncap = function(env: POCIEnv; err: POCIError;
7005  const mdo: POCITypeMethod): OCITypeEncap; cdecl;
7006 
7007  {
7008  NAME: OCITypeMethodEncap - Get a Method's ENcapsulation (private/public).
7009  PARAMETERS:
7010  env (IN/OUT) - OCI environment handle initialized in object mode
7011  err (IN/OUT) - error handle. If there is an error, it is
7012  recorded in 'err' and this function returns OCI_ERROR.
7013  The error recorded in 'err' can be retrieved by calling
7014  OCIErrorGet().
7015  mdo (IN) - pointer to the method descriptor in the object cache
7016  REQUIRES:
7017  1) All type accessors require that the type be pinned before calling
7018  any accessor.
7019  2) All input parameters must not be NULL and must be valid.
7020  DESCRIPTION:
7021  Get the encapsulation (private, or public) of a method.
7022  RETURNS:
7023  the encapsulation (private, or public) of the method
7024  NOTES:
7025  The type must be unpinned when the accessed information is no
7026  longer needed.
7027  }
7028  {------------------------ OCITypeMethodFlags ------------------------------- }
7029  { ** OBSOLETE ** }
7030  TOCITypeMethodFlags = function(env: POCIEnv; err: POCIError;
7031  const mdo:POCITypeMethod): OCITypeMethodFlag; cdecl;
7032 
7033  {
7034  NAME: OCITypeMethodFlags - OCI Get a Method's FLags
7035  (inline, constant, virtual, constructor,
7036  destructor).
7037  PARAMETERS:
7038  env (IN/OUT) - OCI environment handle initialized in object mode
7039  err (IN/OUT) - error handle. If there is an error, it is
7040  recorded in 'err' and this function returns OCI_ERROR.
7041  The error recorded in 'err' can be retrieved by calling
7042  OCIErrorGet().
7043  mdo (IN) - pointer to the method descriptor in the object cache
7044  REQUIRES:
7045  1) All type accessors require that the type be pinned before calling
7046  any accessor.
7047  2) All input parameters must not be NULL and must be valid.
7048  DESCRIPTION:
7049  Get the flags (inline, constant, virutal, constructor, destructor) of
7050  a method.
7051  RETURNS:
7052  the flags (inline, constant, virutal, constructor, destructor) of
7053  the method
7054  NOTES:
7055  The type must be unpinned when the accessed information is no
7056  longer needed.
7057  }
7058  {------------------------ OCITypeMethodMap --------------------------------- }
7059  { ** OBSOLETE ** }
7060  TOCITypeMethodMap = function(env: POCIEnv; err: POCIError; const tdo: POCIType;
7061  mdo: PPOCITypeMethod): sword; cdecl;
7062 
7063  {
7064  NAME: OCITypeMethodMap - OCI Get the Method's MAP function.
7065  PARAMETERS:
7066  env (IN/OUT) - OCI environment handle initialized in object mode
7067  err (IN/OUT) - error handle. If there is an error, it is
7068  recorded in 'err' and this function returns OCI_ERROR.
7069  The error recorded in 'err' can be retrieved by calling
7070  OCIErrorGet().
7071  tdo (IN) - pointer to to the type descriptor in the object cache
7072  mdo (OUT) - If this function completes successfully, and there is a
7073  map function for this type, 'mdo' points to the selected method
7074  descriptor in the object cache. Otherwise, 'mdo' is null.
7075  REQUIRES:
7076  1) All type accessors require that the type be pinned before calling
7077  any accessor.
7078  2) All required input parameters must not be NULL and must be valid.
7079  DESCRIPTION:
7080  A type may have only one map function. 'OCITypeMethodMap()' finds
7081  this function, if it exists, and returns a reference and a pointer to
7082  the method descriptor in the object cache. If the type does not have a
7083  map (relative ordering) function, then 'mdo_ref' and 'mdo' are set
7084  to null and an error is returned.
7085  RETURNS:
7086  OCI_SUCCESS if the function completes successfully.
7087  OCI_INVALID_HANDLE if 'env' or 'err' is null.
7088  OCI_ERROR if
7089  the type does not contain a map function.
7090  NOTES:
7091  The type must be unpinned when the accessed information is no
7092  longer needed.
7093  }
7094  {------------------------ OCITypeMethodOrder ------------------------------- }
7095  { ** OBSOLETE ** }
7096  TOCITypeMethodOrder = function(env: POCIEnv; err: POCIError;
7097  const tdo: POCIType; mdo: PPOCITypeMethod): sword; cdecl;
7098 
7099  {
7100  NAME: OCITypeMethodOrder - OCI Get the Method's ORder function.
7101  PARAMETERS:
7102  env (IN/OUT) - OCI environment handle initialized in object mode
7103  err (IN/OUT) - error handle. If there is an error, it is
7104  recorded in 'err' and this function returns OCI_ERROR.
7105  The error recorded in 'err' can be retrieved by calling
7106  OCIErrorGet().
7107  tdo (IN) - pointer to to the type descriptor in the object cache
7108  mdo (OUT) - If this function completes successfully, and there is a
7109  map function for this type, 'mdo' points to the selected method
7110  descriptor in the object cache. Otherwise, 'mdo' is null.
7111  REQUIRES:
7112  1) All type accessors require that the type be pinned before calling
7113  any accessor.
7114  2) All required input parameters must not be NULL and must be valid.
7115  DESCRIPTION:
7116  A type may have only one ORder or MAP function. 'OCITypeMethodOrder()'
7117  finds this function, if it exists, and returns a ref and a pointer
7118  to the method descriptor in the object cache. If the type does not
7119  have a map (relative ordering) function, then 'mdo_ref' and 'mdo' are
7120  set to null and an error is returned.
7121  RETURNS:
7122  OCI_SUCCESS if the function completes successfully.
7123  OCI_INVALID_HANDLE if 'env' or 'err' is null.
7124  OCI_ERROR if
7125  the type does not contain a map function.
7126  NOTES:
7127  The type must be unpinned when the accessed information is no
7128  longer needed.
7129  }
7130  {------------------------ OCITypeMethodParams ------------------------------ }
7131  { ** OBSOLETE ** }
7132  TOCITypeMethodParams = function(env: POCIEnv; err: POCIError;
7133  const mdo: POCITypeMethod): ub4; cdecl;
7134 
7135  {
7136  NAME: OCITypeMethodParams - OCI Get a Method's Number of Parameters.
7137  PARAMETERS:
7138  env (IN/OUT) - OCI environment handle initialized in object mode
7139  err (IN/OUT) - error handle. If there is an error, it is
7140  recorded in 'err' and this function returns OCI_ERROR.
7141  The error recorded in 'err' can be retrieved by calling
7142  OCIErrorGet().
7143  mdo (IN) - pointer to the method descriptor in the object cache
7144  REQUIRES:
7145  1) All type accessors require that the type be pinned before calling
7146  any accessor.
7147  2) All input parameters must not be NULL and must be valid.
7148  DESCRIPTION:
7149  Get the number of parameters in a method.
7150  RETURNS:
7151  the number of parameters in the method
7152  NOTES:
7153  The type must be unpinned when the accessed information is no
7154  longer needed.
7155  }
7156  {-------------------------------------------------------------------------- }
7157  { RESULT ACCESSORS }
7158  {-------------------------------------------------------------------------- }
7159  {-------------------------- OCITypeResult --------------------------------- }
7160  { ** OBSOLETE ** }
7161  TOCITypeResult = function(env: POCIEnv; err: POCIError;
7162  const mdo: POCITypeMethod; elem: PPOCITypeElem): sword; cdecl;
7163 
7164  {
7165  NAME: OCITypeResult - OCI Get a method's result type descriptor.
7166  PARAMETERS:
7167  env (IN/OUT) - OCI environment handle initialized in object mode
7168  err (IN/OUT) - error handle. If there is an error, it is
7169  recorded in 'err' and this function returns OCI_ERROR.
7170  The error recorded in 'err' can be retrieved by calling
7171  OCIErrorGet().
7172  mdo (IN) - pointer to the method descriptor in the object cache
7173  elem (OUT) - If this function completes successfully, 'rdo' points to
7174  the selected result (parameter) descriptor in the object cache.
7175  REQUIRES:
7176  1) All type accessors require that the type be pinned before calling
7177  any accessor.
7178  2) 'elem' MUST be the address of an OCITypeElem pointer.
7179  DESCRIPTION:
7180  Get the result of a method.
7181  RETURNS:
7182  OCI_SUCCESS if the function completes successfully.
7183  OCI_INVALID_HANDLE if 'env' or 'err' is null.
7184  OCI_ERROR if
7185  1) any of the required parameters is null.
7186  2) method returns no results.
7187  NOTES:
7188  The method must be unpinned when the accessed information is no
7189  longer needed.
7190  }
7191  {-------------------------------------------------------------------------- }
7192  { PARAMETER ACCESSORS }
7193  {-------------------------------------------------------------------------- }
7194  {------------------------ OCITypeParamByPos ------------------------------- }
7195  { ** OBSOLETE ** }
7196  TOCITypeParamByPos = function(env: POCIEnv; err: POCIError;
7197  const mdo: POCITypeMethod; const position: ub4;
7198  elem: PPOCITypeElem): sword; cdecl;
7199 
7200  {
7201  NAME: OCITypeParamByPos - OCI Get a Parameter in a method By Position.
7202  PARAMETERS:
7203  env (IN/OUT) - OCI environment handle initialized in object mode
7204  err (IN/OUT) - error handle. If there is an error, it is
7205  recorded in 'err' and this function returns OCI_ERROR.
7206  The error recorded in 'err' can be retrieved by calling
7207  OCIErrorGet().
7208  mdo (IN) - pointer to the method descriptor in the object cache
7209  position (IN) - the parameter's position. Positions start at 1.
7210  elem (OUT) - If this function completes successfully, 'elem' points to
7211  the selected parameter descriptor in the object cache.
7212  REQUIRES:
7213  1) All type accessors require that the type be pinned before calling
7214  any accessor.
7215  DESCRIPTION:
7216  Get a parameter given its position in the method. Positions start
7217  at 1.
7218  RETURNS:
7219  OCI_SUCCESS if the function completes successfully.
7220  OCI_INVALID_HANDLE if 'env' or 'err' is null.
7221  OCI_ERROR if
7222  1) any of the required parameters is null.
7223  2) 'position' is not >= 1 and <= the number of parameters in the
7224  method.
7225  NOTES:
7226  The type must be unpinned when the accessed information is no
7227  longer needed.
7228  }
7229  {------------------------ OCITypeParamByName ------------------------------- }
7230  { ** OBSOLETE ** }
7231  TOCITypeParamByName = function(env: POCIEnv; err: POCIError;
7232  const mdo: POCITypeMethod; const name: Poratext; const n_length: ub4;
7233  elem:PPOCITypeElem): sword; cdecl;
7234 
7235  {
7236  NAME: OCITypeParamByName - OCI Get a Parameter in a method By Name.
7237  PARAMETERS:
7238  env (IN/OUT) - OCI environment handle initialized in object mode
7239  err (IN/OUT) - error handle. If there is an error, it is
7240  recorded in 'err' and this function returns OCI_ERROR.
7241  The error recorded in 'err' can be retrieved by calling
7242  OCIErrorGet().
7243  mdo (IN) - pointer to the method descriptor in the object cache
7244  name (IN) - the parameter's name
7245  n_length (IN) - length (in bytes) of the 'name' parameter
7246  elem (OUT) - If this function completes successfully, 'elem' points to
7247  the selected parameter descriptor in the object cache.
7248  REQUIRES:
7249  1) All type accessors require that the type be pinned before calling
7250  any accessor.
7251  2) if 'mdo' is not null, it must point to a valid method descriptor
7252  in the object cache.
7253  DESCRIPTION:
7254  Get a parameter given its name.
7255  RETURNS:
7256  OCI_SUCCESS if the function completes successfully.
7257  OCI_INVALID_HANDLE if 'env' or 'err' is null.
7258  OCI_ERROR if
7259  1) any of the required parameters is null.
7260  2) the method does not contain a parameter with the input 'name'.
7261  NOTES:
7262  The type must be unpinned when the accessed information is no
7263  longer needed.
7264  }
7265  {------------------------ OCITypeParamPos --------------------------------- }
7266  { ** OBSOLETE ** }
7267  TOCITypeParamPos = function(env: POCIEnv; err: POCIError;
7268  const mdo: POCITypeMethod; const name: Poratext; const n_length: ub4;
7269  position: Pub4; elem: PPOCITypeElem): sword; cdecl;
7270 
7271  {
7272  NAME: OCITypeParamPos - OCI Get a parameter's position in a method
7273  PARAMETERS:
7274  env (IN/OUT) - OCI environment handle initialized in object mode
7275  err (IN/OUT) - error handle. If there is an error, it is
7276  recorded in 'err' and this function returns OCI_ERROR.
7277  The error recorded in 'err' can be retrieved by calling
7278  OCIErrorGet().
7279  mdo (IN) - pointer to the method descriptor in the object cache
7280  name (IN) - the parameter's name
7281  n_length (IN) - length (in bytes) of the 'name' parameter
7282  position (OUT) - If this function completes successfully, 'position'
7283  points to the position of the parameter in the method starting
7284  at position 1. position MUST point to space for a ub4.
7285  elem (OUT) - If this function completes successfully, and
7286  the input 'elem' is not NULL, 'elem' points to the selected
7287  parameter descriptor in the object cache.
7288  REQUIRES:
7289  1) All type accessors require that the type be pinned before calling
7290  any accessor.
7291  2) if 'mdo' is not null, it must point to a valid method descriptor
7292  in the object cache.
7293  DESCRIPTION:
7294  Get the position of a parameter in a method. Positions start at 1.
7295  RETURNS:
7296  OCI_SUCCESS if the function completes successfully.
7297  OCI_INVALID_HANDLE if 'env' or 'err' is null.
7298  OCI_ERROR if
7299  1) any of the parameters is null.
7300  2) the method does not contain a parameter with the input 'name'.
7301  NOTES:
7302  The type must be unpinned when the accessed information is no
7303  longer needed.
7304  }
7305  {------------------------ OCITypeParamElemMode ----------------------------- }
7306  { ** OBSOLETE ** }
7307  TOCITypeElemParamMode = function(env: POCIEnv; err: POCIError;
7308  const elem: POCITypeElem): OCITypeParamMode; cdecl;
7309 
7310  {
7311  NAME: OCITypeElemParamMode - OCI Get a parameter's mode
7312  PARAMETERS:
7313  env (IN/OUT) - OCI environment handle initialized in object mode
7314  err (IN/OUT) - error handle. If there is an error, it is
7315  recorded in 'err' and this function returns OCI_ERROR.
7316  The error recorded in 'err' can be retrieved by calling
7317  OCIErrorGet().
7318  elem (IN) - pointer to the parameter descriptor in the object cache
7319  (represented by an OCITypeElem)
7320  REQUIRES:
7321  1) All type accessors require that the type be pinned before calling
7322  any accessor.
7323  2) All input parameters must not be NULL and must be valid.
7324  DESCRIPTION:
7325  Get the mode (in, out, or in/out) of the parameter.
7326  RETURNS:
7327  the mode (in, out, or in/out) of the parameter
7328  NOTES:
7329  The type must be unpinned when the accessed information is no
7330  longer needed.
7331  }
7332  {------------------------- OCITypeElemDefaultValue ------------------------- }
7333  { ** OBSOLETE ** }
7334  TOCITypeElemDefaultValue = function(env: POCIEnv; err: POCIError;
7335  const elem: POCITypeElem; d_v_length: Pub4): poratext; cdecl;
7336 
7337  {
7338  NAME: OCITypeElemDefaultValue - OCI Get the element's Default Value.
7339  PARAMETERS:
7340  env (IN/OUT) - OCI environment handle initialized in object mode
7341  err (IN/OUT) - error handle. If there is an error, it is
7342  recorded in 'err' and this function returns OCI_ERROR.
7343  The error recorded in 'err' can be retrieved by calling
7344  OCIErrorGet().
7345  elem (IN) - pointer to the parameter descriptor in the object cache
7346  (represented by an OCITypeElem)
7347  d_v_length (OUT) - length (in bytes) of the returned default value.
7348  The caller must allocate space for the ub4 before calling this
7349  routine.
7350  REQUIRES:
7351  1) All type accessors require that the type be pinned before calling
7352  any accessor.
7353  2) All input parameters must not be NULL and must be valid.
7354  DESCRIPTION:
7355  Get the default value in text form (PL/SQL) of an element. For V8.0,
7356  this only makes sense for a method parameter.
7357  RETURNS:
7358  The default value (text) of the parameter.
7359  NOTES:
7360  The type must be unpinned when the accessed information is no
7361  longer needed.
7362  }
7363  {-------------------------------------------------------------------------- }
7364  { TYPE VERSION TABLE }
7365  {-------------------------------------------------------------------------- }
7366  { For V8.0, the type version table is meant to be an internal data structure
7367  only for Oracle clients for type version maintanence purposes. A more
7368  general version of the API may be made public in subsequent releases. }
7369  {--------------------------- OCITypeVTInit -------------------------------- }
7370  { ** OBSOLETE ** }
7371  TOCITypeVTInit = function(env: POCIEnv; err: POCIError): sword; cdecl;
7372 
7373  {
7374  NAME: OCITypeVTInit - OCI type Version table INItialize
7375  PARAMETERS:
7376  env (IN/OUT) - OCI environment handle initialized in object mode
7377  err (IN/OUT) - error handle. If there is an error, it is
7378  recorded in 'err' and this function returns OCI_ERROR.
7379  The error recorded in 'err' can be retrieved by calling
7380  OCIErrorGet().
7381  REQUIRES:
7382  none
7383  DESCRIPTION:
7384  Allocate space for and initialize the type version table and the type
7385  version table's index.
7386  RETURNS:
7387  OCI_SUCCESS if the function completes successfully.
7388  OCI_INVALID_HANDLE if 'env' or 'err' is null.
7389  OCI_ERROR if internal errors occurrs during initialization.
7390  }
7391  {--------------------------- OCITypeVTInsert ------------------------------- }
7392  { ** OBSOLETE ** }
7393  TOCITypeVTInsert = function(env: POCIEnv; err: POCIError;
7394  const schema_name: Poratext; const s_n_length: ub4;
7395  const type_name: Poratext; const t_n_length: ub4;
7396  const user_version:Poratext; const u_v_length:ub4): sword; cdecl;
7397 
7398  {
7399  NAME: OCITypeVTInsert - OCI type Version table INSert entry.
7400  PARAMETERS:
7401  env (IN/OUT) - OCI environment handle initialized in object mode
7402  err (IN/OUT) - error handle. If there is an error, it is
7403  recorded in 'err' and this function returns OCI_ERROR.
7404  The error recorded in 'err' can be retrieved by calling
7405  OCIErrorGet().
7406  schema_name (IN, optional) - name of schema associated with the
7407  type. By default, the user's schema name is used.
7408  s_n_length (IN) - length of the 'schema_name' parameter
7409  type_name (IN) - type name to insert
7410  t_n_length (IN) - length (in bytes) of the 'type_name' parameter
7411  user_version (IN) - user readable version of the type
7412  u_v_length (IN) - length (in bytes) of the 'user_version' parameter
7413  REQUIRES:
7414  none
7415  DESCRIPTION:
7416  Insert an entry into the type version table and the type version
7417  table's index. The entry's type name and user readable version
7418  fields are updated with the input values. All other fields are
7419  initialized to null.
7420  RETURNS:
7421  OCI_SUCCESS if the function completes successfully.
7422  OCI_INVALID_HANDLE if 'env' or 'err' is null.
7423  OCI_ERROR if
7424  1) any of the parameters is invalid.
7425  2) an entry for 'type_name' has already been registered in the
7426  type version table.
7427  }
7428  {------------------------------ OCITypeVTSelect ---------------------------- }
7429  { OCITypeVTSelect - OCI type VERSion table SELECT entry }
7430  { ** OBSOLETE ** }
7431  TOCITypeVTSelect = function(env: POCIEnv; err: POCIError;
7432  const schema_name: Poratext; const s_n_length: ub4;
7433  const type_name: Poratext; const t_n_length: ub4; user_version: PPoratext;
7434  u_v_length: Pub4; version: Pub2): sword; cdecl;
7435 
7436  {
7437  NAME: OCITypeVTSelect - OCI type Version table SELect entry.
7438  PARAMETERS:
7439  env (IN/OUT) - OCI environment handle initialized in object mode
7440  err (IN/OUT) - error handle. If there is an error, it is
7441  recorded in 'err' and this function returns OCI_ERROR.
7442  The error recorded in 'err' can be retrieved by calling
7443  OCIErrorGet().
7444  schema_name (IN, optional) - name of schema associated with the
7445  type. By default, the user's schema name is used.
7446  s_n_length (IN) - length of the 'schema_name' parameter
7447  type_name (IN) - type name to select
7448  t_n_length (IN) - length (in bytes) of the 'type_name' parameter
7449  user_version (OUT, optional) - pointer to user readable version of the
7450  type
7451  u_v_length (OUT, optional) - length (in bytes) of the 'user_version'
7452  parameter
7453  version (OUT, optional) - internal type version
7454  REQUIRES:
7455  All input parameters must not be NULL and must be valid.
7456  DESCRIPTION:
7457  Select an entry in the type version table by name.
7458  RETURNS:
7459  OCI_SUCCESS if the function completes successfully.
7460  OCI_INVALID_HANDLE if 'env' or 'err' is null.
7461  OCI_ERROR if
7462  1) any of the parameters is invalid.
7463  2) an entry with 'type_name' does not exist.
7464  }
7465  { Compatibility function - following function prototype retained for
7466  compatibility only }
7467 // function ortgcty(env:POCIEnv; err:POCIError; coll_tdo:POCIType; collelem_tdo:PPOCIType):sword;
7468 
7469  {--------------------------------------------------------------------------- }
7470  { Transient Type Construction functions }
7471  {--------------------------------------------------------------------------- }
7472 // function TOCITypeBeginCreate(svchp:POCISvcCtx; errhp:POCIError; tc:OCITypeCode; dur:OCIDuration; _type:PPOCIType):sword;
7473 
7474  {
7475  NAME: OCITypeBeginCreate - OCI Type Begin Creation of a transient type.
7476  REMARKS
7477  Begins the construction process for a transient type. The type will be
7478  anonymous (no name). To create a persistent named type, the CREATE TYPE
7479  statement should be used from SQL. Transient types have no identity.
7480  They are pure values.
7481  PARAMETERS:
7482  svchp (IN) - The OCI Service Context.
7483  errhp (IN/OUT) - The OCI error handle. If there is an error, it is
7484  recorded in errhp and this function returns
7485  OCI_ERROR. Diagnostic information can be obtained by
7486  calling OCIErrorGet().
7487  tc - The TypeCode for the type. The Typecode could
7488  correspond to a User Defined Type or a Built-in type.
7489  Currently, the permissible values for User Defined
7490  Types are OCI_TYPECODE_OBJECT for an Object Type
7491  (structured), OCI_TYPECODE_VARRAY for a VARRAY
7492  collection type or OCI_TYPECODE_TABLE for a nested
7493  table collection type. For Object types,
7494  OCITypeAddAttr() needs to be called to add each of
7495  the attribute types. For Collection types,
7496  OCITypeSetCollection() needs to be called.
7497  Subsequently, OCITypeEndCreate() needs to be called
7498  to finish the creation process.
7499  The permissible values for Built-in type codes are
7500  specified in the user manual. Additional information
7501  on built-ins if any (like precision, scale for
7502  numbers, character set info for VARCHAR2s etc.) must
7503  be set with a subsequent call to OCITypeSetBuiltin().
7504  Subsequently OCITypeEndCreate() needs to be called
7505  to finish the creation process.
7506  dur - The allocation duration for the Type. Could be a
7507  predefined or a user defined duration.
7508  type(OUT) - The OCIType (Type Descriptor) that is being
7509  constructed.
7510  RETURNS:
7511  OCI_SUCCESS if the function completes successfully.
7512  OCI_ERROR on error.
7513  }
7514 // function TOCITypeSetCollection(svchp:POCISvcCtx; errhp:POCIError; _type:POCIType; collelem_info:POCIParam; coll_count:ub4):sword;
7515 
7516  {
7517  NAME: OCITypeSetCollection - OCI Type Set Collection information
7518  REMARKS :
7519  Set Collection type information. This call can be called only if the
7520  OCIType has been constructed with a collection typecode.
7521  PARAMETERS:
7522  svchp (IN) - The OCI Service Context.
7523  errhp (IN/OUT) - The OCI error handle. If there is an error, it is
7524  recorded in errhp and this function returns
7525  OCI_ERROR. Diagnostic information can be obtained by
7526  calling OCIErrorGet().
7527  type(IN OUT) - The OCIType (Type Descriptor) that is being
7528  constructed.
7529  collelem_info - collelem_info provides information on the collection
7530  element. It is obtained by allocating an OCIParam
7531  (parameter handle) and setting type information in
7532  the OCIParam using OCIAttrSet() calls.
7533  coll_count - The count of elements in the collection. Pass 0 for
7534  a nested table (unbounded).
7535  RETURNS:
7536  OCI_SUCCESS if the function completes successfully.
7537  OCI_ERROR on error.
7538  }
7539 // function TOCITypeSetBuiltin(svchp:POCISvcCtx; errhp:POCIError; _type:POCIType; builtin_info:POCIParam):sword;
7540 
7541  {
7542  NAME: OCITypeSetBuiltin - OCI Type Set Builtin information.
7543  REMARKS:
7544  Set Built-in type information. This call can be called only if the
7545  OCIType has been constructed with a built-in typecode
7546  (OCI_TYPECODE_NUMBER etc.).
7547  PARAMETERS:
7548  svchp (IN) - The OCI Service Context.
7549  errhp (IN/OUT) - The OCI error handle. If there is an error, it is
7550  recorded in errhp and this function returns
7551  OCI_ERROR. Diagnostic information can be obtained by
7552  calling OCIErrorGet().
7553  type(IN OUT) - The OCIType (Type Descriptor) that is being
7554  constructed.
7555  builtin_info - builtin_info provides information on the built-in
7556  (like precision, scale, charater set etc.). It is
7557  obtained by allocating an OCIParam (parameter handle)
7558  and setting type information in the OCIParam using
7559  OCIAttrSet() calls.
7560  RETURNS:
7561  OCI_SUCCESS if the function completes successfully.
7562  OCI_ERROR on error.
7563  }
7564 (* Const before type ignored *)
7565 // function TOCITypeAddAttr(svchp:POCISvcCtx; errhp:POCIError; _type:POCIType; a_name:Poratext; a_length:ub4;
7566 // attr_info:POCIParam):sword;
7567 
7568  {
7569  NAME: OCITypeAddAttr - OCI Type Add Attribute to an Object Type.
7570  REMARKS:
7571  Adds an attribute to an Object type (that was constructed earlier with
7572  typecode OCI_TYPECODE_OBJECT).
7573  PARAMETERS:
7574  svchp (IN) - The OCI Service Context
7575  errhp (IN/OUT) - The OCI error handle. If there is an error, it is
7576  recorded in errhp and this function returns
7577  OCI_ERROR. Diagnostic information can be obtained by
7578  calling OCIErrorGet().
7579  type (IN/OUT) - The Type description that is being constructed.
7580  a_name(IN) - Optional. gives the name of the attribute.
7581  a_length - Optional. gives length of attribute name.
7582  attr_info - Information on the attribute. It is obtained by
7583  allocating an OCIParam (parameter handle) and setting
7584  type information in the OCIParam using OCIAttrSet()
7585  calls.
7586  RETURNS:
7587  OCI_SUCCESS if the function completes successfully.
7588  OCI_ERROR on error.
7589  }
7590 // function TOCITypeEndCreate(svchp:POCISvcCtx; errhp:POCIError; _type:POCIType):sword;
7591 
7592  {
7593  NAME: OCITypeEndCreate - OCI Type End Creation
7594  REMARKS:
7595  Finishes construction of a type description.Subsequently, only access
7596  will be allowed.
7597  PARAMETERS:
7598  svchp (IN) - The OCI Service Context
7599  errhp (IN/OUT) - The OCI error handle. If there is an error, it is
7600  recorded in errhp and this function returns
7601  OCI_ERROR. Diagnostic information can be obtained by
7602  calling OCIErrorGet().
7603  type (IN/OUT) - The Type description that is being constructed.
7604  RETURNS:
7605  OCI_SUCCESS if the function completes successfully.
7606  OCI_ERROR on error.
7607  }
7608  {========================= }
7609  { PUBLIC MACROS AND FLAGS }
7610  {========================= }
7611  {-------------------------------------------------------------------------- }
7612  { TYPE ELEMENT FLAGS }
7613  {-------------------------------------------------------------------------- }
7614  { element is a REF }
7615  const
7616  OCI_TYPEELEM_REF = $8000;
7617  { parameter is required }
7618  OCI_TYPEPARAM_REQUIRED = $0800;
7619  { macros to test flags }
7620  { was #define dname(params) para_def_expr }
7621  { argument types are unknown }
7622  { return type might be wrong }
7623 type
7624  TOCI_TYPEELEM_IS_REF = function(elem_flag : longint) : longint;
7625 
7626  { was #define dname(params) para_def_expr }
7627  { argument types are unknown }
7628  { return type might be wrong }
7629  TOCI_TYPEPARAM_IS_REQUIRED = function (param_flag : longint) : longint;
7630 
7631 
7632 type
7633  OracleOCI_API = record
7634  OCIPasswordChange: TOCIPasswordChange;
7635  OCIInitialize: TOCIInitialize;
7636  OCIEnvInit: TOCIEnvInit;
7637  OCIEnvCreate: TOCIEnvCreate;
7638  OCIEnvNlsCreate: TOCIEnvNlsCreate;
7639  OCIHandleAlloc: TOCIHandleAlloc;
7640  OCIServerAttach: TOCIServerAttach;
7641  OCIAttrSet: TOCIAttrSet;
7642  OCISessionBegin: TOCISessionBegin;
7643  OCISessionEnd: TOCISessionEnd;
7644  OCIServerDetach: TOCIServerDetach;
7645  OCIHandleFree: TOCIHandleFree;
7646  OCIErrorGet: TOCIErrorGet;
7647  OCIStmtPrepare: TOCIStmtPrepare;
7648  OCIStmtExecute: TOCIStmtExecute;
7649  OCIParamGet: TOCIParamGet;
7650  OCIAttrGet: TOCIAttrGet;
7651  OCIStmtFetch: TOCIStmtFetch;
7652  OCIDefineByPos: TOCIDefineByPos;
7653  OCIDefineArrayOfStruct: TOCIDefineArrayOfStruct;
7654  OCIBindByPos: TOCIBindByPos;
7655  OCIBindByName: TOCIBindByName;
7656 
7657  OCIDefineObject: TOCIDefineObject;
7658 
7659  { > ori.h }
7660  OCIObjectNew: TOCIObjectNew;
7661  OCIObjectPin: TOCIObjectPin;
7662  OCIObjectUnpin: TOCIObjectUnpin;
7663  OCIObjectPinCountReset: TOCIObjectPinCountReset;
7664  OCIObjectLock: TOCIObjectLock;
7665  OCIObjectLockNoWait: TOCIObjectLockNoWait;
7666  OCIObjectMarkUpdate: TOCIObjectMarkUpdate;
7667  OCIObjectUnmark: TOCIObjectUnmark;
7668  OCIObjectUnmarkByRef: TOCIObjectUnmarkByRef;
7669  OCIObjectFree: TOCIObjectFree;
7670  OCIObjectMarkDeleteByRef: TOCIObjectMarkDeleteByRef;
7671  OCIObjectMarkDelete: TOCIObjectMarkDelete;
7672  OCIObjectFlush: TOCIObjectFlush;
7673  OCIObjectRefresh: TOCIObjectRefresh;
7674  OCIObjectCopy: TOCIObjectCopy;
7675  OCIObjectGetTypeRef: TOCIObjectGetTypeRef;
7676  OCIObjectGetObjectRef: TOCIObjectGetObjectRef;
7677  OCIObjectMakeObjectRef: TOCIObjectMakeObjectRef;
7678  OCIObjectGetPrimaryKeyTypeRef: TOCIObjectGetPrimaryKeyTypeRef;
7679  OCIObjectGetInd: TOCIObjectGetInd;
7680  OCIObjectExists: TOCIObjectExists;
7681  OCIObjectGetProperty: TOCIObjectGetProperty;
7682  OCIObjectIsLocked: TOCIObjectIsLocked;
7683  OCIObjectIsDirty: TOCIObjectIsDirty;
7684  OCIObjectPinTable: TOCIObjectPinTable;
7685  OCIObjectArrayPin: TOCIObjectArrayPin;
7686  OCICacheFlush: TOCICacheFlush;
7687  OCICacheRefresh: TOCICacheRefresh;
7688  OCICacheUnpin: TOCICacheUnpin;
7689  OCICacheFree: TOCICacheFree;
7690  OCICacheUnmark: TOCICacheUnmark;
7691  OCIDurationBegin: TOCIDurationBegin;
7692  OCIDurationEnd: TOCIDurationEnd;
7693  { < ori.h }
7694 
7695  OCITransStart: TOCITransStart;
7696  OCITransCommit: TOCITransCommit;
7697  OCITransRollback: TOCITransRollback;
7698  OCITransDetach: TOCITransDetach;
7699  OCITransPrepare: TOCITransPrepare;
7700  OCITransForget: TOCITransForget;
7701  OCIDescribeAny: TOCIDescribeAny;
7702  OCIBreak: TOCIBreak;
7703  OCIReset: TOCIReset;
7704  OCIDescriptorAlloc: TOCIDescriptorAlloc;
7705  OCIDescriptorFree: TOCIDescriptorFree;
7706  OCIStmtGetPieceInfo: TOCIStmtGetPieceInfo;
7707  OCIStmtSetPieceInfo: TOCIStmtSetPieceInfo;
7708  OCIServerVersion: TOCIServerVersion;
7709  OCIServerRelease: TOCIServerRelease;
7710  OCIBindDynamic: TOCIBindDynamic;
7711  OCIBindObject: TOCIBindObject;
7712  OCIDateTimeAssign: TOCIDateTimeAssign;
7713  OCIDateTimeCheck: TOCIDateTimeCheck;
7714  OCIDateTimeCompare: TOCIDateTimeCompare;
7715  OCIDateTimeConvert: TOCIDateTimeConvert;
7716  OCIDateTimeFromText: TOCIDateTimeFromText;
7717  OCIDateTimeGetDate: TOCIDateTimeGetDate;
7718  OCIDateTimeGetTime: TOCIDateTimeGetTime;
7719  OCIDateTimeGetTimeZoneOffset: TOCIDateTimeGetTimeZoneOffset;
7720  OCIDateTimeSysTimeStamp: TOCIDateTimeSysTimeStamp;
7721  OCIDateTimeConstruct: TOCIDateTimeConstruct;
7722  OCIDateTimeToText: TOCIDateTimeToText;
7723  OCIDateTimeGetTimeZoneName: TOCIDateTimeGetTimeZoneName;
7724  OCILobAppend: TOCILobAppend;
7725  OCILobAssign: TOCILobAssign;
7726  OCILobClose: TOCILobClose;
7727  OCILobCopy: TOCILobCopy;
7728  OCILobCreateTemporary: TOCILobCreateTemporary;
7729  OCILobEnableBuffering: TOCILobEnableBuffering;
7730  OCILobDisableBuffering: TOCILobDisableBuffering;
7731  OCILobErase: TOCILobErase;
7732  OCILobFileExists: TOCILobFileExists;
7733  OCILobFileGetName: TOCILobFileGetName;
7734  OCILobFileSetName: TOCILobFileSetName;
7735  OCILobFlushBuffer: TOCILobFlushBuffer;
7736  OCILobFreeTemporary: TOCILobFreeTemporary;
7737  OCILobCharSetForm: TOCILobCharSetForm;
7738  OCILobCharSetId: TOCILobCharSetId;
7739  OCILobGetLength: TOCILobGetLength;
7740  OCILobIsOpen: TOCILobIsOpen;
7741  OCILobIsTemporary: TOCILobIsTemporary;
7742  OCILobLoadFromFile: TOCILobLoadFromFile;
7743  OCILobLocatorIsInit: TOCILobLocatorIsInit;
7744  OCILobOpen: TOCILobOpen;
7745  OCILobRead: TOCILobRead;
7746  OCILobTrim: TOCILobTrim;
7747  OCILobWrite: TOCILobWrite;
7748  OCIResultSetToStmt: TOCIResultSetToStmt;
7749  OCINlsNumericInfoGet: TOCINlsNumericInfoGet;
7750  OCIClientVersion: TOCIClientVersion;
7751 
7752  { OCI Number mapping }
7753  OCINumberInc: TOCINumberInc;
7754  OCINumberDec: TOCINumberDec;
7755  OCINumberSetZero: TOCINumberSetZero;
7756  OCINumberSetPi: TOCINumberSetPi;
7757  OCINumberAdd: TOCINumberAdd;
7758  OCINumberSub: TOCINumberSub;
7759  OCINumberMul: TOCINumberMul;
7760  OCINumberDiv: TOCINumberDiv;
7761  OCINumberMod: TOCINumberMod;
7762  OCINumberIntPower: TOCINumberIntPower;
7763  OCINumberShift: TOCINumberShift;
7764  OCINumberNeg: TOCINumberNeg;
7765  OCINumberToText: TOCINumberToText;
7766  OCINumberFromText: TOCINumberFromText;
7767  OCINumberToInt: TOCINumberToInt;
7768  OCINumberFromInt: TOCINumberFromInt;
7769  OCINumberToReal: TOCINumberToReal;
7770  OCINumberToRealArray: TOCINumberToRealArray;
7771  OCINumberFromReal: TOCINumberFromReal;
7772  OCINumberCmp: TOCINumberCmp;
7773  OCINumberSign: TOCINumberSign;
7774  OCINumberIsZero: TOCINumberIsZero;
7775  OCINumberIsInt: TOCINumberIsInt;
7776  OCINumberAssign: TOCINumberAssign;
7777  OCINumberAbs: TOCINumberAbs;
7778  OCINumberCeil: TOCINumberCeil;
7779  OCINumberFloor: TOCINumberFloor;
7780  OCINumberSqrt: TOCINumberSqrt;
7781  OCINumberTrunc: TOCINumberTrunc;
7782  OCINumberPower: TOCINumberPower;
7783  OCINumberRound: TOCINumberRound;
7784  OCINumberPrec: TOCINumberPrec;
7785  OCINumberSin: TOCINumberSin;
7786  OCINumberArcSin: TOCINumberArcSin;
7787  OCINumberHypSin: TOCINumberHypSin;
7788  OCINumberCos: TOCINumberCos;
7789  OCINumberArcCos: TOCINumberArcCos;
7790  OCINumberHypCos: TOCINumberHypCos;
7791  OCINumberTan: TOCINumberTan;
7792  OCINumberArcTan: TOCINumberArcTan;
7793  OCINumberArcTan2: TOCINumberArcTan2;
7794  OCINumberHypTan: TOCINumberHypTan;
7795  OCINumberExp: TOCINumberExp;
7796  OCINumberLn: TOCINumberLn;
7797  OCINumberLog: TOCINumberLog;
7798 
7799  { OCI oracle Date }
7800  OCIDateAssign: TOCIDateAssign;
7801  OCIDateToText: TOCIDateToText;
7802  OCIDateFromText: TOCIDateFromText;
7803  OCIDateCompare: TOCIDateCompare;
7804  OCIDateAddMonths: TOCIDateAddMonths;
7805  OCIDateAddDays: TOCIDateAddDays;
7806  OCIDateLastDay: TOCIDateLastDay;
7807  OCIDateDaysBetween: TOCIDateDaysBetween;
7808  OCIDateZoneToZone: TOCIDateZoneToZone;
7809  OCIDateNextDay: TOCIDateNextDay;
7810 
7811  { OBJECT REFERENCE (REF) }
7812  OCIRefClear: TOCIRefClear;
7813  OCIRefAssign: TOCIRefAssign;
7814 
7815  OCITableSize: TOCITableSize;
7816  OCITableExists: TOCITableExists;
7817  OCITableDelete: TOCITableDelete;
7818  OCITableFirst: TOCITableFirst;
7819  OCITableLast: TOCITableLast;
7820  OCITableNext: TOCITableNext;
7821  OCITablePrev: TOCITablePrev;
7822 
7823  { Oracle Object Interface for Dynamic Data Access }
7824  OCIObjectSetAttr: TOCIObjectSetAttr;
7825  OCIObjectGetAttr: TOCIObjectGetAttr;
7826  {ociap.h}
7827  OCIPing: TOCIPing;
7828  {ort.h}
7829  OCITypeIterNew: TOCITypeIterNew;
7830  OCITypeIterSet: TOCITypeIterSet;
7831  OCITypeIterFree: TOCITypeIterFree;
7832  OCITypeByName: TOCITypeByName;
7833  OCITypeArrayByName: TOCITypeArrayByName;
7834  OCITypeByRef: TOCITypeByRef;
7835  OCITypeArrayByRef: TOCITypeArrayByRef;
7836  OCITypeName: TOCITypeName;
7837  OCITypeSchema: TOCITypeSchema;
7838  OCITypeTypeCode: TOCITypeTypeCode;
7839  OCITypeCollTypeCode: TOCITypeCollTypeCode;
7840  OCITypeVersion: TOCITypeVersion;
7841  OCITypeAttrs: TOCITypeAttrs;
7842  OCITypeMethods: TOCITypeMethods;
7843  OCITypeElemName: TOCITypeElemName;
7844  OCITypeElemTypeCode: TOCITypeElemTypeCode;
7845  OCITypeElemType: TOCITypeElemType;
7846  OCITypeElemFlags: TOCITypeElemFlags;
7847  OCITypeElemNumPrec: TOCITypeElemNumPrec;
7848  OCITypeElemNumScale: TOCITypeElemNumScale;
7849  OCITypeElemLength: TOCITypeElemLength;
7850  OCITypeElemCharSetID: TOCITypeElemCharSetID;
7851  OCITypeElemCharSetForm: TOCITypeElemCharSetForm;
7852  OCITypeElemParameterizedType: TOCITypeElemParameterizedType;
7853  OCITypeElemExtTypeCode: TOCITypeElemExtTypeCode;
7854  OCITypeAttrByName: TOCITypeAttrByName;
7855  OCITypeAttrNext: TOCITypeAttrNext;
7856  OCITypeCollElem: TOCITypeCollElem;
7857  OCITypeCollSize: TOCITypeCollSize;
7858  OCITypeCollExtTypeCode: TOCITypeCollExtTypeCode;
7859  OCITypeMethodOverload: TOCITypeMethodOverload;
7860  OCITypeMethodByName: TOCITypeMethodByName;
7861  OCITypeMethodNext: TOCITypeMethodNext;
7862  OCITypeMethodName: TOCITypeMethodName;
7863  OCITypeMethodEncap: TOCITypeMethodEncap;
7864  OCITypeMethodFlags: TOCITypeMethodFlags;
7865  OCITypeMethodMap: TOCITypeMethodMap;
7866  OCITypeMethodOrder: TOCITypeMethodOrder;
7867  OCITypeMethodParams: TOCITypeMethodParams;
7868  OCITypeResult: TOCITypeResult;
7869  OCITypeParamByPos: TOCITypeParamByPos;
7870  OCITypeParamByName: TOCITypeParamByName;
7871  OCITypeParamPos: TOCITypeParamPos;
7872  OCITypeElemParamMode: TOCITypeElemParamMode;
7873  OCITypeElemDefaultValue:TOCITypeElemDefaultValue;
7874  OCITypeVTInit: TOCITypeVTInit;
7875  OCITypeVTInsert: TOCITypeVTInsert;
7876  OCITypeVTSelect: TOCITypeVTSelect;
7877  end;
7878 
7879 implementation
7880 
7881 end.
7882