Overview

Namespaces

  • Alchemy
    • core
      • query
      • schema
    • dialect
    • engine
    • orm
    • tests
    • util
      • promise
  • PHP

Classes

  • ANSICompiler
  • Compiler
  • MySQLCompiler
  • SQLiteCompiler
  • Overview
  • Namespace
  • Class
  • Tree
 1: <?php
 2: 
 3: namespace Alchemy\dialect;
 4: 
 5: class MySQLCompiler extends ANSICompiler {
 6:     protected static $schema_formats = array(
 7:         'Timestamp'  => "TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP");
 8: 
 9:     public function Create_Integer($obj) {
10:         $format = static::get_schema_format($obj->getType());
11:         $sql = $this->format($format,
12:             array($obj->getArg(0), $obj->getArg(1)));
13: 
14:         $sql .= $obj->getArg('auto_increment') ? " AUTO_INCREMENT" : "";
15: 
16:         return $sql;
17:     }
18:  }
19: 
API documentation generated by ApiGen 2.8.0