Author: byterock
Date: Fri Nov  7 06:44:57 2008
New Revision: 12057

Modified:
   dbd-oracle/trunk/Changes
   dbd-oracle/trunk/Oracle.pm
   dbd-oracle/trunk/Oracle.xs

Log:
 Added private statement functions ora_stmt_type_name and ora_stmt_type from 
John Scoles
 

Modified: dbd-oracle/trunk/Changes
==============================================================================
--- dbd-oracle/trunk/Changes    (original)
+++ dbd-oracle/trunk/Changes    Fri Nov  7 06:44:57 2008
@@ -1,4 +1,5 @@
 =head1 Changes in DBD-Oracle 1.23(svn rev #####)
+  Added private statement functions ora_stmt_type_name and ora_stmt_type from 
John Scoles
   Update to POD from Chris Underhill
   Added README.win64.txt with content from Alex Buttery
   Fix for rt.cpan.org Ticket #=21920 Bug with Oracle DBD for Mac OS X Instant 
Client From boingolover

Modified: dbd-oracle/trunk/Oracle.pm
==============================================================================
--- dbd-oracle/trunk/Oracle.pm  (original)
+++ dbd-oracle/trunk/Oracle.pm  Fri Nov  7 06:44:57 2008
@@ -78,8 +78,10 @@
        DBD::Oracle::st->install_method("ora_fetch_scroll");
        DBD::Oracle::st->install_method("ora_scroll_position");
        DBD::Oracle::st->install_method("ora_ping");
+       DBD::Oracle::st->install_method("ora_stmt_type_name");
+       DBD::Oracle::st->install_method("ora_stmt_type");
        
-       $drh;
+       $drh;
     }
 
 
@@ -2514,8 +2516,9 @@
 
 =head1 Private database handle functions
 
-These functions are called through the method func()
-which is described in the DBI documentation.
+Some of these functions are called through the method func()
+which is described in the DBI documentation. Any function that begins with ora_
+can be called directly.
 
 =head2 plsql_errstr
 
@@ -2586,7 +2589,6 @@
   # retrieve the string
   $date_string = $dbh->func( 'dbms_output_get' );
 
-
 =over 4
 
 =item dbms_output_enable ( [ buffer_size ] )
@@ -2652,6 +2654,16 @@
 
 3 = Both character sets are Unicode encodings.
 
+=head1 Private statment handle functions
+
+=item ora_stmt_type
+
+Returns the OCI Statement Type number for the SQL of a statement handle.
+
+=item ora_stmt_type_name
+
+Returns the OCI Statement Type name for the SQL of a statement handle.
+
 =back
 
 =head1 Prepare postponed till execute

Modified: dbd-oracle/trunk/Oracle.xs
==============================================================================
--- dbd-oracle/trunk/Oracle.xs  (original)
+++ dbd-oracle/trunk/Oracle.xs  Fri Nov  7 06:44:57 2008
@@ -96,6 +96,26 @@
 
 MODULE = DBD::Oracle    PACKAGE = DBD::Oracle::st
 
+void ora_stmt_type(sth)
+ SV *  sth
+    PREINIT:
+    D_imp_sth(sth);
+   CODE:
+    {
+       XSRETURN_IV( imp_sth->stmt_type);
+}
+
+void
+ora_stmt_type_name(sth)
+    SV *       sth
+    PREINIT:
+    D_imp_sth(sth);
+       CODE:
+       char *p = oci_stmt_type_name(imp_sth->stmt_type);
+       SV *sv = sv_newmortal();
+       if (p)
+         sv_setpv(sv, p);
+    ST(0) = sv;
 
 void
 ora_scroll_position(sth)

Reply via email to