[ruby-oci8-commit] [284] trunk/ruby-oci8: * ext/oci8/apiwrap.c.tmpl, ext/oci8/apiwrap.h.tmpl, ext/oci8/apiwrap.rb

nobody at rubyforge.org nobody at rubyforge.org
Tue Aug 26 05:00:33 EDT 2008


Revision: 284
Author:   kubo
Date:     2008-08-26 05:00:33 -0400 (Tue, 26 Aug 2008)

Log Message:
-----------
* ext/oci8/apiwrap.c.tmpl, ext/oci8/apiwrap.h.tmpl, ext/oci8/apiwrap.rb
  ext/oci8/apiwrap.yml, ext/oci8/bind.c, ext/oci8/extconf.rb,
  ext/oci8/oci8.h, ext/oci8/ocidatetime.c, ext/oci8/xmldb.c,
  lib/oci8.rb.in, lib/oci8/datetime.rb, lib/oci8/metadata.rb,
  lib/oci8/oci8.rb: change oracle version number format.
    For example Oracle 9.1.0's version number was represented as 910
    in ruby-oci8. Now it is 0x09000000. This format is same with
    that of the last argument of OCIServerRelease().

Modified Paths:
--------------
    trunk/ruby-oci8/ChangeLog
    trunk/ruby-oci8/ext/oci8/apiwrap.c.tmpl
    trunk/ruby-oci8/ext/oci8/apiwrap.h.tmpl
    trunk/ruby-oci8/ext/oci8/apiwrap.rb
    trunk/ruby-oci8/ext/oci8/apiwrap.yml
    trunk/ruby-oci8/ext/oci8/bind.c
    trunk/ruby-oci8/ext/oci8/extconf.rb
    trunk/ruby-oci8/ext/oci8/oci8.h
    trunk/ruby-oci8/ext/oci8/ocidatetime.c
    trunk/ruby-oci8/ext/oci8/xmldb.c
    trunk/ruby-oci8/lib/oci8/datetime.rb
    trunk/ruby-oci8/lib/oci8/metadata.rb
    trunk/ruby-oci8/lib/oci8/oci8.rb
    trunk/ruby-oci8/lib/oci8.rb.in

Modified: trunk/ruby-oci8/ChangeLog
===================================================================
--- trunk/ruby-oci8/ChangeLog	2008-08-10 14:12:08 UTC (rev 283)
+++ trunk/ruby-oci8/ChangeLog	2008-08-26 09:00:33 UTC (rev 284)
@@ -1,3 +1,13 @@
+2008-08-26  KUBO Takehiro  <kubo at jiubao.org>
+	* ext/oci8/apiwrap.c.tmpl, ext/oci8/apiwrap.h.tmpl, ext/oci8/apiwrap.rb
+	  ext/oci8/apiwrap.yml, ext/oci8/bind.c, ext/oci8/extconf.rb,
+	  ext/oci8/oci8.h, ext/oci8/ocidatetime.c, ext/oci8/xmldb.c,
+	  lib/oci8.rb.in, lib/oci8/datetime.rb, lib/oci8/metadata.rb,
+	  lib/oci8/oci8.rb: change oracle version number format.
+	    For example Oracle 9.1.0's version number was represented as 910
+	    in ruby-oci8. Now it is 0x09000000. This format is same with
+	    that of the last argument of OCIServerRelease().
+
 2008-08-10  KUBO Takehiro  <kubo at jiubao.org>
 	* ext/oci8/lob.c: add workaround code for a losing character problem
 	    when reading CLOB. The problem is happened at the following condition.

Modified: trunk/ruby-oci8/ext/oci8/apiwrap.c.tmpl
===================================================================
--- trunk/ruby-oci8/ext/oci8/apiwrap.c.tmpl	2008-08-10 14:12:08 UTC (rev 283)
+++ trunk/ruby-oci8/ext/oci8/apiwrap.c.tmpl	2008-08-26 09:00:33 UTC (rev 284)
@@ -15,7 +15,7 @@
 typedef <%=f.ret%> (*oci8_<%=f.name%>_func_t)(<%=f.args.collect {|arg| arg.dcl}.join(', ')%>);
 static oci8_<%=f.name%>_func_t oci8_<%=f.name%>_func;
 #define <%=f.name%> oci8_<%=f.name%>_func
-#elif ORACLE_CLIENT_VERSION < <%=f.version%>
+#elif ORACLE_CLIENT_VERSION < <%=f.version_num%>
 #define <%=f.name%>(<%=f.args.collect {|a| a.name}.join(', ')%>) (0)
 #endif
 <%
