[svn:dbd-oracle] r13458 - dbd-oracle/trunk

[email protected]
Newsgroups perl.dbd.oracle.changes
Message-ID <[email protected]>
Author: byterock
Date: Thu Oct 29 17:51:03 2009
New Revision: 13458

Modified:
   dbd-oracle/trunk/Changes
   dbd-oracle/trunk/Oracle.h
   dbd-oracle/trunk/Oracle.pm
   dbd-oracle/trunk/oci8.c

Log:
  Fix for rt.cpan.org Ticket #=49741 Oracle.h has commented out params in OCIXMLTypeCreateFromSrc from Kartik Thakore 
  Added from rt.cpan.org Ticket #=49436 Patch to add support for a few Oracle data types to type_info_all from David Hull 
  Added from rt.cpan.org Ticket #=49435 Patch to add support for a few Oracle data types to dbd_describe from David Hull 

Modified: dbd-oracle/trunk/Changes
==============================================================================
--- dbd-oracle/trunk/Changes	(original)
+++ dbd-oracle/trunk/Changes	Thu Oct 29 17:51:03 2009
@@ -1,4 +1,7 @@
 =head1 Changes in DBD-Oracle 1.24(svn rev???)
+  Fix for rt.cpan.org Ticket #=49741 Oracle.h has commented out params in OCIXMLTypeCreateFromSrc from Kartik Thakore 
+  Added from rt.cpan.org Ticket #=49436 Patch to add support for a few Oracle data types to type_info_all from David Hull 
+  Added from rt.cpan.org Ticket #=49435 Patch to add support for a few Oracle data types to dbd_describe from David Hull 
   Fix for rt.cpan.org Ticket #=49331 Bad code example in POD from John Scoles
   Added support for looking up OCI_DTYPE_PARAM Attributes
   Added support for looking up csform values 

Modified: dbd-oracle/trunk/Oracle.h
==============================================================================
--- dbd-oracle/trunk/Oracle.h	(original)
+++ dbd-oracle/trunk/Oracle.h	Thu Oct 29 17:51:03 2009
@@ -126,9 +126,9 @@
 
 */
 
-sword  OCIXMLTypeCreateFromSrc(/*_ OCISvcCtx *svchp, OCIError *errhp,
+sword  OCIXMLTypeCreateFromSrc( OCISvcCtx *svchp, OCIError *errhp,
                      OCIDuration dur, ub1 src_type, dvoid *src_ptr,
-                     sb4 ind, OCIXMLType **retInstance _*/);
+                     sb4 ind, OCIXMLType **retInstance );
 
 
 /* end of Oracle.h */

Modified: dbd-oracle/trunk/Oracle.pm
==============================================================================
--- dbd-oracle/trunk/Oracle.pm	(original)
+++ dbd-oracle/trunk/Oracle.pm	Thu Oct 29 17:51:03 2009
@@ -728,7 +728,70 @@
 	    [ "CLOB",            SQL_LONGVARCHAR,   2147483647,"'",  "'",
 		undef,            1,1,0,undef,0,undef,
 		"CLOB",            undef,undef,SQL_LONGVARCHAR,  undef,undef,undef, ],
+		
 	    if $version >= 8;
+		push @$type_info_all,
+		["TIMESTAMP WITH TIME ZONE",	# type name
+			SQL_TYPE_TIMESTAMP_WITH_TIMEZONE,	# data type
+			40,		# column size
+			"TIMESTAMP'",	# literal prefix
+			"'",		# literal suffix
+			"precision",	# create params	
+			1,		# nullable
+			0,		# case sensitive
+			3,		# searchable
+			undef,		# unsigned attribute
+			0,		# fixed prec scale
+			0,		# auto unique value
+			undef,		# local type name
+			0,		# minimum scale	
+			6,		# maximum scale
+			SQL_TIMESTAMP,	# sql data type	
+			5,		# sql datetime sub
+			undef,		# num prec radix
+			undef,		# interval precision
+		],
+		[ "INTERVAL DAY TO SECOND",	# type name	
+			SQL_INTERVAL_DAY_TO_SECOND,	# data type
+			22,				# column size	'+00 11:12:10.222222200'
+			"INTERVAL'",	# literal prefix
+			"'",		# literal suffix
+			"precision",	# create params
+			1,		# nullable
+			0,		# case sensitive
+			3,		# searchable
+			undef,		# unsigned attribute
+			0,		# fixed prec scale
+			0,		# auto unique value
+			undef,		# local type name
+			0,		# minimum scale	
+			9,		# maximum scale	
+			SQL_INTERVAL,	# sql data type	
+			10,		# sql datetime sub
+			undef,		# num prec radix
+			undef,		# interval precision
+		],
+		[ "INTERVAL YEAR TO MONTH",	# type name	
+			SQL_INTERVAL_YEAR_TO_MONTH,	# data type
+			13,		# column size 	'+012345678-01'
+			"INTERVAL'",	# literal prefix
+			"'",		# literal suffix
+			"precision",	# create params
+			1,		# nullable
+			0,		# case sensitive
+			3,		# searchable
+			undef,		# unsigned attribute
+			0,		# fixed prec scale
+			0,		# auto unique value
+			undef,		# local type name
+			0,		# minimum scale	
+			9,		# maximum scale	
+			SQL_INTERVAL,	# sql data type	
+			7,		# sql datetime sub
+			undef,		# num prec radix
+			undef,		# interval precision
+		],
+		if $version >= 10;
 	return $type_info_all;
     }
 

