ruby-oci8 2.0.6-x86-mingw32 → 2.1.0-x86-mingw32
Sign up to get free protection for your applications and to get access to all the features.
- data/ChangeLog +366 -19
- data/Makefile +2 -8
- data/NEWS +111 -0
- data/README +4 -85
- data/VERSION +1 -1
- data/dist-files +9 -2
- data/lib/oci8.rb +19 -13
- data/lib/oci8.rb.in +19 -13
- data/lib/oci8/.document +2 -0
- data/lib/oci8/bindtype.rb +62 -45
- data/lib/oci8/connection_pool.rb +118 -0
- data/lib/oci8/datetime.rb +304 -320
- data/lib/oci8/encoding-init.rb +62 -30
- data/lib/oci8/encoding.yml +3 -3
- data/lib/oci8/metadata.rb +552 -497
- data/lib/oci8/object.rb +9 -9
- data/lib/oci8/oci8.rb +161 -2
- data/lib/oci8/ocihandle.rb +427 -0
- data/lib/oci8/properties.rb +31 -1
- data/lib/oci8lib_18.so +0 -0
- data/lib/oci8lib_191.so +0 -0
- data/ruby-oci8.gemspec +10 -3
- data/test/README +41 -3
- data/test/config.rb +16 -0
- data/test/test_all.rb +3 -0
- data/test/test_bind_string.rb +106 -0
- data/test/test_break.rb +33 -7
- data/test/test_clob.rb +13 -10
- data/test/test_connection_pool.rb +125 -0
- data/test/test_connstr.rb +2 -2
- data/test/test_datetime.rb +26 -66
- data/test/test_encoding.rb +7 -3
- data/test/test_error.rb +88 -0
- data/test/test_metadata.rb +1356 -204
- data/test/test_oci8.rb +27 -8
- data/test/test_oranumber.rb +41 -0
- metadata +10 -5
data/lib/oci8/object.rb
CHANGED
@@ -147,7 +147,7 @@ BEGIN
|
|
147
147
|
:self := #{tdo.typename}(#{bind_arg_helper.arg_str});
|
148
148
|
END;
|
149
149
|
EOS
|
150
|
-
csr = @con.
|
150
|
+
csr = @con.parse_internal(sql)
|
151
151
|
begin
|
152
152
|
csr.bind_param(:self, nil, :named_type_internal, tdo)
|
153
153
|
bind_arg_helper.exec(@con, csr)
|
@@ -174,7 +174,7 @@ BEGIN
|
|
174
174
|
#{tdo.typename}.#{method_id}(#{bind_arg_helper.arg_str});
|
175
175
|
END;
|
176
176
|
EOS
|
177
|
-
csr = con.
|
177
|
+
csr = con.parse_internal(sql)
|
178
178
|
begin
|
179
179
|
bind_arg_helper.exec(con, csr)
|
180
180
|
ensure
|
@@ -190,7 +190,7 @@ BEGIN
|
|
190
190
|
:rv := #{tdo.typename}.#{method_id}(#{bind_arg_helper.arg_str});
|
191
191
|
END;
|
192
192
|
EOS
|
193
|
-
csr = con.
|
193
|
+
csr = con.parse_internal(sql)
|
194
194
|
begin
|
195
195
|
csr.bind_param(:rv, nil, return_type)
|
196
196
|
bind_arg_helper.exec(con, csr)
|
@@ -243,7 +243,7 @@ BEGIN
|
|
243
243
|
:self := val;
|
244
244
|
END;
|
245
245
|
EOS
|
246
|
-
csr = @con.
|
246
|
+
csr = @con.parse_internal(sql)
|
247
247
|
begin
|
248
248
|
csr.bind_param(:self, nil, :named_type_internal, tdo)
|
249
249
|
csr[:self].attributes = self
|
@@ -264,7 +264,7 @@ BEGIN
|
|
264
264
|
:self := val;
|
265
265
|
END;
|
266
266
|
EOS
|
267
|
-
csr = @con.
|
267
|
+
csr = @con.parse_internal(sql)
|
268
268
|
begin
|
269
269
|
csr.bind_param(:self, nil, :named_type_internal, tdo)
|
270
270
|
csr.bind_param(:rv, nil, return_type)
|
@@ -376,7 +376,7 @@ EOS
|
|
376
376
|
result_type = nil
|
377
377
|
if type_method.has_result?
|
378
378
|
# function
|
379
|
-
con.
|
379
|
+
con.exec_internal("select result_type_owner, result_type_name from all_method_results where OWNER = :1 and TYPE_NAME = :2 and METHOD_NO = :3", metadata.schema_name, metadata.name, i + 1) do |r|
|
380
380
|
if r[0].nil?
|
381
381
|
result_type = @@result_type_to_bindtype[r[1]]
|
382
382
|
else
|
@@ -425,7 +425,7 @@ EOS
|
|
425
425
|
'INTERVAL DAY TO SECOND' => :interval_ds,
|
426
426
|
}
|
427
427
|
|
428
|
-
#
|
428
|
+
# to use datetime_to_array and array_to_datetime
|
429
429
|
extend OCI8::BindType::Util
|
430
430
|
|
431
431
|
def self.check_metadata(con, metadata)
|
@@ -442,8 +442,8 @@ EOS
|
|
442
442
|
[ATTR_FLOAT, nil, SIZE_OF_OCINUMBER, 2, ALIGNMENT_OF_OCINUMBER]
|
443
443
|
when :date
|
444
444
|
[ATTR_OCIDATE, nil, SIZE_OF_OCIDATE, 2, ALIGNMENT_OF_OCIDATE,
|
445
|
-
Proc.new do |val| datetime_to_array(val,
|
446
|
-
Proc.new do |val|
|
445
|
+
Proc.new do |val| datetime_to_array(val, :date) end, # set_proc
|
446
|
+
Proc.new do |val| array_to_datetime(val) end, # get_proc
|
447
447
|
]
|
448
448
|
when :binary_double
|
449
449
|
[ATTR_BINARY_DOUBLE, nil, SIZE_OF_DOUBLE, 2, ALIGNMENT_OF_DOUBLE]
|
data/lib/oci8/oci8.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# oci8.rb -- implements OCI8 and OCI8::Cursor
|
2
2
|
#
|
3
|
-
# Copyright (C) 2002-
|
3
|
+
# Copyright (C) 2002-2010 KUBO Takehiro <kubo@jiubao.org>
|
4
4
|
#
|
5
5
|
# Original Copyright is:
|
6
6
|
# Oracle module for Ruby
|
@@ -25,6 +25,139 @@ require 'yaml'
|
|
25
25
|
# value_for_the_first_parameter,
|
26
26
|
# value_for_the_second_parameter)
|
27
27
|
class OCI8
|
28
|
+
|
29
|
+
# call-seq:
|
30
|
+
# new(username, password, dbname = nil, privilege = nil)
|
31
|
+
#
|
32
|
+
# Connects to an Oracle database server by +username+ and +password+
|
33
|
+
# at +dbname+ as +privilege+.
|
34
|
+
#
|
35
|
+
# === connecting to the local server
|
36
|
+
#
|
37
|
+
# Set +username+ and +password+ or pass "username/password" as a
|
38
|
+
# single argument.
|
39
|
+
#
|
40
|
+
# OCI8.new('scott', 'tiger')
|
41
|
+
# or
|
42
|
+
# OCI8.new('scott/tiger')
|
43
|
+
#
|
44
|
+
# === connecting to a remote server
|
45
|
+
#
|
46
|
+
# Set +username+, +password+ and +dbname+ or pass
|
47
|
+
# "username/password@dbname" as a single argument.
|
48
|
+
#
|
49
|
+
# OCI8.new('scott', 'tiger', 'orcl.world')
|
50
|
+
# or
|
51
|
+
# OCI8.new('scott/tiger@orcl.world')
|
52
|
+
#
|
53
|
+
# The +dbname+ is a net service name or an easy connectection
|
54
|
+
# identifier. The former is a name listed in the file tnsnames.ora.
|
55
|
+
# Ask to your DBA if you don't know what it is. The latter has the
|
56
|
+
# syntax as "//host:port/service_name".
|
57
|
+
#
|
58
|
+
# OCI8.new('scott', 'tiger', '//remote-host:1521/XE')
|
59
|
+
# or
|
60
|
+
# OCI8.new('scott/tiger@//remote-host:1521/XE')
|
61
|
+
#
|
62
|
+
# === connecting as a privileged user
|
63
|
+
#
|
64
|
+
# Set :SYSDBA or :SYSOPER to +privilege+, otherwise
|
65
|
+
# "username/password as sysdba" or "username/password as sysoper"
|
66
|
+
# as a single argument.
|
67
|
+
#
|
68
|
+
# OCI8.new('sys', 'change_on_install', nil, :SYSDBA)
|
69
|
+
# or
|
70
|
+
# OCI8.new('sys/change_on_install as sysdba')
|
71
|
+
#
|
72
|
+
# === external OS authentication
|
73
|
+
#
|
74
|
+
# Set nil to +username+ and +password+, or "/" as a single argument.
|
75
|
+
#
|
76
|
+
# OCI8.new(nil, nil)
|
77
|
+
# or
|
78
|
+
# OCI8.new('/')
|
79
|
+
#
|
80
|
+
# To connect to a remote host:
|
81
|
+
#
|
82
|
+
# OCI8.new(nil, nil, 'dbname')
|
83
|
+
# or
|
84
|
+
# OCI8.new('/@dbname')
|
85
|
+
#
|
86
|
+
# === proxy authentication
|
87
|
+
#
|
88
|
+
# Enclose end user's username with square brackets and add it at the
|
89
|
+
# end of proxy user's username.
|
90
|
+
#
|
91
|
+
# OCI8.new('proxy_user_name[end_user_name]', 'proxy_password')
|
92
|
+
# or
|
93
|
+
# OCI8.new('proxy_user_name[end_user_name]/proxy_password')
|
94
|
+
#
|
95
|
+
def initialize(*args)
|
96
|
+
if args.length == 1
|
97
|
+
username, password, dbname, mode = parse_connect_string(args[0])
|
98
|
+
else
|
99
|
+
username, password, dbname, mode = args
|
100
|
+
end
|
101
|
+
|
102
|
+
if username.nil? and password.nil?
|
103
|
+
cred = OCI_CRED_EXT
|
104
|
+
end
|
105
|
+
case mode
|
106
|
+
when :SYSDBA
|
107
|
+
mode = OCI_SYSDBA
|
108
|
+
when :SYSOPER
|
109
|
+
mode = OCI_SYSOPER
|
110
|
+
when :SYSASM
|
111
|
+
if OCI8.oracle_client_version < OCI8::ORAVER_11_1
|
112
|
+
raise "SYSASM is not supported on Oracle version #{OCI8.oracle_client_version}"
|
113
|
+
end
|
114
|
+
mode = OCI_SYSASM
|
115
|
+
when nil
|
116
|
+
# do nothing
|
117
|
+
else
|
118
|
+
raise "unknown privilege type #{mode}"
|
119
|
+
end
|
120
|
+
|
121
|
+
if mode.nil? and cred.nil? and (not dbname.is_a? OCI8::ConnectionPool)
|
122
|
+
# logon by the OCI function OCILogon().
|
123
|
+
logon(username, password, dbname)
|
124
|
+
else
|
125
|
+
# logon by the OCI function OCISessionBegin().
|
126
|
+
if dbname.is_a? OCI8::ConnectionPool
|
127
|
+
@pool = dbname # to prevent GC from freeing the connection pool.
|
128
|
+
attach_mode = OCI_CPOOL
|
129
|
+
dbname = dbname.send(:pool_name)
|
130
|
+
else
|
131
|
+
attach_mode = OCI_DEFAULT
|
132
|
+
end
|
133
|
+
|
134
|
+
allocate_handles()
|
135
|
+
session_handle.send(:attr_set_string, OCI_ATTR_USERNAME, username) if username
|
136
|
+
session_handle.send(:attr_set_string, OCI_ATTR_PASSWORD, password) if password
|
137
|
+
server_attach(dbname, attach_mode)
|
138
|
+
session_begin(cred ? cred : OCI_CRED_RDBMS, mode ? mode : OCI_DEFAULT)
|
139
|
+
end
|
140
|
+
|
141
|
+
@prefetch_rows = nil
|
142
|
+
@username = nil
|
143
|
+
end
|
144
|
+
|
145
|
+
# call-seq:
|
146
|
+
# parse(sql_text) -> an OCI8::Cursor
|
147
|
+
#
|
148
|
+
# Returns a prepared SQL handle.
|
149
|
+
def parse(sql)
|
150
|
+
@last_error = nil
|
151
|
+
parse_internal(sql)
|
152
|
+
end
|
153
|
+
|
154
|
+
# same with OCI8#parse except that this doesn't reset OCI8#last_error.
|
155
|
+
def parse_internal(sql)
|
156
|
+
cursor = OCI8::Cursor.new(self, sql)
|
157
|
+
cursor.prefetch_rows = @prefetch_rows if @prefetch_rows
|
158
|
+
cursor
|
159
|
+
end
|
160
|
+
|
28
161
|
# Executes the sql statement. The type of return value depends on
|
29
162
|
# the type of sql statement: select; insert, update and delete;
|
30
163
|
# create, alter and drop; and PL/SQL.
|
@@ -110,7 +243,13 @@ class OCI8
|
|
110
243
|
# conn.exec('CREATE TABLE test (col1 CHAR(6))') # => 0
|
111
244
|
# conn.logoff
|
112
245
|
#
|
113
|
-
def exec(sql, *bindvars)
|
246
|
+
def exec(sql, *bindvars, &block)
|
247
|
+
@last_error = nil
|
248
|
+
exec_internal(sql, *bindvars, &block)
|
249
|
+
end
|
250
|
+
|
251
|
+
# same with OCI8#exec except that this doesn't reset OCI8#last_error.
|
252
|
+
def exec_internal(sql, *bindvars)
|
114
253
|
begin
|
115
254
|
cursor = parse(sql)
|
116
255
|
ret = cursor.exec(*bindvars)
|
@@ -194,6 +333,26 @@ class OCI8
|
|
194
333
|
@oracle_server_version
|
195
334
|
end
|
196
335
|
|
336
|
+
# :call-seq:
|
337
|
+
# database_charset_name -> string
|
338
|
+
#
|
339
|
+
# (new in 2.1.0)
|
340
|
+
#
|
341
|
+
# Returns the database character set name.
|
342
|
+
def database_charset_name
|
343
|
+
charset_id2name(server_handle.send(:attr_get_ub2, OCI_ATTR_CHARSET_ID))
|
344
|
+
end
|
345
|
+
|
346
|
+
# :call-seq:
|
347
|
+
# OCI8.client_charset_name -> string
|
348
|
+
#
|
349
|
+
# (new in 2.1.0)
|
350
|
+
#
|
351
|
+
# Returns the client character set name.
|
352
|
+
def self.client_charset_name
|
353
|
+
@@client_charset_name
|
354
|
+
end
|
355
|
+
|
197
356
|
# The instance of this class corresponds to cursor in the term of
|
198
357
|
# Oracle, which corresponds to java.sql.Statement of JDBC and statement
|
199
358
|
# handle $sth of Perl/DBI.
|
@@ -0,0 +1,427 @@
|
|
1
|
+
#--
|
2
|
+
# ocihandle.rb -- Constants in OCIHandle.
|
3
|
+
#
|
4
|
+
# Copyright (C) 2010 KUBO Takehiro <kubo@jiubao.org>
|
5
|
+
#++
|
6
|
+
|
7
|
+
class OCIHandle
|
8
|
+
|
9
|
+
#################################
|
10
|
+
#
|
11
|
+
# Attribute Types in oci.h
|
12
|
+
#
|
13
|
+
#################################
|
14
|
+
|
15
|
+
# maximum size of the data
|
16
|
+
OCI_ATTR_DATA_SIZE = 1
|
17
|
+
|
18
|
+
# the SQL type of the column/argument
|
19
|
+
OCI_ATTR_DATA_TYPE = 2
|
20
|
+
# the name of the column/argument
|
21
|
+
OCI_ATTR_NAME = 4
|
22
|
+
# precision if number type
|
23
|
+
OCI_ATTR_PRECISION = 5
|
24
|
+
# scale if number type
|
25
|
+
OCI_ATTR_SCALE = 6
|
26
|
+
# is it null ?
|
27
|
+
OCI_ATTR_IS_NULL = 7
|
28
|
+
# name of the named data type or a package name
|
29
|
+
OCI_ATTR_TYPE_NAME = 8
|
30
|
+
# the schema name
|
31
|
+
OCI_ATTR_SCHEMA_NAME = 9
|
32
|
+
# type name if package private type
|
33
|
+
OCI_ATTR_SUB_NAME = 10
|
34
|
+
# relative position
|
35
|
+
OCI_ATTR_POSITION = 11
|
36
|
+
# packed decimal scale
|
37
|
+
OCI_ATTR_PDSCL = 16
|
38
|
+
# fs prec for datetime data types
|
39
|
+
OCI_ATTR_FSPRECISION = OCI_ATTR_PDSCL
|
40
|
+
# packed decimal format
|
41
|
+
OCI_ATTR_PDPRC = 17
|
42
|
+
# fs prec for datetime data types
|
43
|
+
OCI_ATTR_LFPRECISION = OCI_ATTR_PDPRC
|
44
|
+
# username attribute
|
45
|
+
OCI_ATTR_USERNAME = 22
|
46
|
+
# password attribute
|
47
|
+
OCI_ATTR_PASSWORD = 23
|
48
|
+
# Character Set ID
|
49
|
+
OCI_ATTR_CHARSET_ID = 31
|
50
|
+
# Character Set Form
|
51
|
+
OCI_ATTR_CHARSET_FORM = 32
|
52
|
+
# number of columns
|
53
|
+
OCI_ATTR_NUM_COLS = 102
|
54
|
+
# parameter of the column list
|
55
|
+
OCI_ATTR_LIST_COLUMNS = 103
|
56
|
+
# DBA of the segment header
|
57
|
+
OCI_ATTR_RDBA = 104
|
58
|
+
# whether the table is clustered
|
59
|
+
OCI_ATTR_CLUSTERED = 105
|
60
|
+
# whether the table is partitioned
|
61
|
+
OCI_ATTR_PARTITIONED = 106
|
62
|
+
# whether the table is index only
|
63
|
+
OCI_ATTR_INDEX_ONLY = 107
|
64
|
+
# parameter of the argument list
|
65
|
+
OCI_ATTR_LIST_ARGUMENTS = 108
|
66
|
+
# parameter of the subprogram list
|
67
|
+
OCI_ATTR_LIST_SUBPROGRAMS = 109
|
68
|
+
# REF to the type descriptor
|
69
|
+
OCI_ATTR_REF_TDO = 110
|
70
|
+
# the database link name
|
71
|
+
OCI_ATTR_LINK = 111
|
72
|
+
# minimum value
|
73
|
+
OCI_ATTR_MIN = 112
|
74
|
+
# maximum value
|
75
|
+
OCI_ATTR_MAX = 113
|
76
|
+
# increment value
|
77
|
+
OCI_ATTR_INCR = 114
|
78
|
+
# number of sequence numbers cached
|
79
|
+
OCI_ATTR_CACHE = 115
|
80
|
+
# whether the sequence is ordered
|
81
|
+
OCI_ATTR_ORDER = 116
|
82
|
+
# high-water mark
|
83
|
+
OCI_ATTR_HW_MARK = 117
|
84
|
+
# type's schema name
|
85
|
+
OCI_ATTR_TYPE_SCHEMA = 118
|
86
|
+
# timestamp of the object
|
87
|
+
OCI_ATTR_TIMESTAMP = 119
|
88
|
+
# number of parameters
|
89
|
+
OCI_ATTR_NUM_PARAMS = 121
|
90
|
+
# object id for a table or view
|
91
|
+
OCI_ATTR_OBJID = 122
|
92
|
+
# overload ID for funcs and procs
|
93
|
+
OCI_ATTR_OVERLOAD_ID = 125
|
94
|
+
# table name space
|
95
|
+
OCI_ATTR_TABLESPACE = 126
|
96
|
+
# list type
|
97
|
+
OCI_ATTR_LTYPE = 128
|
98
|
+
# whether table is temporary
|
99
|
+
OCI_ATTR_IS_TEMPORARY = 130
|
100
|
+
# whether table is typed
|
101
|
+
OCI_ATTR_IS_TYPED = 131
|
102
|
+
# duration of temporary table
|
103
|
+
OCI_ATTR_DURATION = 132
|
104
|
+
# is invoker rights
|
105
|
+
OCI_ATTR_IS_INVOKER_RIGHTS = 133
|
106
|
+
# top level schema obj name
|
107
|
+
OCI_ATTR_OBJ_NAME = 134
|
108
|
+
# schema name
|
109
|
+
OCI_ATTR_OBJ_SCHEMA = 135
|
110
|
+
# top level schema object id
|
111
|
+
OCI_ATTR_OBJ_ID = 136
|
112
|
+
|
113
|
+
OCI_ATTR_CONN_NOWAIT = 178
|
114
|
+
OCI_ATTR_CONN_BUSY_COUNT = 179
|
115
|
+
OCI_ATTR_CONN_OPEN_COUNT = 180
|
116
|
+
OCI_ATTR_CONN_TIMEOUT = 181
|
117
|
+
OCI_ATTR_CONN_MIN = 183
|
118
|
+
OCI_ATTR_CONN_MAX = 184
|
119
|
+
OCI_ATTR_CONN_INCR = 185
|
120
|
+
|
121
|
+
# is this position overloaded
|
122
|
+
OCI_ATTR_OVERLOAD = 210
|
123
|
+
# level for structured types
|
124
|
+
OCI_ATTR_LEVEL = 211
|
125
|
+
# has a default value
|
126
|
+
OCI_ATTR_HAS_DEFAULT = 212
|
127
|
+
# in, out inout
|
128
|
+
OCI_ATTR_IOMODE = 213
|
129
|
+
# returns a radix
|
130
|
+
OCI_ATTR_RADIX = 214
|
131
|
+
# total number of arguments
|
132
|
+
OCI_ATTR_NUM_ARGS = 215
|
133
|
+
# object or collection
|
134
|
+
OCI_ATTR_TYPECODE = 216
|
135
|
+
# varray or nested table
|
136
|
+
OCI_ATTR_COLLECTION_TYPECODE = 217
|
137
|
+
# user assigned version
|
138
|
+
OCI_ATTR_VERSION = 218
|
139
|
+
# is this an incomplete type
|
140
|
+
OCI_ATTR_IS_INCOMPLETE_TYPE = 219
|
141
|
+
# a system type
|
142
|
+
OCI_ATTR_IS_SYSTEM_TYPE = 220
|
143
|
+
# a predefined type
|
144
|
+
OCI_ATTR_IS_PREDEFINED_TYPE = 221
|
145
|
+
# a transient type
|
146
|
+
OCI_ATTR_IS_TRANSIENT_TYPE = 222
|
147
|
+
# system generated type
|
148
|
+
OCI_ATTR_IS_SYSTEM_GENERATED_TYPE = 223
|
149
|
+
# contains nested table attr
|
150
|
+
OCI_ATTR_HAS_NESTED_TABLE = 224
|
151
|
+
# has a lob attribute
|
152
|
+
OCI_ATTR_HAS_LOB = 225
|
153
|
+
# has a file attribute
|
154
|
+
OCI_ATTR_HAS_FILE = 226
|
155
|
+
# has a collection attribute
|
156
|
+
OCI_ATTR_COLLECTION_ELEMENT = 227
|
157
|
+
# number of attribute types
|
158
|
+
OCI_ATTR_NUM_TYPE_ATTRS = 228
|
159
|
+
# list of type attributes
|
160
|
+
OCI_ATTR_LIST_TYPE_ATTRS = 229
|
161
|
+
# number of type methods
|
162
|
+
OCI_ATTR_NUM_TYPE_METHODS = 230
|
163
|
+
# list of type methods
|
164
|
+
OCI_ATTR_LIST_TYPE_METHODS = 231
|
165
|
+
# map method of type
|
166
|
+
OCI_ATTR_MAP_METHOD = 232
|
167
|
+
# order method of type
|
168
|
+
OCI_ATTR_ORDER_METHOD = 233
|
169
|
+
# number of elements
|
170
|
+
OCI_ATTR_NUM_ELEMS = 234
|
171
|
+
# encapsulation level
|
172
|
+
OCI_ATTR_ENCAPSULATION = 235
|
173
|
+
# method selfish
|
174
|
+
OCI_ATTR_IS_SELFISH = 236
|
175
|
+
# virtual
|
176
|
+
OCI_ATTR_IS_VIRTUAL = 237
|
177
|
+
# inline
|
178
|
+
OCI_ATTR_IS_INLINE = 238
|
179
|
+
# constant
|
180
|
+
OCI_ATTR_IS_CONSTANT = 239
|
181
|
+
# has result
|
182
|
+
OCI_ATTR_HAS_RESULT = 240
|
183
|
+
# constructor
|
184
|
+
OCI_ATTR_IS_CONSTRUCTOR = 241
|
185
|
+
# destructor
|
186
|
+
OCI_ATTR_IS_DESTRUCTOR = 242
|
187
|
+
# operator
|
188
|
+
OCI_ATTR_IS_OPERATOR = 243
|
189
|
+
# a map method
|
190
|
+
OCI_ATTR_IS_MAP = 244
|
191
|
+
# order method
|
192
|
+
OCI_ATTR_IS_ORDER = 245
|
193
|
+
# read no data state method
|
194
|
+
OCI_ATTR_IS_RNDS = 246
|
195
|
+
# read no process state
|
196
|
+
OCI_ATTR_IS_RNPS = 247
|
197
|
+
# write no data state method
|
198
|
+
OCI_ATTR_IS_WNDS = 248
|
199
|
+
# write no process state
|
200
|
+
OCI_ATTR_IS_WNPS = 249
|
201
|
+
OCI_ATTR_IS_SUBTYPE = 258
|
202
|
+
OCI_ATTR_SUPERTYPE_SCHEMA_NAME = 259
|
203
|
+
OCI_ATTR_SUPERTYPE_NAME = 260
|
204
|
+
# list of objects in schema
|
205
|
+
OCI_ATTR_LIST_OBJECTS = 261
|
206
|
+
# char set id
|
207
|
+
OCI_ATTR_NCHARSET_ID = 262
|
208
|
+
# list of schemas
|
209
|
+
OCI_ATTR_LIST_SCHEMAS = 263
|
210
|
+
# max procedure length
|
211
|
+
OCI_ATTR_MAX_PROC_LEN = 264
|
212
|
+
# max column name length
|
213
|
+
OCI_ATTR_MAX_COLUMN_LEN = 265
|
214
|
+
# cursor commit behavior
|
215
|
+
OCI_ATTR_CURSOR_COMMIT_BEHAVIOR = 266
|
216
|
+
# catalog namelength
|
217
|
+
OCI_ATTR_MAX_CATALOG_NAMELEN = 267
|
218
|
+
# catalog location
|
219
|
+
OCI_ATTR_CATALOG_LOCATION = 268
|
220
|
+
# savepoint support
|
221
|
+
OCI_ATTR_SAVEPOINT_SUPPORT = 269
|
222
|
+
# nowait support
|
223
|
+
OCI_ATTR_NOWAIT_SUPPORT = 270
|
224
|
+
# autocommit DDL
|
225
|
+
OCI_ATTR_AUTOCOMMIT_DDL = 271
|
226
|
+
# locking mode
|
227
|
+
OCI_ATTR_LOCKING_MODE = 272
|
228
|
+
# value of client id to set
|
229
|
+
OCI_ATTR_CLIENT_IDENTIFIER = 278
|
230
|
+
# is final type ?
|
231
|
+
OCI_ATTR_IS_FINAL_TYPE = 279
|
232
|
+
# is instantiable type ?
|
233
|
+
OCI_ATTR_IS_INSTANTIABLE_TYPE = 280
|
234
|
+
# is final method ?
|
235
|
+
OCI_ATTR_IS_FINAL_METHOD = 281
|
236
|
+
# is instantiable method ?
|
237
|
+
OCI_ATTR_IS_INSTANTIABLE_METHOD = 282
|
238
|
+
# is overriding method ?
|
239
|
+
OCI_ATTR_IS_OVERRIDING_METHOD = 283
|
240
|
+
# Describe the base object
|
241
|
+
OCI_ATTR_DESC_SYNBASE = 284
|
242
|
+
# char length semantics
|
243
|
+
OCI_ATTR_CHAR_USED = 285
|
244
|
+
# char length
|
245
|
+
OCI_ATTR_CHAR_SIZE = 286
|
246
|
+
# rule condition
|
247
|
+
OCI_ATTR_CONDITION = 342
|
248
|
+
# comment
|
249
|
+
OCI_ATTR_COMMENT = 343
|
250
|
+
# Anydata value
|
251
|
+
OCI_ATTR_VALUE = 344
|
252
|
+
# eval context owner
|
253
|
+
OCI_ATTR_EVAL_CONTEXT_OWNER = 345
|
254
|
+
# eval context name
|
255
|
+
OCI_ATTR_EVAL_CONTEXT_NAME = 346
|
256
|
+
# eval function name
|
257
|
+
OCI_ATTR_EVALUATION_FUNCTION = 347
|
258
|
+
# variable type
|
259
|
+
OCI_ATTR_VAR_TYPE = 348
|
260
|
+
# variable value function
|
261
|
+
OCI_ATTR_VAR_VALUE_FUNCTION = 349
|
262
|
+
# variable method function
|
263
|
+
OCI_ATTR_VAR_METHOD_FUNCTION = 350
|
264
|
+
# action context
|
265
|
+
OCI_ATTR_ACTION_CONTEXT = 351
|
266
|
+
# list of table aliases
|
267
|
+
OCI_ATTR_LIST_TABLE_ALIASES = 352
|
268
|
+
# list of variable types
|
269
|
+
OCI_ATTR_LIST_VARIABLE_TYPES = 353
|
270
|
+
# table name
|
271
|
+
OCI_ATTR_TABLE_NAME = 356
|
272
|
+
|
273
|
+
#################################
|
274
|
+
#
|
275
|
+
# Various Modes
|
276
|
+
#
|
277
|
+
#################################
|
278
|
+
|
279
|
+
# the default value for parameters and attributes
|
280
|
+
OCI_DEFAULT = 0
|
281
|
+
|
282
|
+
#################################
|
283
|
+
#
|
284
|
+
# Credential Types
|
285
|
+
#
|
286
|
+
#################################
|
287
|
+
|
288
|
+
# database username/password credentials
|
289
|
+
OCI_CRED_RDBMS = 1
|
290
|
+
# externally provided credentials
|
291
|
+
OCI_CRED_EXT = 2
|
292
|
+
|
293
|
+
#################################
|
294
|
+
#
|
295
|
+
# Authentication Modes
|
296
|
+
#
|
297
|
+
#################################
|
298
|
+
|
299
|
+
# for SYSDBA authorization
|
300
|
+
OCI_SYSDBA = 0x0002
|
301
|
+
# for SYSOPER authorization
|
302
|
+
OCI_SYSOPER = 0x0004
|
303
|
+
# for SYSASM authorization
|
304
|
+
OCI_SYSASM = 0x8000
|
305
|
+
|
306
|
+
#################################
|
307
|
+
#
|
308
|
+
# Attach Modes
|
309
|
+
#
|
310
|
+
#################################
|
311
|
+
|
312
|
+
# Attach using server handle from pool
|
313
|
+
OCI_CPOOL = 0x0200
|
314
|
+
|
315
|
+
#################################
|
316
|
+
#
|
317
|
+
# OCI Parameter Types
|
318
|
+
#
|
319
|
+
#################################
|
320
|
+
|
321
|
+
# parameter type for unknown type
|
322
|
+
OCI_PTYPE_UNK = 0
|
323
|
+
# parameter type for table
|
324
|
+
OCI_PTYPE_TABLE = 1
|
325
|
+
# parameter type for view
|
326
|
+
OCI_PTYPE_VIEW = 2
|
327
|
+
# parameter type for procedure
|
328
|
+
OCI_PTYPE_PROC = 3
|
329
|
+
# parameter type for function
|
330
|
+
OCI_PTYPE_FUNC = 4
|
331
|
+
# parameter type for package
|
332
|
+
OCI_PTYPE_PKG = 5
|
333
|
+
# parameter type for user-defined type
|
334
|
+
OCI_PTYPE_TYPE = 6
|
335
|
+
# parameter type for synonym
|
336
|
+
OCI_PTYPE_SYN = 7
|
337
|
+
# parameter type for sequence
|
338
|
+
OCI_PTYPE_SEQ = 8
|
339
|
+
# parameter type for column
|
340
|
+
OCI_PTYPE_COL = 9
|
341
|
+
# parameter type for argument
|
342
|
+
OCI_PTYPE_ARG = 10
|
343
|
+
# parameter type for list
|
344
|
+
OCI_PTYPE_LIST = 11
|
345
|
+
# parameter type for user-defined type's attribute
|
346
|
+
OCI_PTYPE_TYPE_ATTR = 12
|
347
|
+
# parameter type for collection type's element
|
348
|
+
OCI_PTYPE_TYPE_COLL = 13
|
349
|
+
# parameter type for user-defined type's method
|
350
|
+
OCI_PTYPE_TYPE_METHOD = 14
|
351
|
+
# parameter type for user-defined type method's arg
|
352
|
+
OCI_PTYPE_TYPE_ARG = 15
|
353
|
+
# parameter type for user-defined type method's result
|
354
|
+
OCI_PTYPE_TYPE_RESULT = 16
|
355
|
+
# parameter type for schema
|
356
|
+
OCI_PTYPE_SCHEMA = 17
|
357
|
+
# parameter type for database
|
358
|
+
OCI_PTYPE_DATABASE = 18
|
359
|
+
# parameter type for rule
|
360
|
+
OCI_PTYPE_RULE = 19
|
361
|
+
# parameter type for rule set
|
362
|
+
OCI_PTYPE_RULE_SET = 20
|
363
|
+
# parameter type for evaluation context
|
364
|
+
OCI_PTYPE_EVALUATION_CONTEXT = 21
|
365
|
+
# parameter type for table alias
|
366
|
+
OCI_PTYPE_TABLE_ALIAS = 22
|
367
|
+
# parameter type for variable type
|
368
|
+
OCI_PTYPE_VARIABLE_TYPE = 23
|
369
|
+
# parameter type for name value pair
|
370
|
+
OCI_PTYPE_NAME_VALUE = 24
|
371
|
+
|
372
|
+
#################################
|
373
|
+
#
|
374
|
+
# OCI List Types
|
375
|
+
#
|
376
|
+
#################################
|
377
|
+
|
378
|
+
# list type for unknown type
|
379
|
+
OCI_LTYPE_UNK = 0
|
380
|
+
# list type for column list
|
381
|
+
OCI_LTYPE_COLUMN = 1
|
382
|
+
# list type for procedure argument list
|
383
|
+
OCI_LTYPE_ARG_PROC = 2
|
384
|
+
# list type for function argument list
|
385
|
+
OCI_LTYPE_ARG_FUNC = 3
|
386
|
+
# list type for subprogram list
|
387
|
+
OCI_LTYPE_SUBPRG = 4
|
388
|
+
# list type for type attribute
|
389
|
+
OCI_LTYPE_TYPE_ATTR = 5
|
390
|
+
# list type for type method
|
391
|
+
OCI_LTYPE_TYPE_METHOD = 6
|
392
|
+
# list type for type method w/o result argument list
|
393
|
+
OCI_LTYPE_TYPE_ARG_PROC = 7
|
394
|
+
# list type for type method w/result argument list
|
395
|
+
OCI_LTYPE_TYPE_ARG_FUNC = 8
|
396
|
+
# list type for schema object list
|
397
|
+
OCI_LTYPE_SCH_OBJ = 9
|
398
|
+
# list type for database schema list
|
399
|
+
OCI_LTYPE_DB_SCH = 10
|
400
|
+
# list type for subtype list
|
401
|
+
OCI_LTYPE_TYPE_SUBTYPE = 11
|
402
|
+
# list type for table alias list
|
403
|
+
OCI_LTYPE_TABLE_ALIAS = 12
|
404
|
+
# list type for variable type list
|
405
|
+
OCI_LTYPE_VARIABLE_TYPE = 13
|
406
|
+
# list type for name value list
|
407
|
+
OCI_LTYPE_NAME_VALUE = 14
|
408
|
+
|
409
|
+
#################################
|
410
|
+
#
|
411
|
+
# OBJECT Duration in oro.h
|
412
|
+
#
|
413
|
+
#################################
|
414
|
+
|
415
|
+
#
|
416
|
+
OCI_DURATION_INVALID = 0xFFFF
|
417
|
+
OCI_DURATION_BEGIN = 10
|
418
|
+
OCI_DURATION_NULL = OCI_DURATION_BEGIN - 1
|
419
|
+
OCI_DURATION_DEFAULT = OCI_DURATION_BEGIN - 2
|
420
|
+
OCI_DURATION_USER_CALLBACK = OCI_DURATION_BEGIN - 3
|
421
|
+
OCI_DURATION_NEXT = OCI_DURATION_BEGIN - 4
|
422
|
+
OCI_DURATION_SESSION = OCI_DURATION_BEGIN
|
423
|
+
OCI_DURATION_TRANS = OCI_DURATION_BEGIN + 1
|
424
|
+
OCI_DURATION_CALL = OCI_DURATION_BEGIN + 2
|
425
|
+
OCI_DURATION_STATEMENT = OCI_DURATION_BEGIN + 3
|
426
|
+
OCI_DURATION_CALLOUT = OCI_DURATION_BEGIN + 4
|
427
|
+
end
|