@@ -46,7 +46,7 @@
 int oci8_have_<%=f.name%>_nb;
 #endif
 
-#if defined RUNTIME_API_CHECK || ORACLE_CLIENT_VERSION >= <%=f.version%>
+#if defined RUNTIME_API_CHECK || ORACLE_CLIENT_VERSION >= <%=f.version_num%>
 static VALUE oci8_<%=f.name%>_cb(void *user_data)
 {
     oci8_<%=f.name%>_data_t *data = (oci8_<%=f.name%>_data_t *)user_data;
@@ -128,7 +128,8 @@
 ## RUNTIME_API_CHECK
 ##
 ######################################################################
-current_version = funcs[0].version
+current_version_num = funcs[0].version_num
+current_version_str = funcs[0].version_str
 have_vars = []
 %>
 #if defined RUNTIME_API_CHECK
@@ -139,19 +140,20 @@
     oracle_client_version = 0;
 <%
 funcs.each do |f|
-  if current_version != f.version
+  if current_version_num != f.version_num
     unless have_vars.empty?
-%>    /* pass Oracle <%=current_version.to_s.gsub(/(.)(.)$/, '.\1.\2')%> API */
-    oracle_client_version = <%=current_version%>;
+%>    /* pass Oracle <%=current_version_str%> API */
+    oracle_client_version = <%=current_version_num%>;
 <%    have_vars.each do |v|
 %>    <%=v%> = 1;
 <%    end
     end
     have_vars = []
-    current_version = f.version
+    current_version_num = f.version_num
+    current_version_str = f.version_str
 %>
     /*
-     * checking Oracle <%=f.version.to_s.gsub(/(.)(.)$/, '.\1.\2')%> API
+     * checking Oracle <%=f.version_str%> API
      */
 <%
   end
@@ -161,8 +163,8 @@
         return;
 <%
 end
-%>    /* pass Oracle <%=current_version.to_s.gsub(/(.)(.)$/, '.\1.\2')%> API */
-    oracle_client_version = <%=current_version%>;
+%>    /* pass Oracle <%=current_version_str%> API */
+    oracle_client_version = <%=current_version_num%>;
 <%    have_vars.each do |v|
 %>    <%=v%> = 1;
 <%    end

Modified: trunk/ruby-oci8/ext/oci8/apiwrap.h.tmpl
===================================================================
--- trunk/ruby-oci8/ext/oci8/apiwrap.h.tmpl	2008-08-10 14:12:08 UTC (rev 283)
+++ trunk/ruby-oci8/ext/oci8/apiwrap.h.tmpl	2008-08-26 09:00:33 UTC (rev 284)
@@ -18,7 +18,7 @@
 %>
 /*
  * <%=f.name%>
- *   version: <%=f.version%>
+ *   version: <%=f.version_str%>
  *   remote:  true
  */
 <%=f.ret%> oci8_<%=f.name%>_nb(oci8_svcctx_t *svcctx, <%=f.args.collect {|arg| arg.dcl}.join(', ')%>, const char *file, int line);
@@ -27,7 +27,7 @@
 #if defined RUNTIME_API_CHECK
 extern int oci8_have_<%=f.name%>_nb;
 #define have_<%=f.name%>_nb oci8_have_<%=f.name%>_nb
-#elif ORACLE_CLIENT_VERSION >= <%=f.version%>
+#elif ORACLE_CLIENT_VERSION >= <%=f.version_num%>
 #define have_<%=f.name%>_nb (1)
 #else
 #define have_<%=f.name%>_nb (0)
@@ -37,7 +37,7 @@
 %>
 /*
  * <%=f.name%>
- *   version: <%=f.version%>
+ *   version: <%=f.version_str%>
  *   remote:  false
  */
 <%=f.ret%> oci8_<%=f.name%>(<%=f.args.collect {|arg| arg.dcl}.join(', ')%>, const char *file, int line);
@@ -49,7 +49,7 @@
 #if defined RUNTIME_API_CHECK
 extern int oci8_have_<%=f.name%>;
 #define have_<%=f.name%> oci8_have_<%=f.name%>
-#elif ORACLE_CLIENT_VERSION >= <%=f.version%>
+#elif ORACLE_CLIENT_VERSION >= <%=f.version_num%>
 #define have_<%=f.name%> (1)
 #else
 #define have_<%=f.name%> (0)

Modified: trunk/ruby-oci8/ext/oci8/apiwrap.rb
===================================================================
--- trunk/ruby-oci8/ext/oci8/apiwrap.rb	2008-08-10 14:12:08 UTC (rev 283)
+++ trunk/ruby-oci8/ext/oci8/apiwrap.rb	2008-08-26 09:00:33 UTC (rev 284)
@@ -16,6 +16,8 @@
 class FuncDef
   attr_reader :name
   attr_reader :version
+  attr_reader :version_num
+  attr_reader :version_str
   attr_reader :remote
   attr_reader :args
   attr_reader :ret
@@ -29,7 +31,21 @@
       @name = key
       @remote = false
     end
-    @version = val[:version]
+    ver = val[:version]
+    ver_major = (ver / 100)
+    ver_minor = (ver / 10) % 10
+    ver_update = ver % 10
+    @version = ((ver_major << 24) | (ver_minor << 20) | (ver_update << 12))
+    case @version
+    when 0x08000000; @version_num = 'ORAVER_8_0'
+    when 0x08100000; @version_num = 'ORAVER_8_1'
+    when 0x09100000; @version_num = 'ORAVER_9_1'
+    when 0x09200000; @version_num = 'ORAVER_9_2'
+    when 0x0a100000; @version_num = 'ORAVER_10_1'
+    when 0x0a200000; @version_num = 'ORAVER_10_2'
+    when 0x0b100000; @version_num = 'ORAVER_11_1'
+    end
+    @version_str = "#{ver_major}.#{ver_minor}.#{ver_update}"
     @ret = val[:ret] || 'sword'
     @args = val[:args].collect do |arg|
       ArgDef.new(arg)

Modified: trunk/ruby-oci8/ext/oci8/apiwrap.yml
===================================================================
--- trunk/ruby-oci8/ext/oci8/apiwrap.yml	2008-08-10 14:12:08 UTC (rev 283)
+++ trunk/ruby-oci8/ext/oci8/apiwrap.yml	2008-08-26 09:00:33 UTC (rev 284)
@@ -997,12 +997,12 @@
             - OCIError *errhp
 
 #
-# Oracle 9.0
+# Oracle 9.1
 #
 
 # round trip: 0 (not docmented. I guess.)
 OCIDateTimeConstruct:
-  :version: 900
+  :version: 910
   :args:    - dvoid  *hndl
             - OCIError *err
             - OCIDateTime *datetime
@@ -1018,7 +1018,7 @@
 
 # round trip: 0 (not docmented. I guess.)
 OCIDateTimeGetDate:
-  :version: 900
+  :version: 910
   :args:    - dvoid *hndl
             - OCIError *err
             - const OCIDateTime *date
@@ -1028,7 +1028,7 @@
 
 # round trip: 0 (not docmented. I guess.)
 OCIDateTimeGetTime:
-  :version: 900
+  :version: 910
   :args:    - dvoid *hndl
             - OCIError *err
             - OCIDateTime *datetime
@@ -1039,7 +1039,7 @@
 
 # round trip: 0 (not docmented. I guess.)
 OCIDateTimeGetTimeZoneOffset:
-  :version: 900
+  :version: 910
   :args:    - dvoid *hndl
             - OCIError *err
             - const OCIDateTime *datetime
@@ -1048,7 +1048,7 @@
 
 # round trip: 0 (not docmented. I guess.)
 OCIIntervalGetDaySecond:
-  :version: 900
+  :version: 910
   :args:    - dvoid *hndl
             - OCIError *err
             - sb4 *dy
@@ -1060,7 +1060,7 @@
 
 # round trip: 0 (not docmented. I guess.)
 OCIIntervalGetYearMonth:
-  :version: 900
+  :version: 910
   :args:    - dvoid *hndl
             - OCIError *err
             - sb4 *yr
@@ -1069,7 +1069,7 @@
 
 # round trip: 0 (not docmented. I guess.)
 OCIIntervalSetDaySecond:
-  :version: 900
+  :version: 910
   :args:    - dvoid *hndl
             - OCIError *err
             - sb4 dy
@@ -1081,7 +1081,7 @@
 
 # round trip: 0 (not docmented. I guess.)
 OCIIntervalSetYearMonth:
-  :version: 900
+  :version: 910
   :args:    - dvoid *hndl
             - OCIError *err
             - sb4 yr
@@ -1090,7 +1090,7 @@
 
 # round trip: 0 (not docmented. I guess.)
 OCIRowidToChar:
-  :version: 900
+  :version: 910
   :args:    - OCIRowid *rowidDesc
             - OraText *outbfp
             - ub2 *outbflp

Modified: trunk/ruby-oci8/ext/oci8/bind.c
===================================================================
--- trunk/ruby-oci8/ext/oci8/bind.c	2008-08-10 14:12:08 UTC (rev 283)
+++ trunk/ruby-oci8/ext/oci8/bind.c	2008-08-26 09:00:33 UTC (rev 284)
@@ -471,7 +471,7 @@
     oci8_define_bind_class("LongRaw", &bind_long_raw_class);
     oci8_define_bind_class("Fixnum", &bind_fixnum_class);
     oci8_define_bind_class("Float", &bind_float_class);
-    if (oracle_client_version >= 1000) {
+    if (oracle_client_version >= ORAVER_10_1) {
         oci8_define_bind_class("BinaryDouble", &bind_binary_double_class);
     }
 }

Modified: trunk/ruby-oci8/ext/oci8/extconf.rb
===================================================================
--- trunk/ruby-oci8/ext/oci8/extconf.rb	2008-08-10 14:12:08 UTC (rev 283)
+++ trunk/ruby-oci8/ext/oci8/extconf.rb	2008-08-26 09:00:33 UTC (rev 284)
@@ -33,16 +33,22 @@
 saved_libs = $libs
 $libs += oraconf.libs
 
-oci_actual_client_version = 800
+oci_actual_client_version = 0x08000000
 funcs = {}
 YAML.load(open(File.dirname(__FILE__) + '/apiwrap.yml')).each do |key, val|
   key = key[0..-4] if key[-3..-1] == '_nb'
-  funcs[val[:version]] ||= []
-  funcs[val[:version]] << key
+  ver = val[:version]
+  ver_major = (ver / 100)
+  ver_minor = (ver / 10) % 10
+  ver_update = ver % 10
+  ver = ((ver_major << 24) | (ver_minor << 20) | (ver_update << 12))
+  funcs[ver] ||= []
+  funcs[ver] << key
 end
 funcs.keys.sort.each do |version|
-  next if version == 800
-  puts "checking for Oracle #{version.to_s.gsub(/(.)(.)$/, '.\1.\2')} API - start"
+  next if version == 0x08000000
+  verstr = format('%d.%d.%d', ((version >> 24) & 0xFF), ((version >> 20) & 0xF), ((version >> 12) & 0xFF))
+  puts "checking for Oracle #{verstr} API - start"
   result = catch :result do
     funcs[version].sort.each do |func|
       unless have_func(func)
@@ -52,17 +58,17 @@
     oci_actual_client_version = version
     "pass"
   end
-  puts "checking for Oracle #{version.to_s.gsub(/(.)(.)$/, '.\1.\2')} API - #{result}"
+  puts "checking for Oracle #{verstr} API - #{result}"
   break if result == 'fail'
 end
-$defs << "-DACTUAL_ORACLE_CLIENT_VERSION=#{oci_actual_client_version}"
+$defs << "-DACTUAL_ORACLE_CLIENT_VERSION=#{format('0x%08x', oci_actual_client_version)}"
 
 if with_config('oracle-version')
   oci_client_version = with_config('oracle-version').to_i
 else
   oci_client_version = oci_actual_client_version
 end
-$defs << "-DORACLE_CLIENT_VERSION=#{oci_client_version}"
+$defs << "-DORACLE_CLIENT_VERSION=#{format('0x%08x', oci_client_version)}"
 
 if with_config('runtime-check')
   $defs << "-DRUNTIME_API_CHECK=1"

Modified: trunk/ruby-oci8/ext/oci8/oci8.h
===================================================================
--- trunk/ruby-oci8/ext/oci8/oci8.h	2008-08-10 14:12:08 UTC (rev 283)
+++ trunk/ruby-oci8/ext/oci8/oci8.h	2008-08-26 09:00:33 UTC (rev 284)
@@ -27,9 +27,21 @@
 #ifdef HAVE_XMLOTN_H
 #include "xmlotn.h"
 #endif
+
+#define ORAVERNUM(major, minor, update, patch, port_update) \
+    (((major) << 24) | ((minor) << 20) | ((update) << 12) | ((patch) << 8) | (port_update))
+
+#define ORAVER_8_0 ORAVERNUM(8, 0, 0, 0, 0)
+#define ORAVER_8_1 ORAVERNUM(8, 1, 0, 0, 0)
+#define ORAVER_9_1 ORAVERNUM(9, 1, 0, 0, 0)
+#define ORAVER_9_2 ORAVERNUM(9, 1, 0, 0, 0)
+#define ORAVER_10_1 ORAVERNUM(10, 1, 0, 0, 0)
+#define ORAVER_10_2 ORAVERNUM(10, 2, 0, 0, 0)
+#define ORAVER_11_1 ORAVERNUM(11, 1, 0, 0, 0)
+
 #include "extconf.h"
 
-#if ACTUAL_ORACLE_CLIENT_VERSION < 1020
+#if ACTUAL_ORACLE_CLIENT_VERSION < ORAVER_10_2
 typedef struct OCIAdmin OCIAdmin;
 #endif
 

Modified: trunk/ruby-oci8/ext/oci8/ocidatetime.c
===================================================================
--- trunk/ruby-oci8/ext/oci8/ocidatetime.c	2008-08-10 14:12:08 UTC (rev 283)
+++ trunk/ruby-oci8/ext/oci8/ocidatetime.c	2008-08-26 09:00:33 UTC (rev 284)
@@ -100,7 +100,7 @@
     SQLT_ODT,
 };
 
