ruby-oci8 2.2.0.2 → 2.2.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/.yardopts +1 -6
- data/ChangeLog +600 -0
- data/NEWS +426 -35
- data/README.md +27 -9
- data/dist-files +13 -2
- data/docs/bind-array-to-in_cond.md +38 -0
- data/docs/conflicts-local-connections-and-processes.md +98 -0
- data/docs/hanging-after-inactivity.md +63 -0
- data/docs/install-binary-package.md +15 -11
- data/docs/install-full-client.md +18 -21
- data/docs/install-instant-client.md +45 -27
- data/docs/install-on-osx.md +31 -117
- data/docs/ldap-auth-and-function-interposition.md +123 -0
- data/docs/number-type-mapping.md +79 -0
- data/docs/platform-specific-issues.md +17 -50
- data/docs/report-installation-issue.md +11 -8
- data/docs/timeout-parameters.md +94 -0
- data/ext/oci8/apiwrap.c.tmpl +2 -5
- data/ext/oci8/apiwrap.rb +6 -1
- data/ext/oci8/apiwrap.yml +39 -143
- data/ext/oci8/attr.c +4 -2
- data/ext/oci8/bind.c +421 -9
- data/ext/oci8/connection_pool.c +3 -3
- data/ext/oci8/encoding.c +5 -5
- data/ext/oci8/env.c +8 -2
- data/ext/oci8/error.c +24 -16
- data/ext/oci8/extconf.rb +35 -63
- data/ext/oci8/hook_funcs.c +274 -61
- data/ext/oci8/lob.c +31 -75
- data/ext/oci8/metadata.c +8 -6
- data/ext/oci8/object.c +119 -29
- data/ext/oci8/oci8.c +46 -133
- data/ext/oci8/oci8.h +40 -123
- data/ext/oci8/oci8lib.c +178 -46
- data/ext/oci8/ocihandle.c +37 -37
- data/ext/oci8/ocinumber.c +24 -35
- data/ext/oci8/oraconf.rb +168 -337
- data/ext/oci8/oradate.c +19 -19
- data/ext/oci8/plthook.h +10 -0
- data/ext/oci8/plthook_elf.c +433 -268
- data/ext/oci8/plthook_osx.c +40 -9
- data/ext/oci8/plthook_win32.c +16 -1
- data/ext/oci8/stmt.c +52 -17
- data/ext/oci8/win32.c +4 -22
- data/lib/oci8/bindtype.rb +10 -17
- data/lib/oci8/check_load_error.rb +57 -10
- data/lib/oci8/compat.rb +5 -1
- data/lib/oci8/connection_pool.rb +74 -3
- data/lib/oci8/cursor.rb +70 -31
- data/lib/oci8/metadata.rb +9 -1
- data/lib/oci8/object.rb +14 -1
- data/lib/oci8/oci8.rb +184 -58
- data/lib/oci8/ocihandle.rb +0 -16
- data/lib/oci8/oracle_version.rb +11 -1
- data/lib/oci8/properties.rb +55 -0
- data/lib/oci8/version.rb +1 -1
- data/lib/oci8.rb +48 -4
- data/lib/ruby-oci8.rb +1 -0
- data/pre-distclean.rb +1 -3
- data/ruby-oci8.gemspec +4 -9
- data/setup.rb +11 -2
- data/test/README.md +37 -0
- data/test/config.rb +8 -1
- data/test/setup_test_object.sql +42 -14
- data/test/setup_test_package.sql +59 -0
- data/test/test_all.rb +4 -0
- data/test/test_bind_array.rb +70 -0
- data/test/test_bind_boolean.rb +99 -0
- data/test/test_bind_integer.rb +47 -0
- data/test/test_break.rb +11 -9
- data/test/test_clob.rb +5 -17
- data/test/test_connstr.rb +142 -0
- data/test/test_datetime.rb +8 -3
- data/test/test_metadata.rb +2 -1
- data/test/test_object.rb +99 -18
- data/test/test_oci8.rb +170 -46
- data/test/test_oranumber.rb +12 -6
- data/test/test_package_type.rb +17 -3
- data/test/test_properties.rb +17 -0
- metadata +45 -55
- data/docs/osx-install-dev-tools.png +0 -0
- data/test/README +0 -42
data/ext/oci8/apiwrap.yml
CHANGED
@@ -83,6 +83,17 @@ OCIBindByPos:
|
|
83
83
|
- ub4 *curelep
|
84
84
|
- ub4 mode
|
85
85
|
|
86
|
+
# round trip: 0
|
87
|
+
OCIBindDynamic:
|
88
|
+
:version: 800
|
89
|
+
:args:
|
90
|
+
- OCIBind *bindp
|
91
|
+
- OCIError *errhp
|
92
|
+
- void *ictxp
|
93
|
+
- OCICallbackInBind icbfp
|
94
|
+
- void *octxp
|
95
|
+
- OCICallbackOutBind ocbfp
|
96
|
+
|
86
97
|
# round trip: 0
|
87
98
|
OCIBindObject:
|
88
99
|
:version: 800
|
@@ -180,6 +191,15 @@ OCIDefineByPos:
|
|
180
191
|
- ub2 *rcodep
|
181
192
|
- ub4 mode
|
182
193
|
|
194
|
+
# round trip: 0
|
195
|
+
OCIDefineDynamic:
|
196
|
+
:version: 800
|
197
|
+
:args:
|
198
|
+
- OCIDefine *defnp
|
199
|
+
- OCIError *errhp
|
200
|
+
- dvoid *octxp
|
201
|
+
- OCICallbackDefine ocbfp
|
202
|
+
|
183
203
|
# round trip: 0
|
184
204
|
OCIDefineObject:
|
185
205
|
:version: 800
|
@@ -321,13 +341,6 @@ OCILobLocatorIsInit:
|
|
321
341
|
- CONST OCILobLocator *locp
|
322
342
|
- boolean *is_initialized
|
323
343
|
|
324
|
-
# round trip: 1
|
325
|
-
OCILogoff:
|
326
|
-
:version: 800
|
327
|
-
:args:
|
328
|
-
- OCISvcCtx *svchp
|
329
|
-
- OCIError *errhp
|
330
|
-
|
331
344
|
# round trip: 0
|
332
345
|
OCINumberAbs:
|
333
346
|
:version: 800
|
@@ -670,6 +683,15 @@ OCIObjectGetInd:
|
|
670
683
|
- dvoid *instance
|
671
684
|
- dvoid **null_struct
|
672
685
|
|
686
|
+
# round trip: 0
|
687
|
+
OCIObjectGetTypeRef:
|
688
|
+
:version: 800
|
689
|
+
:args:
|
690
|
+
- OCIEnv *env
|
691
|
+
- OCIError *err
|
692
|
+
- dvoid *instance
|
693
|
+
- OCIRef *type_ref
|
694
|
+
|
673
695
|
# round trip: 0
|
674
696
|
OCIObjectNew:
|
675
697
|
:version: 800
|
@@ -811,30 +833,6 @@ OCIStmtFetch_nb:
|
|
811
833
|
- ub2 orientation
|
812
834
|
- ub4 mode
|
813
835
|
|
814
|
-
OCIStmtGetPieceInfo:
|
815
|
-
:version: 800
|
816
|
-
:args:
|
817
|
-
- OCIStmt *stmtp
|
818
|
-
- OCIError *errhp
|
819
|
-
- dvoid **hndlpp
|
820
|
-
- ub4 *typep
|
821
|
-
- ub1 *in_outp
|
822
|
-
- ub4 *iterp
|
823
|
-
- ub4 *idxp
|
824
|
-
- ub1 *piecep
|
825
|
-
|
826
|
-
OCIStmtSetPieceInfo:
|
827
|
-
:version: 800
|
828
|
-
:args:
|
829
|
-
- dvoid *hndlp
|
830
|
-
- ub4 type
|
831
|
-
- OCIError *errhp
|
832
|
-
- CONST dvoid *bufp
|
833
|
-
- ub4 *alenp
|
834
|
-
- ub1 piece
|
835
|
-
- CONST dvoid *indp
|
836
|
-
- ub2 *rcodep
|
837
|
-
|
838
836
|
# round trip: 0
|
839
837
|
OCIStringAssignText:
|
840
838
|
:version: 800
|
@@ -1003,26 +1001,6 @@ OCINumberIsInt:
|
|
1003
1001
|
- OCIError *err
|
1004
1002
|
- CONST OCINumber *number
|
1005
1003
|
- boolean *result
|
1006
|
-
:code_if_not_found: |
|
1007
|
-
/* pseude code
|
1008
|
-
* work = trunc(number);
|
1009
|
-
* if (number == work) {
|
1010
|
-
* result = TRUE;
|
1011
|
-
* } else {
|
1012
|
-
* result = FALSE;
|
1013
|
-
* }
|
1014
|
-
*/
|
1015
|
-
OCINumber work;
|
1016
|
-
sword rv;
|
1017
|
-
sword cmp;
|
1018
|
-
rv = oci8_OCINumberTrunc(err, number, 0, &work, file, line);
|
1019
|
-
if (rv != OCI_SUCCESS)
|
1020
|
-
return rv;
|
1021
|
-
rv = oci8_OCINumberCmp(err, number, &work, &cmp, file, line);
|
1022
|
-
if (rv != OCI_SUCCESS)
|
1023
|
-
return rv;
|
1024
|
-
*result = (cmp == 0) ? TRUE : FALSE;
|
1025
|
-
return OCI_SUCCESS;
|
1026
1004
|
|
1027
1005
|
# round trip: 0
|
1028
1006
|
OCINumberPrec:
|
@@ -1040,13 +1018,6 @@ OCINumberSetPi:
|
|
1040
1018
|
:args:
|
1041
1019
|
- OCIError *err
|
1042
1020
|
- OCINumber *num
|
1043
|
-
:code_if_not_found: |
|
1044
|
-
static const OCINumber pi = {
|
1045
|
-
{0x15, 0xc1, 0x04, 0x0f, 0x10, 0x5d, 0x42, 0x24, 0x5a, 0x50,
|
1046
|
-
0x21, 0x27, 0x2f, 0x1b, 0x2c, 0x27, 0x21, 0x50, 0x33, 0x1d,
|
1047
|
-
0x55, 0x15}
|
1048
|
-
};
|
1049
|
-
*num = pi;
|
1050
1021
|
|
1051
1022
|
# round trip: 0
|
1052
1023
|
OCINumberShift:
|
@@ -1064,31 +1035,6 @@ OCINumberSign:
|
|
1064
1035
|
- OCIError *err
|
1065
1036
|
- CONST OCINumber *number
|
1066
1037
|
- sword *result
|
1067
|
-
:code_if_not_found: |
|
1068
|
-
/* pseude code
|
1069
|
-
* number <=> 0
|
1070
|
-
*/
|
1071
|
-
OCINumber zero;
|
1072
|
-
sword rv;
|
1073
|
-
sword cmp;
|
1074
|
-
OCINumberSetZero(err, &zero);
|
1075
|
-
rv = oci8_OCINumberCmp(err, number, &zero, &cmp, file, line);
|
1076
|
-
if (rv != OCI_SUCCESS)
|
1077
|
-
return rv;
|
1078
|
-
if (cmp > 0)
|
1079
|
-
*result = 1;
|
1080
|
-
else if (cmp < 0)
|
1081
|
-
*result = -1;
|
1082
|
-
else
|
1083
|
-
*result = 0;
|
1084
|
-
return OCI_SUCCESS;
|
1085
|
-
|
1086
|
-
# round trip: 0
|
1087
|
-
OCIReset:
|
1088
|
-
:version: 810
|
1089
|
-
:args:
|
1090
|
-
- dvoid *hndlp
|
1091
|
-
- OCIError *errhp
|
1092
1038
|
|
1093
1039
|
#
|
1094
1040
|
# Oracle 9.0
|
@@ -1160,16 +1106,6 @@ OCIDateTimeGetTime:
|
|
1160
1106
|
- ub1 *ss
|
1161
1107
|
- ub4 *fsec
|
1162
1108
|
|
1163
|
-
# round trip: 0 (not docmented. I guess.)
|
1164
|
-
OCIIntervalFromText:
|
1165
|
-
:version: 900
|
1166
|
-
:args:
|
1167
|
-
- dvoid *hndl
|
1168
|
-
- OCIError *err
|
1169
|
-
- CONST OraText *inpstr
|
1170
|
-
- size_t str_len
|
1171
|
-
- OCIInterval *result
|
1172
|
-
|
1173
1109
|
# round trip: 0 (not docmented. I guess.)
|
1174
1110
|
OCIDateTimeGetTimeZoneOffset:
|
1175
1111
|
:version: 900
|
@@ -1226,21 +1162,6 @@ OCIIntervalSetYearMonth:
|
|
1226
1162
|
- sb4 mnth
|
1227
1163
|
- OCIInterval *result
|
1228
1164
|
|
1229
|
-
# round trip: 1
|
1230
|
-
OCILogon2_nb:
|
1231
|
-
:version: 900
|
1232
|
-
:args:
|
1233
|
-
- OCIEnv *envhp
|
1234
|
-
- OCIError *errhp
|
1235
|
-
- OCISvcCtx **svchp
|
1236
|
-
- CONST text *username
|
1237
|
-
- ub4 uname_len
|
1238
|
-
- CONST text *password
|
1239
|
-
- ub4 passwd_len
|
1240
|
-
- CONST text *dbname
|
1241
|
-
- ub4 dbname_len
|
1242
|
-
- ub4 mode
|
1243
|
-
|
1244
1165
|
# round trip: 0 (not docmented. I guess.)
|
1245
1166
|
OCIRowidToChar:
|
1246
1167
|
:version: 900
|
@@ -1378,25 +1299,6 @@ OCIClientVersion:
|
|
1378
1299
|
- sword *patch_num
|
1379
1300
|
- sword *port_update_num
|
1380
1301
|
|
1381
|
-
# round trip: 1
|
1382
|
-
OCIDBStartup_nb:
|
1383
|
-
:version: 1020
|
1384
|
-
:args:
|
1385
|
-
- OCISvcCtx *svchp
|
1386
|
-
- OCIError *errhp
|
1387
|
-
- OCIAdmin *admhp
|
1388
|
-
- ub4 mode
|
1389
|
-
- ub4 flags
|
1390
|
-
|
1391
|
-
# round trip: 1
|
1392
|
-
OCIDBShutdown_nb:
|
1393
|
-
:version: 1020
|
1394
|
-
:args:
|
1395
|
-
- OCISvcCtx *svchp
|
1396
|
-
- OCIError *errhp
|
1397
|
-
- OCIAdmin *admhp
|
1398
|
-
- ub4 mode
|
1399
|
-
|
1400
1302
|
# round trip: 1
|
1401
1303
|
OCIPing_nb:
|
1402
1304
|
:version: 1020
|
@@ -1406,21 +1308,15 @@ OCIPing_nb:
|
|
1406
1308
|
- ub4 mode
|
1407
1309
|
|
1408
1310
|
#
|
1409
|
-
# Oracle
|
1311
|
+
# Oracle 18.1
|
1410
1312
|
#
|
1411
|
-
|
1412
|
-
|
1413
|
-
:version: 1110
|
1414
|
-
:args:
|
1415
|
-
- const void *parenth
|
1416
|
-
- void **descpp
|
1417
|
-
- const ub4 type
|
1418
|
-
- ub4 array_size
|
1419
|
-
- const size_t xtramem_sz
|
1420
|
-
- void **usrmempp
|
1421
|
-
|
1422
|
-
OCIArrayDescriptorFree:
|
1423
|
-
:version: 1110
|
1313
|
+
OCIServerRelease2:
|
1314
|
+
:version: 1800
|
1424
1315
|
:args:
|
1425
|
-
-
|
1426
|
-
-
|
1316
|
+
- dvoid *hndlp
|
1317
|
+
- OCIError *errhp
|
1318
|
+
- OraText *bufp
|
1319
|
+
- ub4 bufsz
|
1320
|
+
- ub1 hndltype
|
1321
|
+
- ub4 *version
|
1322
|
+
- ub4 mode
|
data/ext/oci8/attr.c
CHANGED
@@ -15,8 +15,9 @@ typedef struct {
|
|
15
15
|
OCIRowid *ridp;
|
16
16
|
} rowid_arg_t;
|
17
17
|
|
18
|
-
static VALUE get_rowid_attr(
|
18
|
+
static VALUE get_rowid_attr(VALUE varg)
|
19
19
|
{
|
20
|
+
rowid_arg_t *arg = (rowid_arg_t *)varg;
|
20
21
|
oci8_base_t *base = arg->base;
|
21
22
|
ub4 attrtype = arg->attrtype;
|
22
23
|
char buf[MAX_ROWID_LEN];
|
@@ -36,8 +37,9 @@ static VALUE get_rowid_attr(rowid_arg_t *arg)
|
|
36
37
|
return rb_external_str_new_with_enc(buf, buflen, rb_usascii_encoding());
|
37
38
|
}
|
38
39
|
|
39
|
-
static VALUE rowid_ensure(
|
40
|
+
static VALUE rowid_ensure(VALUE varg)
|
40
41
|
{
|
42
|
+
rowid_arg_t *arg = (rowid_arg_t *)varg;
|
41
43
|
if (arg->ridp != NULL) {
|
42
44
|
OCIDescriptorFree(arg->ridp, OCI_DTYPE_ROWID);
|
43
45
|
}
|