|
|
@ -96,18 +96,17 @@ class Schema extends \yii\db\Schema |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
public function quoteValue($str) |
|
|
|
public function quoteValue($str) |
|
|
|
{ |
|
|
|
{ |
|
|
|
throw new NotSupportedException('quoteValue is currently broken in cubrid PDO'); |
|
|
|
if (!is_string($str)) { |
|
|
|
// TODO implement workaround |
|
|
|
|
|
|
|
/* if (!is_string($str)) { |
|
|
|
|
|
|
|
return $str; |
|
|
|
return $str; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
$this->db->open(); |
|
|
|
$this->db->open(); |
|
|
|
if (($value = $this->db->pdo->quote($str)) !== false) { |
|
|
|
// workaround for broken PDO::quote() implementation in CUBRID 9.1.0 http://jira.cubrid.org/browse/APIS-658 |
|
|
|
return $value; |
|
|
|
if (version_compare($this->db->pdo->getAttribute(\PDO::ATTR_CLIENT_VERSION), '9.1.0', '<=')) { |
|
|
|
} else { // the driver doesn't support quote (e.g. oci) |
|
|
|
|
|
|
|
return "'" . addcslashes(str_replace("'", "''", $str), "\000\n\r\\\032") . "'"; |
|
|
|
return "'" . addcslashes(str_replace("'", "''", $str), "\000\n\r\\\032") . "'"; |
|
|
|
}*/ |
|
|
|
} else { |
|
|
|
|
|
|
|
return $this->db->pdo->quote($str); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|