Minor modifications to oci8po generator (max 38 for number)

This commit is contained in:
stronk7
2006-08-31 00:19:57 +00:00
parent 790647b950
commit 4782a1f8bc
@@ -77,6 +77,10 @@ class XMLDBoci8po extends XMLDBgenerator {
break;
case XMLDB_TYPE_NUMBER:
$dbtype = $this->number_type;
/// 38 is the max allowed
if ($xmldb_length > 38) {
$xmldb_length = 38;
}
if (!empty($xmldb_length)) {
$dbtype .= '(' . $xmldb_length;
if (!empty($xmldb_decimals)) {
@@ -138,7 +142,7 @@ class XMLDBoci8po extends XMLDBgenerator {
$trigger.= "\nON " . $this->getEncQuoted($this->prefix . $xmldb_table->getName());
$trigger.= "\n FOR EACH ROW";
$trigger.= "\nBEGIN";
$trigger.= "\n IF :old." . $this->getEncQuoted($xmldb_field->getName()) . ' IS NOT NULL THEN';
$trigger.= "\n IF :new." . $this->getEncQuoted($xmldb_field->getName()) . ' IS NULL THEN';
$trigger.= "\n SELECT " . $sequence_name . '.nextval INTO :new.' . $this->getEncQuoted($xmldb_field->getName()) . " FROM dual;";
$trigger.= "\n END IF;";
$trigger.= "\nEND;";