ruby-oci8 2.2.3 → 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.
Files changed (77) hide show
  1. checksums.yaml +7 -0
  2. data/ChangeLog +427 -0
  3. data/NEWS +335 -42
  4. data/README.md +20 -9
  5. data/dist-files +9 -3
  6. data/docs/bind-array-to-in_cond.md +2 -2
  7. data/docs/conflicts-local-connections-and-processes.md +7 -4
  8. data/docs/hanging-after-inactivity.md +63 -0
  9. data/docs/install-binary-package.md +15 -11
  10. data/docs/install-full-client.md +18 -21
  11. data/docs/install-instant-client.md +45 -27
  12. data/docs/install-on-osx.md +31 -120
  13. data/docs/ldap-auth-and-function-interposition.md +123 -0
  14. data/docs/number-type-mapping.md +79 -0
  15. data/docs/platform-specific-issues.md +17 -50
  16. data/docs/report-installation-issue.md +3 -0
  17. data/docs/timeout-parameters.md +3 -0
  18. data/ext/oci8/apiwrap.c.tmpl +2 -5
  19. data/ext/oci8/apiwrap.rb +6 -1
  20. data/ext/oci8/apiwrap.yml +34 -22
  21. data/ext/oci8/attr.c +4 -2
  22. data/ext/oci8/bind.c +366 -6
  23. data/ext/oci8/connection_pool.c +3 -3
  24. data/ext/oci8/encoding.c +5 -5
  25. data/ext/oci8/env.c +8 -2
  26. data/ext/oci8/error.c +24 -16
  27. data/ext/oci8/extconf.rb +8 -4
  28. data/ext/oci8/hook_funcs.c +274 -61
  29. data/ext/oci8/lob.c +31 -75
  30. data/ext/oci8/metadata.c +2 -2
  31. data/ext/oci8/object.c +72 -27
  32. data/ext/oci8/oci8.c +45 -132
  33. data/ext/oci8/oci8.h +32 -88
  34. data/ext/oci8/oci8lib.c +178 -38
  35. data/ext/oci8/ocihandle.c +37 -37
  36. data/ext/oci8/ocinumber.c +23 -18
  37. data/ext/oci8/oraconf.rb +158 -339
  38. data/ext/oci8/oradate.c +19 -19
  39. data/ext/oci8/plthook.h +10 -0
  40. data/ext/oci8/plthook_elf.c +433 -268
  41. data/ext/oci8/plthook_osx.c +40 -9
  42. data/ext/oci8/plthook_win32.c +9 -0
  43. data/ext/oci8/stmt.c +52 -17
  44. data/ext/oci8/win32.c +4 -22
  45. data/lib/oci8/bindtype.rb +1 -15
  46. data/lib/oci8/check_load_error.rb +57 -10
  47. data/lib/oci8/cursor.rb +57 -25
  48. data/lib/oci8/metadata.rb +9 -1
  49. data/lib/oci8/object.rb +10 -0
  50. data/lib/oci8/oci8.rb +33 -28
  51. data/lib/oci8/oracle_version.rb +11 -1
  52. data/lib/oci8/properties.rb +22 -0
  53. data/lib/oci8/version.rb +1 -1
  54. data/lib/oci8.rb +48 -4
  55. data/lib/ruby-oci8.rb +0 -3
  56. data/pre-distclean.rb +1 -3
  57. data/ruby-oci8.gemspec +3 -8
  58. data/setup.rb +11 -2
  59. data/test/README.md +37 -0
  60. data/test/config.rb +1 -1
  61. data/test/setup_test_object.sql +21 -13
  62. data/test/setup_test_package.sql +59 -0
  63. data/test/test_all.rb +2 -0
  64. data/test/test_bind_boolean.rb +99 -0
  65. data/test/test_bind_integer.rb +47 -0
  66. data/test/test_break.rb +11 -9
  67. data/test/test_clob.rb +4 -16
  68. data/test/test_connstr.rb +29 -13
  69. data/test/test_datetime.rb +8 -3
  70. data/test/test_object.rb +27 -9
  71. data/test/test_oci8.rb +170 -46
  72. data/test/test_oranumber.rb +12 -6
  73. data/test/test_package_type.rb +15 -3
  74. data/test/test_properties.rb +17 -0
  75. metadata +40 -54
  76. data/docs/osx-install-dev-tools.png +0 -0
  77. data/test/README +0 -42
