Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 0.8.6

Request #10475 Handle 'scale' value in DECIMAL field definition
Submitted: 2007-03-23 20:45 UTC
From: quipo Assigned: ifeghali
Status: Closed Package: MDB2_Schema (version CVS)
PHP Version: Irrelevant OS:
Roadmaps: (Not assigned)    
Subscription  


Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know! Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem : 26 - 22 = ?

 
 [2007-03-23 20:45 UTC] quipo (Lorenzo Alberton)
Description: ------------ ATM, the XML schema doesn't support a <scale> tag within a field definition for DECIMAL data types, so the only way to set the scale is the MDB2 'decimal_places' option, but that's a per-connection setting, and not a per-field one as it should be. It would be handy to embed the scale information within the <length> tag as: <field> <name>decimalfield</name> <type>decimal</type> <length>10,4</length> <notnull>false</notnull> </field> which should be translated to DECIMAL(10,4). A patch is attached.

Comments

 [2007-03-23 22:23 UTC] ifeghali (Igor Feghali)
Hi Lorenzo, thank you for the patch. Tough, to get the bug 100% fixed we need to correctly reverse engineer fields with decimal types. To achieve this the method mapNativeDatatype() of DataType Drivers should return $decimal as well, so MDB2_Schema can have access to that attribute. Filling a new bug report.
 [2007-03-28 17:36 UTC] ifeghali (Igor Feghali)
This bug has been fixed in CVS. If this was a documentation problem, the fix will appear on pear.php.net by the end of next Sunday (CET). If this was a problem with the pear.php.net website, the change should be live shortly. Otherwise, the fix will appear in the package's next release. Thank you for the report and for helping us make PEAR better.