Browse Source

changed cubrid table and column name quoting

` is a MySQL thing supported by cubrid. " is more common.
tags/2.0.0-beta
Carsten Brandt 11 years ago
parent
commit
3e5491e089
  1. 6
      framework/yii/db/cubrid/Schema.php

6
framework/yii/db/cubrid/Schema.php

@ -57,7 +57,7 @@ class Schema extends \yii\db\Schema
// Bit string data types
'bit' => self::TYPE_STRING,
'bit varying' => self::TYPE_STRING,
// Collection data types (considered strings for now, may add support for them later)
// Collection data types (considered strings for now)
'set' => self::TYPE_STRING,
'multiset' => self::TYPE_STRING,
'list' => self::TYPE_STRING,
@ -73,7 +73,7 @@ class Schema extends \yii\db\Schema
*/
public function quoteSimpleTableName($name)
{
return strpos($name, "`") !== false ? $name : "`" . $name . "`";
return strpos($name, '"') !== false ? $name : '"' . $name . '"';
}
/**
@ -84,7 +84,7 @@ class Schema extends \yii\db\Schema
*/
public function quoteSimpleColumnName($name)
{
return strpos($name, '`') !== false || $name === '*' ? $name : '`' . $name . '`';
return strpos($name, '"') !== false || $name === '*' ? $name : '"' . $name . '"';
}
/**

Loading…
Cancel
Save