예제 #1
0
 protected function getDefaultModifiers()
 {
     $modifiers = [];
     switch ($this->platform->getName()) {
         case 'postgresql':
             $types = ['TIMESTAMP' => true];
             break;
         case 'mysql':
             $types = ['DATETIME' => true];
             break;
         default:
             throw new NotSupportedException();
     }
     foreach ($this->platform->getColumns($this->storageName) as $column) {
         if (isset($types[$column['type']])) {
             $modifiers[$column['name']] = $column['is_nullable'] ? '%?dts' : '%dts';
         }
     }
     return $modifiers;
 }
예제 #2
0
 public function getPrimarySequenceName($table)
 {
     return $this->cache->load('sequence.' . $table, function () use($table) {
         return $this->platform->getPrimarySequenceName($table);
     });
 }