data/ext/oci8/oradate.c CHANGED
@@ -116,12 +116,12 @@ static VALUE ora_date_s_allocate(VALUE klass)
116
116
  * OraDate.new(2012) # => 2012-01-01 00:00:00
117
117
  * OraDate.new(2012, 3, 4) # => 2012-03-04 00:00:00
118
118
  *
119
- * @param [Fixnum] year year
120
- * @param [Fixnum] month month
121
- * @param [Fixnum] day day of month
122
- * @param [Fixnum] hour hour
123
- * @param [Fixnum] min minute
124
- * @param [Fixnum] sec second
119
+ * @param [Integer] year year
120
+ * @param [Integer] month month
121
+ * @param [Integer] day day of month
122
+ * @param [Integer] hour hour
123
+ * @param [Integer] min minute
124
+ * @param [Integer] sec second
125
125
  */
126
126
  static VALUE ora_date_initialize(int argc, VALUE *argv, VALUE self)
127
127
  {
@@ -198,7 +198,7 @@ static VALUE ora_date_initialize_copy(VALUE lhs, VALUE rhs)
198
198
  *
199
199
  * @return [OraDate]
200
200
  */
201
- static VALUE ora_date_s_now(int argc, VALUE *argv, VALUE klass)
201
+ static VALUE ora_date_s_now(VALUE klass)
202
202
  {
203
203
  VALUE obj = ora_date_s_allocate(klass);
204
204
  ora_date_t *od = check_oradate(obj);
@@ -267,7 +267,7 @@ static VALUE ora_date_to_a(VALUE self)
267
267
  *
268
268
  * Returns the year field of <i>self</i>.
269
269
  *
270
- * @return [Fixnum]
270
+ * @return [Integer]
271
271
  */
272
272
  static VALUE ora_date_year(VALUE self)
273
273
  {
@@ -281,7 +281,7 @@ static VALUE ora_date_year(VALUE self)
281
281
  *
282
282
  * Assigns <i>num</i> to the year field of <i>self</i>.
283
283
  *
284
- * @param [Fixnum] num number between -4712 and 9999
284
+ * @param [Integer] num number between -4712 and 9999
285
285
  */
286
286
  static VALUE ora_date_set_year(VALUE self, VALUE val)
287
287
  {
@@ -299,7 +299,7 @@ static VALUE ora_date_set_year(VALUE self, VALUE val)
299
299
  * Returns the month field of <i>self</i>.
300
300
  * The month starts with one.
301
301
  *
302
- * @return [Fixnum]
302
+ * @return [Integer]
303
303
  */
304
304
  static VALUE ora_date_month(VALUE self)
305
305
  {
@@ -314,7 +314,7 @@ static VALUE ora_date_month(VALUE self)
314
314
  * Assigns <i>num</i> to the month field of <i>self</i>.
315
315
  * The month starts with one.
316
316
  *
317
- * @param [Fixnum] num number between 1 and 12
317
+ * @param [Integer] num number between 1 and 12
318
318
  */
319
319
  static VALUE ora_date_set_month(VALUE self, VALUE val)
320
320
  {
@@ -331,7 +331,7 @@ static VALUE ora_date_set_month(VALUE self, VALUE val)
331
331
  *
332
332
  * Returns the day of month field of <i>self</i>.
333
333
  *
334
- * @return [Fixnum]
334
+ * @return [Integer]
335
335
  */
336
336
  static VALUE ora_date_day(VALUE self)
337
337
  {
@@ -345,7 +345,7 @@ static VALUE ora_date_day(VALUE self)
345
345
  *
346
346
  * Assigns <i>num</i> to the day of month field of <i>self</i>.
347
347
  *
348
- * @param [Fixnum] num number between 1 and 31
348
+ * @param [Integer] num number between 1 and 31
349
349
  */
350
350
  static VALUE ora_date_set_day(VALUE self, VALUE val)
351
351
  {
@@ -362,7 +362,7 @@ static VALUE ora_date_set_day(VALUE self, VALUE val)
362
362
  *
363
363
  * Returns the hour field of <i>self</i>.
364
364
  *
365
- * @return [Fixnum]
365
+ * @return [Integer]
366
366
  */
367
367
  static VALUE ora_date_hour(VALUE self)
368
368
  {
@@ -376,7 +376,7 @@ static VALUE ora_date_hour(VALUE self)
376
376
  *
377
377
  * Assigns <i>num</i> to the hour field of <i>self</i>.
378
378
  *
379
- * @param [Fixnum] num number between 0 and 23
379
+ * @param [Integer] num number between 0 and 23
380
380
  */
381
381
  static VALUE ora_date_set_hour(VALUE self, VALUE val)
382
382
  {
@@ -393,7 +393,7 @@ static VALUE ora_date_set_hour(VALUE self, VALUE val)
393
393
  *
394
394
  * Returns the minute field of <i>self</i>.
395
395
  *
396
- * @return [Fixnum]
396
+ * @return [Integer]
397
397
  */
398
398
  static VALUE ora_date_minute(VALUE self)
399
399
  {
@@ -407,7 +407,7 @@ static VALUE ora_date_minute(VALUE self)
407
407
  *
408
408
  * Assigns <i>num</i> to the minute field of <i>self</i>.
409
409
  *
410
- * @param [Fixnum] num number between 0 and 59
410
+ * @param [Integer] num number between 0 and 59
411
411
  */
412
412
  static VALUE ora_date_set_minute(VALUE self, VALUE val)
413
413
  {
@@ -424,7 +424,7 @@ static VALUE ora_date_set_minute(VALUE self, VALUE val)
424
424
  *
425
425
  * Returns the second field of <i>self</i>.
426
426
  *
427
- * @return [Fixnum]
427
+ * @return [Integer]
428
428
  */
429
429
  static VALUE ora_date_second(VALUE self)
430
430
  {
@@ -438,7 +438,7 @@ static VALUE ora_date_second(VALUE self)
438
438
  *
439
439
  * Assigns <i>num</i> to the second field of <i>self</i>.
440
440
  *
441
- * @param [Fixnum] num number between 0 and 59
441
+ * @param [Integer] num number between 0 and 59
442
442
  */
443
443
  static VALUE ora_date_set_second(VALUE self, VALUE val)
444
444
  {
data/ext/oci8/plthook.h CHANGED
@@ -43,14 +43,24 @@
43
43
  #define PLTHOOK_INVALID_ARGUMENT 4
44
44
  #define PLTHOOK_OUT_OF_MEMORY 5
45
45
  #define PLTHOOK_INTERNAL_ERROR 6
46
+ #define PLTHOOK_NOT_IMPLEMENTED 7
46
47
 
47
48
  typedef struct plthook plthook_t;
48
49
 
50
+ #ifdef __cplusplus
51
+ extern "C" {
52
+ #endif
53
+
49
54
  int plthook_open(plthook_t **plthook_out, const char *filename);
55
+ int plthook_open_by_handle(plthook_t **plthook_out, void *handle);
50
56
  int plthook_open_by_address(plthook_t **plthook_out, void *address);
51
57
  int plthook_enum(plthook_t *plthook, unsigned int *pos, const char **name_out, void ***addr_out);
52
58
  int plthook_replace(plthook_t *plthook, const char *funcname, void *funcaddr, void **oldfunc);
53
59
  void plthook_close(plthook_t *plthook);
54
60
  const char *plthook_error(void);
55
61
 
62
+ #ifdef __cplusplus
63
+ }; /* extern "C" */
64
+ #endif
65
+
56
66
  #endif