Example #1
0
 public function typeToString(DataType $type)
 {
     if ($type->getId() == DataType::IP) {
         return 'varchar(19)';
     }
     if ($type->getId() == DataType::IP_RANGE) {
         return 'varchar(41)';
     }
     return $type->getName();
 }
 public function typeToString(DataType $type)
 {
     if ($type->getId() == DataType::BINARY) {
         return 'BYTEA';
     }
     if (defined('POSTGRES_IP4_ENABLED')) {
         if ($type->getId() == DataType::IP) {
             return 'ip4';
         }
         if ($type->getId() == DataType::IP_RANGE) {
             return 'ip4r';
         }
     }
     return parent::typeToString($type);
 }
 public function typeToString(DataType $type)
 {
     if ($type->getId() == DataType::BINARY) {
         return 'BLOB';
     }
     return parent::typeToString($type);
 }
 public function typeToString(DataType $type)
 {
     switch ($type->getId()) {
         case DataType::BIGINT:
             return 'INTEGER';
         case DataType::BINARY:
             return 'BLOB';
     }
     return parent::typeToString($type);
 }