Remove CVS $Id$ keyword
[clsql.git] / db-oracle / oracle-constants.lisp
1 ;;;; -*- Mode: LISP; Syntax: ANSI-Common-Lisp; Base: 10 -*-
2 ;;;; *************************************************************************
3 ;;;; FILE IDENTIFICATION
4 ;;;;
5 ;;;; Name:          oracle-constants.lisp
6 ;;;; Purpose:       Constants for CLSQL Oracle interface
7 ;;;;
8 ;;;; This file is part of CLSQL.
9 ;;;;
10 ;;;; CLSQL users are granted the rights to distribute and use this software
11 ;;;; as governed by the terms of the Lisp Lesser GNU Public License
12 ;;;; (http://opensource.franz.com/preamble.html), also known as the LLGPL.
13 ;;;; *************************************************************************
14
15 (in-package #:clsql-oracle)
16
17 (defconstant +oci-default+      #x00)   ; default value for parameters and attributes
18 (defconstant +oci-threaded+     #x01)   ; application is in threaded environment
19 (defconstant +oci-object+       #x02)   ; the application is in object environment
20 (defconstant +oci-non-blocking+ #x04)   ; non blocking mode of operation
21 (defconstant +oci-env-no-mutex+ #x08)   ; the environment handle will not be protected by a mutex internally
22
23 ;; Handle types
24
25 (defconstant +oci-htype-env+    1)      ; environment handle
26 (defconstant +oci-htype-error+  2)      ; error handle
27 (defconstant +oci-htype-svcctx+ 3)      ; service handle
28 (defconstant +oci-htype-stmt+   4)      ; statement handle
29 (defconstant +oci-htype-bind+   5)      ; bind handle
30 (defconstant +oci-htype-define+ 6)      ; define handle
31 (defconstant +oci-htype-describe+ 7)    ; describe handle
32 (defconstant +oci-htype-server+ 8)      ; server handle
33 (defconstant +oci-htype-session+ 9)     ; authentication handle
34 (defconstant +oci-htype-trans+  10)     ; transaction handle
35 (defconstant +oci-htype-complexobject+ 11) ; complex object retrieval handle
36 (defconstant +oci-htype-security+ 12)   ; security handle
37
38 ;; Descriptor types
39
40 (defconstant +oci-dtype-lob+               50) ; lob locator
41 (defconstant +oci-dtype-snap+              51) ; snapshot
42 (defconstant +oci-dtype-rset+              52) ; result set
43 (defconstant +oci-dtype-param+             53) ; parameter descriptor obtained from ocigparm
44 (defconstant +oci-dtype-rowid+             54) ; rowid
45 (defconstant +oci-dtype-complexobjectcomp+ 55) ; complex object retrieval descriptor
46 (defconstant +oci-dtype-file+              56) ; File Lob locator
47 (defconstant +oci-dtype-aqenq-options+     57) ; enqueue options
48 (defconstant +oci-dtype-aqdeq-options+     58) ; dequeue options
49 (defconstant +oci-dtype-aqmsg-properties+  59) ; message properties
50 (defconstant +oci-dtype-aqagent+           60) ; aq agent
51
52 ;; Objectr pointer types
53
54 (defconstant +oci-otype-name+   1)      ; object name
55 (defconstant +oci-otype-ref+    2)      ; REF to TDO
56 (defconstant +oci-otype-ptr+    3)      ; PTR to TDO
57
58 ;; Attribute types
59
60 (defconstant +oci-attr-fncode+                  1) ; the OCI function code
61 (defconstant +oci-attr-object+                  2) ; is the environment initialized in object mode
62 (defconstant +oci-attr-nonblocking-mode+        3) ; non blocking mode
63 (defconstant +oci-attr-sqlcode+                 4) ; the SQL verb
64 (defconstant +oci-attr-env+                     5) ; the environment handle
65 (defconstant +oci-attr-server+                  6) ; the server handle
66 (defconstant +oci-attr-session+                 7) ; the user session handle
67 (defconstant +oci-attr-trans+                   8) ; the transaction handle
68 (defconstant +oci-attr-row-count+               9) ; the rows processed so far
69 (defconstant +oci-attr-sqlfncode+              10) ; the SQL verb of the statement
70 (defconstant +oci-attr-prefetch-rows+          11) ; sets the number of rows to prefetch
71 (defconstant +oci-attr-nested-prefetch-rows+   12) ; the prefetch rows of nested table
72 (defconstant +oci-attr-prefetch-memory+        13) ; memory limit for rows fetched
73 (defconstant +oci-attr-nested-prefetch-memory+ 14) ; memory limit for nested rows
74 (defconstant +oci-attr-char-count+             15) ; this specifies the bind and define size in characters
75 (defconstant +oci-attr-pdscl+                  16) ; packed decimal scale
76 (defconstant +oci-attr-pdfmt+                  17) ; packed decimal format
77 (defconstant +oci-attr-param-count+            18) ; number of column in the select list
78 (defconstant +oci-attr-rowid+                  19) ; the rowid
79 (defconstant +oci-attr-charset+                20) ; the character set value
80 (defconstant +oci-attr-nchar+                  21) ; NCHAR type
81 (defconstant +oci-attr-username+               22) ; username attribute
82 (defconstant +oci-attr-password+               23) ; password attribute
83 (defconstant +oci-attr-stmt-type+              24) ; statement type
84 (defconstant +oci-attr-internal-name+          25) ; user friendly global name
85 (defconstant +oci-attr-external-name+          26) ; the internal name for global txn
86 (defconstant +oci-attr-xid+                    27) ; XOPEN defined global transaction id
87 (defconstant +oci-attr-trans-lock+             28) ;
88 (defconstant +oci-attr-trans-name+             29) ; string to identify a global transaction
89 (defconstant +oci-attr-heapalloc+              30) ; memory allocated on the heap
90 (defconstant +oci-attr-charset-id+             31) ; Character Set ID
91 (defconstant +oci-attr-charset-form+           32) ; Character Set Form
92 (defconstant +oci-attr-maxdata-size+           33) ; Maximumsize of data on the server
93 (defconstant +oci-attr-cache-opt-size+         34) ; object cache optimal size
94 (defconstant +oci-attr-cache-max-size+         35) ; object cache maximum size percentage
95 (defconstant +oci-attr-pinoption+              36) ; object cache default pin option
96 (defconstant +oci-attr-alloc-duration+         37) ; object cache default allocation duration
97 (defconstant +oci-attr-pin-duration+           38) ; object cache default pin duration
98 (defconstant +oci-attr-fdo+                    39) ; Format Descriptor object attribute
99 (defconstant +oci-attr-postprocessing-callback+ 40) ; Callback to process outbind data
100 (defconstant +oci-attr-postprocessing-context+ 41) ; Callback context to process outbind data
101 (defconstant +oci-attr-rows-returned+          42) ; Number of rows returned in current iter - for Bind handles
102 (defconstant +oci-attr-focbk+                  43) ; Failover Callback attribute
103 (defconstant +oci-attr-in-v8-mode+             44) ; is the server/service context in V8 mode
104 (defconstant +oci-attr-lobempty+               45) ; empty lob ?
105 (defconstant +oci-attr-sesslang+               46) ; session language handle
106
107 ;; AQ Attribute Types
108 ;; Enqueue Options
109
110 (defconstant +oci-attr-visibility+ 47)  ; visibility
111 (defconstant +oci-attr-relative-msgid+ 48) ; relative message id
112 (defconstant +oci-attr-sequence-deviation+ 49) ; sequence deviation
113
114 ; - Dequeue Options -
115     ; consumer name
116 ;#define OCI-ATTR-DEQ-MODE 50
117 ;(defconstant +OCI-ATTR-CONSUMER-NAME           50              + 51)                ; dequeue mode
118 ;#define OCI-ATTR-NAVIGATION            52                     ; navigation
119 ;#define OCI-ATTR-WAIT                  53                           ; wait
120 ;#define OCI-ATTR-DEQ-MSGID             54             ; dequeue message id
121
122 ; - Message Properties -
123 (defconstant +OCI-ATTR-PRIORITY+ 55)    ; priority
124 (defconstant +OCI-ATTR-DELAY+ 56)       ; delay
125 (defconstant +OCI-ATTR-EXPIRATION+ 57)  ; expiration
126 (defconstant +OCI-ATTR-CORRELATION+ 58) ; correlation id
127 (defconstant +OCI-ATTR-ATTEMPTS+ 59)    ; # of attempts
128 (defconstant +OCI-ATTR-RECIPIENT-LIST+ 60) ; recipient list
129 (defconstant +OCI-ATTR-EXCEPTION-QUEUE+ 61) ; exception queue name
130 (defconstant +OCI-ATTR-ENQ-TIME+ 62)    ; enqueue time (only OCIAttrGet)
131 (defconstant +OCI-ATTR-MSG-STATE+ 63)   ; message state (only OCIAttrGet)
132
133 ;; AQ Agent
134 (defconstant +OCI-ATTR-AGENT-NAME+ 64)  ; agent name
135 (defconstant +OCI-ATTR-AGENT-ADDRESS+ 65) ; agent address
136 (defconstant +OCI-ATTR-AGENT-PROTOCOL+ 66) ; agent protocol
137
138 ;- Server handle -
139 (defconstant +OCI-ATTR-NATIVE-FDES+ 67) ; native cncxn file desc
140
141 ;-Parameter Attribute Types-
142
143 (defconstant +OCI-ATTR-UNK+ 101)        ; unknown attribute
144 (defconstant +OCI-ATTR-NUM-COLS+ 102)   ; number of columns
145 (defconstant +OCI-ATTR-LIST-COLUMNS+ 103) ; parameter of the column list
146 (defconstant +OCI-ATTR-RDBA+ 104)       ; DBA of the segment header
147 (defconstant +OCI-ATTR-CLUSTERED+ 105)  ; whether the table is clustered
148 (defconstant +OCI-ATTR-PARTITIONED+ 106) ; whether the table is partitioned
149 (defconstant +OCI-ATTR-INDEX-ONLY+ 107) ; whether the table is index only
150 (defconstant +OCI-ATTR-LIST-ARGUMENTS+ 108) ; parameter of the argument list
151 (defconstant +OCI-ATTR-LIST-SUBPROGRAMS+ 109) ; parameter of the subprogram list
152 (defconstant +OCI-ATTR-REF-TDO+ 110)    ; REF to the type descriptor
153 (defconstant +OCI-ATTR-LINK+ 111)       ; the database link name
154 (defconstant +OCI-ATTR-MIN+ 112)        ; minimum value
155 (defconstant +OCI-ATTR-MAX+ 113)        ; maximum value
156 (defconstant +OCI-ATTR-INCR+ 114)       ; increment value
157 (defconstant +OCI-ATTR-CACHE+ 115)      ; number of sequence numbers cached
158 (defconstant +OCI-ATTR-ORDER+ 116)      ; whether the sequence is ordered
159 (defconstant +OCI-ATTR-HW-MARK+ 117)    ; high-water mark
160 (defconstant +OCI-ATTR-TYPE-SCHEMA+ 118) ; type's schema name
161 (defconstant +OCI-ATTR-TIMESTAMP+ 119)  ; timestamp of the object
162 (defconstant +OCI-ATTR-NUM-ATTRS+ 120)  ; number of sttributes
163 (defconstant +OCI-ATTR-NUM-PARAMS+ 121) ; number of parameters
164 (defconstant +OCI-ATTR-OBJID+ 122)      ; object id for a table or view
165 (defconstant +OCI-ATTR-PTYPE+ 123)      ; type of info described by
166 (defconstant +OCI-ATTR-PARAM+ 124)      ; parameter descriptor
167 (defconstant +OCI-ATTR-OVERLOAD-ID+ 125) ; overload ID for funcs and procs
168 (defconstant +OCI-ATTR-TABLESPACE+ 126) ; table name space
169 (defconstant +OCI-ATTR-TDO+ 127)        ; TDO of a type
170 (defconstant +OCI-ATTR-PARSE-ERROR-OFFSET+ 128) ; Parse Error offset
171 ;-Credential Types-
172 (defconstant +OCI-CRED-RDBMS+ 1)        ; database username/password
173 (defconstant +OCI-CRED-EXT+ 2)          ; externally provided credentials
174
175 ;; Error Return Values-
176
177 (defconstant +oci-continue+             -24200) ; Continue with the body of the OCI function
178 (defconstant +oci-still-executing+       -3123) ; OCI would block error
179 (defconstant +oci-invalid-handle+           -2) ; maps to SQL-INVALID-HANDLE
180 (defconstant +oci-error+                    -1) ; maps to SQL-ERROR
181 (defconstant +oci-success+                   0) ; maps to SQL-SUCCESS of SAG CLI
182 (defconstant +oci-success-with-info+         1) ; maps to SQL-SUCCESS-WITH-INFO
183 (defconstant +oci-need-data+                99) ; maps to SQL-NEED-DATA
184 (defconstant +oci-no-data+                 100) ; maps to SQL-NO-DATA
185
186 ;; Parsing Syntax Types-
187
188 (defconstant +oci-ntv-syntax+ 1)        ; Use what so ever is the native lang of server
189 (defconstant +oci-v7-syntax+ 2)         ; V7 language
190 (defconstant +oci-v8-syntax+ 3)         ; V8 language
191
192 ;-Scrollable Cursor Options-
193
194 (defconstant +oci-fetch-next+           #x02) ; next row
195 (defconstant +oci-fetch-first+          #x04) ; first row of the result set
196 (defconstant +oci-fetch-last+           #x08) ; the last row of the result set
197 (defconstant +oci-fetch-prior+          #x10) ; the previous row relative to current
198 (defconstant +oci-fetch-absolute+       #x20) ; absolute offset from first
199 (defconstant +oci-fetch-relative+       #x40) ; offset relative to current
200
201 ;-Bind and Define Options-
202
203 (defconstant +OCI-SB2-IND-PTR+ #x01)    ; unused
204 (defconstant +OCI-DATA-AT-EXEC+ #x02)   ; data at execute time
205 (defconstant +OCI-DYNAMIC-FETCH+ #x02)  ; fetch dynamically
206 (defconstant +OCI-PIECEWISE+ #x04)      ; piecewise DMLs or fetch
207 ;-
208
209 ;-Execution Modes-
210 (defconstant +OCI-BATCH-MODE+ #x01)     ; batch the oci statement for execution
211 (defconstant +OCI-EXACT-FETCH+ #x02)    ; fetch the exact rows specified
212 (defconstant +OCI-KEEP-FETCH-STATE+ #x04) ; unused
213 (defconstant +OCI-SCROLLABLE-CURSOR+ #x08) ; cursor scrollable
214 (defconstant +OCI-DESCRIBE-ONLY+ #x10)  ; only describe the statement
215 (defconstant +OCI-COMMIT-ON-SUCCESS+ #x20) ; commit, if successful execution
216 ;-
217
218 ;-Authentication Modes-
219 (defconstant +OCI-MIGRATE+ #x0001)      ; migratable auth context
220 (defconstant +OCI-SYSDBA+ #x0002)       ; for SYSDBA authorization
221 (defconstant +OCI-SYSOPER+ #x0004)      ; for SYSOPER authorization
222 (defconstant +OCI-PRELIM-AUTH+ #x0008)  ; for preliminary authorization
223 ;-
224
225 ;-Piece Information-
226 (defconstant +OCI-PARAM-IN+ #x01)       ; in parameter
227 (defconstant +OCI-PARAM-OUT+ #x02)      ; out parameter
228 ;-
229
230 ;- Transaction Start Flags -
231 ; NOTE: OCI-TRANS-JOIN and OCI-TRANS-NOMIGRATE not supported in 8.0.X
232 (defconstant +OCI-TRANS-NEW+ #x00000001) ; starts a new transaction branch
233 (defconstant +OCI-TRANS-JOIN+ #x00000002) ; join an existing transaction
234 (defconstant +OCI-TRANS-RESUME+ #x00000004) ; resume this transaction
235 (defconstant +OCI-TRANS-STARTMASK+ #x000000ff)
236
237
238 (defconstant +OCI-TRANS-READONLY+ #x00000100) ; starts a readonly transaction
239 (defconstant +OCI-TRANS-READWRITE+ #x00000200) ; starts a read-write transaction
240 (defconstant +OCI-TRANS-SERIALIZABLE+ #x00000400)
241                                         ; starts a serializable transaction
242 (defconstant +OCI-TRANS-ISOLMASK+ #x0000ff00)
243
244 (defconstant +OCI-TRANS-LOOSE+ #x00010000) ; a loosely coupled branch
245 (defconstant +OCI-TRANS-TIGHT+ #x00020000) ; a tightly coupled branch
246 (defconstant +OCI-TRANS-TYPEMASK+ #x000f0000) ;
247
248 (defconstant +OCI-TRANS-NOMIGRATE+ #x00100000) ; non migratable transaction
249
250 ;-
251
252 ;- Transaction End Flags -
253 (defconstant +OCI-TRANS-TWOPHASE+ #x01000000) ; use two phase commit
254 ;-
255
256 ;; AQ Constants
257 ;; NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE
258 ;; The following constants must match the PL/SQL dbms-aq constants
259 ;; NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE
260
261 ; - Visibility flags -
262 (defconstant +OCI-ENQ-IMMEDIATE+ 1)     ; enqueue is an independent transaction
263 (defconstant +OCI-ENQ-ON-COMMIT+ 2)     ; enqueue is part of current transaction
264
265 ; - Dequeue mode flags -
266 (defconstant +OCI-DEQ-BROWSE+ 1)        ; read message without acquiring a lock
267 (defconstant +OCI-DEQ-LOCKED+ 2)        ; read and obtain write lock on message
268 (defconstant +OCI-DEQ-REMOVE+ 3)        ; read the message and delete it
269
270 ; - Dequeue navigation flags -
271 (defconstant +OCI-DEQ-FIRST-MSG+ 1)     ; get first message at head of queue
272 (defconstant +OCI-DEQ-NEXT-MSG+ 3)      ; next message that is available
273 (defconstant +OCI-DEQ-NEXT-TRANSACTION+ 2) ; get first message of next txn group
274
275 ; - Message states -
276 (defconstant +OCI-MSG-WAITING+ 1)       ; the message delay has not yet completed
277 (defconstant +OCI-MSG-READY+ 0)         ; the message is ready to be processed
278 (defconstant +OCI-MSG-PROCESSED+ 2)     ; the message has been processed
279 (defconstant +OCI-MSG-EXPIRED+ 3)       ; message has moved to exception queue
280
281 ; - Sequence deviation -
282 (defconstant +OCI-ENQ-BEFORE+ 2)        ; enqueue message before another message
283 (defconstant +OCI-ENQ-TOP+ 3)           ; enqueue message before all messages
284
285 ; - Visibility flags -
286 (defconstant +OCI-DEQ-IMMEDIATE+ 1)     ; dequeue is an independent transaction
287 (defconstant +OCI-DEQ-ON-COMMIT+ 2)     ; dequeue is part of current transaction
288
289 ; - Wait -
290 (defconstant +OCI-DEQ-WAIT-FOREVER+ -1) ; wait forever if no message available
291 (defconstant +OCI-DEQ-NO-WAIT+ 0)       ; do not wait if no message is available
292
293 ; - Delay -
294 (defconstant +OCI-MSG-NO-DELAY+ 0)      ; message is available immediately
295
296 ;; Expiration
297 (defconstant +OCI-MSG-NO-EXPIRATION+ -1) ; message will never expire
298
299 ;; Describe Handle Parameter Attributes
300 ;; Attributes common to Columns and Stored Procs
301
302 (defconstant +oci-attr-data-size+ 1)    ; maximum size of the data
303 (defconstant +oci-attr-data-type+ 2)    ; the sql type of the column/argument
304 (defconstant +oci-attr-disp-size+ 3)    ; the display size
305 (defconstant +oci-attr-name+      4)    ; the name of the column/argument
306 (defconstant +oci-attr-precision+ 5)    ; precision if number type
307 (defconstant +oci-attr-scale+     6)    ; scale if number type
308 (defconstant +oci-attr-is-null+   7)    ; is it null ?
309 (defconstant +oci-attr-type-name+ 8)
310
311 ;; name of the named data type or a package name for package private types
312
313 (defconstant +OCI-ATTR-SCHEMA-NAME+ 9)  ; the schema name
314 (defconstant +OCI-ATTR-SUB-NAME+ 10)    ; type name if package private type
315 (defconstant +OCI-ATTR-POSITION+ 11)    ; relative position of col/arg in the list of cols/args
316
317 ; complex object retrieval parameter attributes
318 (defconstant +OCI-ATTR-COMPLEXOBJECTCOMP-TYPE+ 50) ;
319 (defconstant +OCI-ATTR-COMPLEXOBJECTCOMP-TYPE-LEVEL+ 51) ;
320 (defconstant +OCI-ATTR-COMPLEXOBJECT-LEVEL+ 52) ;
321 (defconstant +OCI-ATTR-COMPLEXOBJECT-COLL-OUTOFLINE+ 53) ;
322
323 ; Only Columns
324 (defconstant +OCI-ATTR-DISP-NAME+ 100)  ; the display name
325
326 ;; stored procs
327
328 (defconstant +OCI-ATTR-OVERLOAD+ 210)   ; is this position overloaded
329 (defconstant +OCI-ATTR-LEVEL+ 211)      ; level for structured types
330 (defconstant +OCI-ATTR-HAS-DEFAULT+ 212) ; has a default value
331 (defconstant +OCI-ATTR-IOMODE+ 213)     ; in, out inout
332 (defconstant +OCI-ATTR-RADIX+ 214)      ; returns a radix
333 (defconstant +OCI-ATTR-NUM-ARGS+ 215)   ; total number of arguments
334
335 ;; named type attributes
336
337 (defconstant +oci-attr-typecode+                216) ; lobject or collection
338 (defconstant +oci-attr-collection-typecode+     217) ; varray or nested table
339 (defconstant +oci-attr-version+                 218) ; user assigned version
340 (defconstant +oci-attr-is-incomplete-type+      219) ; is this an incomplete type
341 (defconstant +oci-attr-is-system-type+          220) ; a system type
342 (defconstant +oci-attr-is-predefined-type+      221) ; a predefined type
343 (defconstant +oci-attr-is-transient-type+       222) ; a transient type
344 (defconstant +oci-attr-is-system-generated-type+ 223) ; system generated type
345 (defconstant +oci-attr-has-nested-table+        224) ; contains nested table attr
346 (defconstant +oci-attr-has-lob+                 225) ; has a lob attribute
347 (defconstant +oci-attr-has-file+                226) ; has a file attribute
348 (defconstant +oci-attr-collection-element+      227) ; has a collection attribute
349 (defconstant +oci-attr-num-type-attrs+          228) ; number of attribute types
350 (defconstant +oci-attr-list-type-attrs+         229) ; list of type attributes
351 (defconstant +oci-attr-num-type-methods+        230) ; number of type methods
352 (defconstant +oci-attr-list-type-methods+       231) ; list of type methods
353 (defconstant +oci-attr-map-method+              232) ; map method of type
354 (defconstant +oci-attr-order-method+            233) ; order method of type
355
356 ; only collection element
357 (defconstant +OCI-ATTR-NUM-ELEMS+ 234)  ; number of elements
358
359 ; only type methods
360 (defconstant +OCI-ATTR-ENCAPSULATION+ 235) ; encapsulation level
361 (defconstant +OCI-ATTR-IS-SELFISH+ 236) ; method selfish
362 (defconstant +OCI-ATTR-IS-VIRTUAL+ 237) ; virtual
363 (defconstant +OCI-ATTR-IS-INLINE+ 238)  ; inline
364 (defconstant +OCI-ATTR-IS-CONSTANT+ 239) ; constant
365 (defconstant +OCI-ATTR-HAS-RESULT+ 240) ; has result
366 (defconstant +OCI-ATTR-IS-CONSTRUCTOR+ 241) ; constructor
367 (defconstant +OCI-ATTR-IS-DESTRUCTOR+ 242) ; destructor
368 (defconstant +OCI-ATTR-IS-OPERATOR+ 243) ; operator
369 (defconstant +OCI-ATTR-IS-MAP+ 244)     ; a map method
370 (defconstant +OCI-ATTR-IS-ORDER+ 245)   ; order method
371 (defconstant +OCI-ATTR-IS-RNDS+ 246)    ; read no data state method
372 (defconstant +OCI-ATTR-IS-RNPS+ 247)    ; read no process state
373 (defconstant +OCI-ATTR-IS-WNDS+ 248)    ; write no data state method
374 (defconstant +OCI-ATTR-IS-WNPS+ 249)    ; write no process state
375
376 ; describing public objects
377 (defconstant +OCI-ATTR-DESC-PUBLIC+ 250) ; public object
378 ;-
379
380 ;-OCIPasswordChange-
381 (defconstant +OCI-AUTH+ #x08)           ; Change the password but do not login
382
383
384 ;-Other Constants-
385 (defconstant +OCI-MAX-FNS+ 100)         ; max number of OCI Functions
386 (defconstant +OCI-SQLSTATE-SIZE+ 5)     ;
387 (defconstant +OCI-ERROR-MAXMSG-SIZE+ 1024) ; max size of an error message
388 ;; (defconstant +OCI-LOBMAXSIZE+ 4MAXVAL)       ; maximum lob data size
389 (defconstant +OCI-ROWID-LEN+ 23)        ;
390 ;-
391
392 ;- Fail Over Events -
393 (defconstant +OCI-FO-END+ #x00000001)   ;
394 (defconstant +OCI-FO-ABORT+ #x00000002) ;
395 (defconstant +OCI-FO-REAUTH+ #x00000004) ;
396 (defconstant +OCI-FO-BEGIN+ #x00000008) ;
397 (defconstant +OCI-FO-ERROR+ #x00000010) ;
398 ;-
399
400 ;- Fail Over Types -
401 (defconstant +OCI-FO-NONE+ #x00000001)  ;
402 (defconstant +OCI-FO-SESSION+ #x00000002) ;
403 (defconstant +OCI-FO-SELECT+ #x00000004) ;
404 (defconstant +OCI-FO-TXNAL+ #x00000008) ;
405 ;-
406
407 ;-Function Codes-
408 (defconstant +OCI-FNCODE-INITIALIZE+ 1) ; OCIInitialize
409 (defconstant +OCI-FNCODE-HANDLEALLOC+ 2) ; OCIHandleAlloc
410 (defconstant +OCI-FNCODE-HANDLEFREE+ 3) ; OCIHandleFree
411 (defconstant +OCI-FNCODE-DESCRIPTORALLOC+ 4) ; OCIDescriptorAlloc
412 (defconstant +OCI-FNCODE-DESCRIPTORFREE+ 5) ; OCIDescriptorFree
413 (defconstant +OCI-FNCODE-ENVINIT+ 6)    ; OCIEnvInit
414 (defconstant +OCI-FNCODE-SERVERATTACH+ 7) ; OCIServerAttach
415 (defconstant +OCI-FNCODE-SERVERDETACH+ 8) ; OCIServerDetach
416 ; unused         9
417 (defconstant +OCI-FNCODE-SESSIONBEGIN+ 10) ; OCISessionBegin
418 (defconstant +OCI-FNCODE-SESSIONEND+ 11) ; OCISessionEnd
419 (defconstant +OCI-FNCODE-PASSWORDCHANGE+ 12) ; OCIPasswordChange
420 (defconstant +OCI-FNCODE-STMTPREPARE+ 13) ; OCIStmtPrepare
421                                                       ; unused       14- 16
422 (defconstant +OCI-FNCODE-BINDDYNAMIC+ 17) ; OCIBindDynamic
423 (defconstant +OCI-FNCODE-BINDOBJECT+ 18) ; OCIBindObject
424                                                                 ; 19 unused
425 (defconstant +OCI-FNCODE-BINDARRAYOFSTRUCT+ 20) ; OCIBindArrayOfStruct
426 (defconstant +OCI-FNCODE-STMTEXECUTE+ 21) ; OCIStmtExecute
427                                                              ; unused 22-24
428 (defconstant +OCI-FNCODE-DEFINEOBJECT+ 25) ; OCIDefineObject
429 (defconstant +OCI-FNCODE-DEFINEDYNAMIC+ 26) ; OCIDefineDynamic
430 (defconstant +OCI-FNCODE-DEFINEARRAYOFSTRUCT+ 27) ; OCIDefineArrayOfStruct
431 (defconstant +OCI-FNCODE-STMTFETCH+ 28) ; OCIStmtFetch
432 (defconstant +OCI-FNCODE-STMTGETBIND+ 29) ; OCIStmtGetBindInfo
433                                                             ; 30, 31 unused
434 (defconstant +OCI-FNCODE-DESCRIBEANY+ 32) ; OCIDescribeAny
435 (defconstant +OCI-FNCODE-TRANSSTART+ 33) ; OCITransStart
436 (defconstant +OCI-FNCODE-TRANSDETACH+ 34) ; OCITransDetach
437 (defconstant +OCI-FNCODE-TRANSCOMMIT+ 35) ; OCITransCommit
438                                                                 ; 36 unused
439 (defconstant +OCI-FNCODE-ERRORGET+ 37)  ; OCIErrorGet
440 (defconstant +OCI-FNCODE-LOBOPENFILE+ 38) ; OCILobFileOpen
441 (defconstant +OCI-FNCODE-LOBCLOSEFILE+ 39) ; OCILobFileClose
442                                              ; 40 was LOBCREATEFILE, unused
443                                          ; 41 was OCILobFileDelete, unused
444 (defconstant +OCI-FNCODE-LOBCOPY+ 42)   ; OCILobCopy
445 (defconstant +OCI-FNCODE-LOBAPPEND+ 43) ; OCILobAppend
446 (defconstant +OCI-FNCODE-LOBERASE+ 44)  ; OCILobErase
447 (defconstant +OCI-FNCODE-LOBLENGTH+ 45) ; OCILobGetLength
448 (defconstant +OCI-FNCODE-LOBTRIM+ 46)   ; OCILobTrim
449 (defconstant +OCI-FNCODE-LOBREAD+ 47)   ; OCILobRead
450 (defconstant +OCI-FNCODE-LOBWRITE+ 48)  ; OCILobWrite
451                                                                 ; 49 unused
452 (defconstant +OCI-FNCODE-SVCCTXBREAK+ 50) ; OCIBreak
453 (defconstant +OCI-FNCODE-SERVERVERSION+ 51) ; OCIServerVersion
454 ; unused 52, 53
455 (defconstant +OCI-FNCODE-ATTRGET+ 54)   ; OCIAttrGet
456 (defconstant +OCI-FNCODE-ATTRSET+ 55)   ; OCIAttrSet
457 (defconstant +OCI-FNCODE-PARAMSET+ 56)  ; OCIParamSet
458 (defconstant +OCI-FNCODE-PARAMGET+ 57)  ; OCIParamGet
459 (defconstant +OCI-FNCODE-STMTGETPIECEINFO+ 58) ; OCIStmtGetPieceInfo
460 (defconstant +OCI-FNCODE-LDATOSVCCTX+ 59) ; OCILdaToSvcCtx
461                                                                 ; 60 unused
462 (defconstant +OCI-FNCODE-STMTSETPIECEINFO+ 61) ; OCIStmtSetPieceInfo
463 (defconstant +OCI-FNCODE-TRANSFORGET+ 62) ; OCITransForget
464 (defconstant +OCI-FNCODE-TRANSPREPARE+ 63) ; OCITransPrepare
465 (defconstant +OCI-FNCODE-TRANSROLLBACK+ 64) ; OCITransRollback
466 (defconstant +OCI-FNCODE-DEFINEBYPOS+ 65) ; OCIDefineByPos
467 (defconstant +OCI-FNCODE-BINDBYPOS+ 66) ; OCIBindByPos
468 (defconstant +OCI-FNCODE-BINDBYNAME+ 67) ; OCIBindByName
469 (defconstant +OCI-FNCODE-LOBASSIGN+ 68) ; OCILobAssign
470 (defconstant +OCI-FNCODE-LOBISEQUAL+ 69) ; OCILobIsEqual
471 (defconstant +OCI-FNCODE-LOBISINIT+ 70) ; OCILobLocatorIsInit
472 ; 71 was lob locator size in beta2
473 (defconstant +OCI-FNCODE-LOBENABLEBUFFERING+ 71) ; OCILobEnableBuffering
474 (defconstant +OCI-FNCODE-LOBCHARSETID+ 72) ; OCILobCharSetID
475 (defconstant +OCI-FNCODE-LOBCHARSETFORM+ 73) ; OCILobCharSetForm
476 (defconstant +OCI-FNCODE-LOBFILESETNAME+ 74) ; OCILobFileSetName
477 (defconstant +OCI-FNCODE-LOBFILEGETNAME+ 75) ; OCILobFileGetName
478 (defconstant +OCI-FNCODE-LOGON+ 76)     ; OCILogon
479 (defconstant +OCI-FNCODE-LOGOFF+ 77)    ; OCILogoff
480 (defconstant +OCI-FNCODE-LOBDISABLEBUFFERING+ 78) ; OCILobDisableBuffering
481 (defconstant +OCI-FNCODE-LOBFLUSHBUFFER+ 79) ; OCILobFlushBuffer
482 (defconstant +OCI-FNCODE-LOBLOADFROMFILE+ 80) ; OCILobLoadFromFile
483
484
485 ;-
486
487 ;- FILE open modes -
488 (defconstant +OCI-FILE-READONLY+ 1)     ; readonly mode open for FILE types
489 ;-
490
491 ;- LOB Buffering Flush Flags -
492 (defconstant +OCI-LOB-BUFFER-FREE+ 1)   ;
493 (defconstant +OCI-LOB-BUFFER-NOFREE+ 2) ;
494 ;-
495
496 ;- OCI Statement Types -
497
498 (defconstant +oci-stmt-select+ 1)       ; select statement
499 (defconstant +oci-stmt-update+ 2)       ; update statement
500 (defconstant +oci-stmt-delete+ 3)       ; delete statement
501 (defconstant +oci-stmt-insert+ 4)       ; insert statement
502 (defconstant +oci-stmt-create+ 5)       ; create statement
503 (defconstant +oci-stmt-drop+ 6)         ; drop statement
504 (defconstant +oci-stmt-alter+ 7)        ; alter statement
505 (defconstant +oci-stmt-begin+ 8)        ; begin ... (pl/sql statement)
506 (defconstant +oci-stmt-declare+ 9)      ; declare .. (pl/sql statement )
507 ;-
508
509 ;- OCI Parameter Types -
510 (defconstant +OCI-PTYPE-UNK+ 0)         ; unknown
511 (defconstant +OCI-PTYPE-TABLE+ 1)       ; table
512 (defconstant +OCI-PTYPE-VIEW+ 2)        ; view
513 (defconstant +OCI-PTYPE-PROC+ 3)        ; procedure
514 (defconstant +OCI-PTYPE-FUNC+ 4)        ; function
515 (defconstant +OCI-PTYPE-PKG+ 5)         ; package
516 (defconstant +OCI-PTYPE-TYPE+ 6)        ; user-defined type
517 (defconstant +OCI-PTYPE-SYN+ 7)         ; synonym
518 (defconstant +OCI-PTYPE-SEQ+ 8)         ; sequence
519 (defconstant +OCI-PTYPE-COL+ 9)         ; column
520 (defconstant +OCI-PTYPE-ARG+ 10)        ; argument
521 (defconstant +OCI-PTYPE-LIST+ 11)       ; list
522 (defconstant +OCI-PTYPE-TYPE-ATTR+ 12)  ; user-defined type's attribute
523 (defconstant +OCI-PTYPE-TYPE-COLL+ 13)  ; collection type's element
524 (defconstant +OCI-PTYPE-TYPE-METHOD+ 14) ; user-defined type's method
525 (defconstant +OCI-PTYPE-TYPE-ARG+ 15)   ; user-defined type method's argument
526 (defconstant +OCI-PTYPE-TYPE-RESULT+ 16) ; user-defined type method's result
527 ;-
528
529 ;- OCI List Types -
530 (defconstant +OCI-LTYPE-UNK+ 0)         ; unknown
531 (defconstant +OCI-LTYPE-COLUMN+ 1)      ; column list
532 (defconstant +OCI-LTYPE-ARG-PROC+ 2)    ; procedure argument list
533 (defconstant +OCI-LTYPE-ARG-FUNC+ 3)    ; function argument list
534 (defconstant +OCI-LTYPE-SUBPRG+ 4)      ; subprogram list
535 (defconstant +OCI-LTYPE-TYPE-ATTR+ 5)   ; type attribute
536 (defconstant +OCI-LTYPE-TYPE-METHOD+ 6) ; type method
537 (defconstant +OCI-LTYPE-TYPE-ARG-PROC+ 7) ; type method w/o result argument list
538 (defconstant +OCI-LTYPE-TYPE-ARG-FUNC+ 8) ; type method w/result argument list
539
540 ;; typecodes
541