-#if defined RUNTIME_API_CHECK || ORACLE_CLIENT_VERSION >= 900
+#if defined RUNTIME_API_CHECK || ORACLE_CLIENT_VERSION >= ORAVER_9_1
 
 VALUE oci8_make_ocitimestamp(OCIDateTime *dttm)
 {
@@ -432,14 +432,14 @@
     SQLT_INTERVAL_DS
 };
 
-#endif /* defined RUNTIME_API_CHECK || ORACLE_CLIENT_VERSION >= 900 */
+#endif /* defined RUNTIME_API_CHECK || ORACLE_CLIENT_VERSION >= ORAVER_9_1 */
 
 void Init_oci_datetime(void)
 {
     oci8_define_bind_class("OCIDate", &bind_ocidate_class);
 
-#if defined RUNTIME_API_CHECK || ORACLE_CLIENT_VERSION >= 900
-    if (oracle_client_version >= 900) {
+#if defined RUNTIME_API_CHECK || ORACLE_CLIENT_VERSION >= ORAVER_9_1
+    if (oracle_client_version >= ORAVER_9_1) {
         oci8_define_bind_class("OCITimestamp", &bind_ocitimestamp_class);
         oci8_define_bind_class("OCIIntervalYM", &bind_ociinterval_ym_class);
         oci8_define_bind_class("OCIIntervalDS", &bind_ociinterval_ds_class);

Modified: trunk/ruby-oci8/ext/oci8/xmldb.c
===================================================================
--- trunk/ruby-oci8/ext/oci8/xmldb.c	2008-08-10 14:12:08 UTC (rev 283)
+++ trunk/ruby-oci8/ext/oci8/xmldb.c	2008-08-26 09:00:33 UTC (rev 284)
@@ -1,7 +1,7 @@
 /* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
 #include "oci8.h"
 
-#if 0 /* disabled for a while. */ && (ORACLE_CLIENT_VERSION >= 1000 || defined RUNTIME_API_CHECK)
+#if 0 /* disabled for a while. */ && (ORACLE_CLIENT_VERSION >= ORAVER_10_1 || defined RUNTIME_API_CHECK)
 
 #ifndef HAVE_XMLOTN_H
 /* declarations in xmlproc.h of Oracle XML Development Kit */

Modified: trunk/ruby-oci8/lib/oci8/datetime.rb
===================================================================
--- trunk/ruby-oci8/lib/oci8/datetime.rb	2008-08-10 14:12:08 UTC (rev 283)
+++ trunk/ruby-oci8/lib/oci8/datetime.rb	2008-08-26 09:00:33 UTC (rev 284)
@@ -95,7 +95,7 @@
         ocidate_to_datetime(ary)
       end
 
-      if OCI8.oracle_client_version >= 900
+      if OCI8.oracle_client_version >= ORAVER_9_1
 
         def ocitimestamp_to_datetime(ary)
           year, month, day, hour, minute, sec, fsec, tz_hour, tz_min = ary
@@ -165,7 +165,7 @@
       end
     end
 
-    if OCI8.oracle_client_version >= 900
+    if OCI8.oracle_client_version >= ORAVER_9_1
       class DateTimeViaOCITimestamp < OCI8::BindType::OCITimestamp
         include OCI8::BindType::Util
 
@@ -275,7 +275,7 @@
     #   cursor.close
     #
     class DateTime
-      if OCI8.oracle_client_version >= 900
+      if OCI8.oracle_client_version >= ORAVER_9_1
         def self.create(con, val, param, max_array_size)
           DateTimeViaOCITimestamp.new(con, val, param, max_array_size)
         end
@@ -287,7 +287,7 @@
     end
 
     class Time
-      if OCI8.oracle_client_version >= 900
+      if OCI8.oracle_client_version >= ORAVER_9_1
         def self.create(con, val, param, max_array_size)
           TimeViaOCITimestamp.new(con, val, param, max_array_size)
         end
@@ -298,7 +298,7 @@
       end
     end
 
-    if OCI8.oracle_client_version >= 900
+    if OCI8.oracle_client_version >= ORAVER_9_1
       #--
       # OCI8::BindType::IntervalYM
       #++

Modified: trunk/ruby-oci8/lib/oci8/metadata.rb
===================================================================
--- trunk/ruby-oci8/lib/oci8/metadata.rb	2008-08-10 14:12:08 UTC (rev 283)
+++ trunk/ruby-oci8/lib/oci8/metadata.rb	2008-08-26 09:00:33 UTC (rev 284)
@@ -998,7 +998,7 @@
         __charset_form
       end
 
-      if OCI8.oracle_client_version >= 900
+      if OCI8.oracle_client_version >= ORAVER_9_1
         # The fractional seconds precision of a datetime or interval.
         #
         # (unavailable on Oracle 8.1 or lower)
@@ -1332,7 +1332,7 @@
 
       ## Table 6-13 Attributes Belonging to Columns of Tables or Views
 
-      if OCI8.oracle_client_version >= 900
+      if OCI8.oracle_client_version >= ORAVER_9_1
         # returns the type of length semantics of the column.
         # [<tt>:byte</tt>]  byte-length semantics
         # [<tt>:char</tt>]  character-length semantics.
@@ -1430,7 +1430,7 @@
       ## Table 6-8 Attributes Belonging to Type Attributes
       ## But Column also have these.
 
-      if OCI8.oracle_client_version >= 900
+      if OCI8.oracle_client_version >= ORAVER_9_1
         # The fractional seconds precision of a datetime or interval.
         #
         # (unavailable on Oracle 8.1 or lower)

Modified: trunk/ruby-oci8/lib/oci8/oci8.rb
===================================================================
--- trunk/ruby-oci8/lib/oci8/oci8.rb	2008-08-10 14:12:08 UTC (rev 283)
+++ trunk/ruby-oci8/lib/oci8/oci8.rb	2008-08-26 09:00:33 UTC (rev 284)
@@ -690,7 +690,7 @@
 # DATE          SQLT_DAT      7    0    0
 OCI8::BindType::Mapping[:date] = OCI8::BindType::Time
 
-if OCI8.oracle_client_version >= 900
+if OCI8.oracle_client_version >= OCI8::ORAVER_9_1
   OCI8::BindType::Mapping[:timestamp] = OCI8::BindType::Time
   OCI8::BindType::Mapping[:timestamp_tz] = OCI8::BindType::DateTime
   OCI8::BindType::Mapping[:timestamp_ltz] = OCI8::BindType::Time

Modified: trunk/ruby-oci8/lib/oci8.rb.in
===================================================================
--- trunk/ruby-oci8/lib/oci8.rb.in	2008-08-10 14:12:08 UTC (rev 283)
+++ trunk/ruby-oci8/lib/oci8.rb.in	2008-08-26 09:00:33 UTC (rev 284)
@@ -20,6 +20,16 @@
 
 require 'oci8lib'
 
+class OCI8
+  ORAVER_8_0  = 0x08000000 #  8.0
+  ORAVER_8_1  = 0x08100000 #  8.1
+  ORAVER_9_1  = 0x09100000 #  9.1
+  ORAVER_9_2  = 0x09200000 #  9.2
+  ORAVER_10_1 = 0x0a100000 # 10.1
+  ORAVER_10_2 = 0x0a200000 # 10.2
+  ORAVER_11_1 = 0x0b100000 # 11.1
+end
+
 require 'oci8/datetime.rb'
 require 'oci8/oci8.rb'
 require 'oci8/metadata.rb'




More information about the ruby-oci8-commit mailing list