示例#1
0
 public function testGetColumnTypeMSSql()
 {
     $_helper = new MssqlHelper();
     $this->assertEquals("decimal(26,6)", $_helper->getColumnType("currency"));
     $this->assertEquals("Unknown", $_helper->getColumnType("Unknown"));
     unset($_helper);
 }
 /**
  * @see DBHelper::getColumnType()
  */
 public function getColumnType($type, $name = '', $table = '')
 {
     $columnType = parent::getColumnType($type, $name, $table);
     if (in_array($columnType, array('char', 'varchar'))) {
         $columnType = 'n' . $columnType;
     }
     return $columnType;
 }
示例#3
0
 /**
  * @see DBHelper::getColumnType()
  */
 public function getColumnType($type, $name = '', $table = '')
 {
     $columnType = parent::getColumnType($type, $name, $table);
     if (in_array($columnType, array('char', 'varchar')) && !preg_match('/(_id$|^id$)/', $name)) {
         $columnType = 'n' . $columnType;
     }
     if (in_array($columnType, array('text', 'ntext', 'image'))) {
         $columnType = 'nvarchar(max)';
     }
     return $columnType;
 }
示例#4
0
 /**
  * @see DBHelper::getColumnType()
  */
 public function getColumnType($type, $name = '', $table = '')
 {
     $columnType = parent::getColumnType($type, $name, $table);
     if (in_array($columnType, array('char', 'varchar'))) {
         $columnType = 'n' . $columnType;
     }
     // Use varbinary field for storage of text and blob field types
     //if ( in_array($columnType,array('ntext','text','image')) )
     //    $columnType = 'varbinary(max)';
     return $columnType;
 }
示例#5
0
 /**
  * @see DBHelper::getColumnType()
  */
 public function getColumnType($type, $name = '', $table = '')
 {
     $columnType = parent::getColumnType($type, $name, $table);
     // Bug 30184 - Comment out this code for the time being until we have better UTF-8 support in the driver
     //if ( in_array($columnType,array('char','varchar')) )
     //	$columnType = 'n'.$columnType;
     // Bug 30876 - Comment out this code for the time being until we have better UTF-8 support in the driver
     // Use varbinary field for storage of text and blob field types
     //if ( in_array($columnType,array('ntext','text','image')) )
     //    $columnType = 'varbinary';
     return $columnType;
 }