]> git.mjollnir.org Git - moodle.git/commitdiff
Thought this was commited. Solve one bug in trigger generation
authorstronk7 <stronk7>
Sat, 19 Aug 2006 00:58:30 +0000 (00:58 +0000)
committerstronk7 <stronk7>
Sat, 19 Aug 2006 00:58:30 +0000 (00:58 +0000)
lib/xmldb/classes/generators/oci8po/oci8po.class.php

index 6fa01959191a85abc17a8c5353ba91be06dccb98..e0951a9c47050afe57477a09b5817376a2f9bdbb 100644 (file)
@@ -120,8 +120,9 @@ class XMLDBoci8po extends XMLDBgenerator {
      */
     function getCreateSequenceSQL ($xmldb_table, $xmldb_field) {
 
-        $sequence = "CREATE SEQUENCE ";
-        $sequence.= $this->getNameForObject($xmldb_table->getName(), $xmldb_field->getName(), 'seq');
+        $sequence_name = $this->getNameForObject($xmldb_table->getName(), $xmldb_field->getName(), 'seq');
+        
+        $sequence = "CREATE SEQUENCE " . $sequence_name;
         $sequence.= "\n    START WITH 1";
         $sequence.= "\n    INCREMENT BY 1";
         $sequence.= "\n    NOMAXVALUE";
@@ -133,7 +134,7 @@ class XMLDBoci8po extends XMLDBgenerator {
         $trigger.= "\nON " . $this->getEncQuoted($this->prefix . $xmldb_table->getName());
         $trigger.= "\n    FOR EACH ROW";
         $trigger.= "\nBEGIN";
-        $trigger.= "\n    SELECT " . $trigger_name . '.nextval INTO :new.' . $this->getEncQuoted($xmldb_field->getName()) . " FROM dual;";
+        $trigger.= "\n    SELECT " . $sequence_name . '.nextval INTO :new.' . $this->getEncQuoted($xmldb_field->getName()) . " FROM dual;";
         $trigger.= "\nEND";
         return array($sequence, $trigger);
     }