Hello!

On Fri, 7 Sep 2007, Alexander V Alekseev wrote:

        The final release of Oracle SYS.DBMS_SQL.VARCHAR2_TABLE &
SYS.DBMS_SQL.NUMBER_TABLE support in DBD::Oracle is attached.

        Documentation, usage examples are included.

        Examples assume that a patch to DBI is applied.
A patch is also included. If you choose not to modify DBI,
        Forgot to attach DBI patch, though I already sent it to the
list. Patch is attached just to keep everything needed in a single list
thread.

        Bye. Alex.
Index: Driver.xst
===================================================================
--- Driver.xst  (revision 9919)
+++ Driver.xst  (working copy)
@@ -526,13 +526,32 @@
     IV sql_type = 0;
     D_imp_sth(sth);
     SV *value;
-    if (!SvROK(value_ref) || SvTYPE(SvRV(value_ref)) > SVt_PVMG)
+    if (!SvROK(value_ref) ||
+       (
+               (SvTYPE(SvRV(value_ref)) >  SVt_PVMG)
+#ifdef BIND_PARAM_INOUT_ALLOW_ARRAY
+               && (SvTYPE(SvRV(value_ref)) != SVt_PVAV)
+#endif
+       )
+    ){
+#ifdef BIND_PARAM_INOUT_ALLOW_ARRAY
+       croak("bind_param_inout needs a reference to a scalar or array value");
+#else
        croak("bind_param_inout needs a reference to a scalar value");
+#endif
+    }
     value = SvRV(value_ref);
     if (SvREADONLY(value))
        croak("Modification of a read-only value attempted");
-    if (SvGMAGICAL(value))
-       mg_get(value);
+#ifdef BIND_PARAM_INOUT_ALLOW_ARRAY
+    if(SvTYPE(SvRV(value_ref))==SVt_PVAV){
+       value=value_ref;
+    }else
+#endif
+    {
+       if (SvGMAGICAL(value))
+           mg_get(value);
+    }
     if (attribs) {
        if (SvNIOK(attribs)) {
            sql_type = SvIV(attribs);

Reply via email to