Modified: dbd-oracle/trunk/oci8.c
==============================================================================
--- dbd-oracle/trunk/oci8.c	(original)
+++ dbd-oracle/trunk/oci8.c	Thu Oct 29 17:51:03 2009
@@ -384,17 +384,17 @@
 	case OCI_ATTR_PRECISION:			return "OCI_ATTR_PRECISION"; /* precision if number type */
 	case OCI_ATTR_SCALE:				return "OCI_ATTR_SCALE"; /* scale if number type */
 	case OCI_ATTR_IS_NULL:				return "OCI_ATTR_IS_NULL"; /* is it null ? */
-	case OCI_ATTR_TYPE_NAME: 			return "OCI_ATTR_TYPE_NAME"; 
+	case OCI_ATTR_TYPE_NAME: 			return "OCI_ATTR_TYPE_NAME";
   /* name of the named data type or a package name for package private types */
 	case OCI_ATTR_SCHEMA_NAME: 			return "OCI_ATTR_SCHEMA_NAME";  /* the schema name */
 	case OCI_ATTR_SUB_NAME: 			return "OCI_ATTR_SUB_NAME";  /* type name if package private type */
-	case OCI_ATTR_POSITION:				return "OCI_ATTR_POSITION"; 
+	case OCI_ATTR_POSITION:				return "OCI_ATTR_POSITION";
 	case OCI_ATTR_CHAR_USED:            return "OCI_ATTR_CHAR_USED";      /* char length semantics */
 	case OCI_ATTR_CHAR_SIZE:             return "OCI_ATTR_CHAR_SIZE";                /* char length */
 	case OCI_ATTR_CHARSET_ID:			return "OCI_ATTR_CHARSET_ID";                           /* Character Set ID */
 	case OCI_ATTR_CHARSET_FORM:			return "OCI_ATTR_CHARSET_FORM";                       /* Character Set Form */
 	}
-	
+
 	sv = sv_2mortal(newSViv((IV)attr));
 	return SvPV(sv,na);
 
@@ -410,7 +410,7 @@
 	switch (attr) {
 	/*=============================Attribute Types===============================*/
 
-	
+
 	case OCI_ATTR_FNCODE:				return "OCI_ATTR_FNCODE";                       /* the OCI function code */
 	case OCI_ATTR_OBJECT:				return "OCI_ATTR_OBJECT"; /* is the environment initialized in object mode */
 	case OCI_ATTR_NONBLOCKING_MODE:		return "OCI_ATTR_NONBLOCKING_MODE";                   /* non blocking mode */
@@ -3405,9 +3405,12 @@
 
 			case	182:				  /* INTERVAL YEAR TO MONTH */
 			case	183:				  /* INTERVAL DAY TO SECOND */
-			case	190:				  /* INTERVAL DAY TO SECOND */
+			case	185:				  /* TIME (ocidfn.h) */
+			case	186:				  /* TIME WITH TIME ZONE (ocidfn.h) */
 			case	187:				  /* TIMESTAMP */
 			case	188: 				/* TIMESTAMP WITH TIME ZONE	*/
+			case	189:				  /* INTERVAL YEAR TO MONTH (ocidfn.h) */
+ 			case	190:				  /* INTERVAL DAY TO SECOND */
 			case	232:				  /* TIMESTAMP WITH LOCAL TIME ZONE */
 				/* actually dependent on NLS default date format*/
 					fbh->disize = 75;		/* XXX */
@@ -3468,7 +3471,7 @@
 		/* add space for STRING null term, or VAR len prefix */
 		sb4 define_len = (ftype==94||ftype==95) ? fbh->disize+4 : fbh->disize;
 		fb_ary_t  *fb_ary;
-		
+
 		if (fbh->clbk_lob || fbh->piece_lob  ){/*init the cb_abuf with this call*/
 			fbh->fb_ary = fb_ary_cb_alloc(imp_sth->piece_size,define_len, imp_sth->rs_array_size);
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.