mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-26 16:48:49 +01:00
fixed typo CAPABILITY_CAST_AS_VA(R)CHAR
This commit is contained in:
parent
c492c57e2f
commit
778d03772a
@ -1096,7 +1096,7 @@ class so_sql
|
||||
$numeric_columns[] = $col;
|
||||
continue;
|
||||
}
|
||||
$columns[] = sprintf($this->db->capabilities[egw_db::CAPABILITY_CAST_AS_VACHAR],"COALESCE($col,'')");
|
||||
$columns[] = sprintf($this->db->capabilities[egw_db::CAPABILITY_CAST_AS_VARCHAR],"COALESCE($col,'')");
|
||||
}
|
||||
if($columns)
|
||||
{
|
||||
|
@ -227,9 +227,9 @@ class egw_db
|
||||
*
|
||||
* MySQL requires to use CAST(%s AS char)!
|
||||
*
|
||||
* Use as: $sql = sprintf($GLOBALS['egw']->db->capabilities[egw_db::CAPABILITY_CAST_AS_VACHAR],$expression);
|
||||
* Use as: $sql = sprintf($GLOBALS['egw']->db->capabilities[egw_db::CAPABILITY_CAST_AS_VARCHAR],$expression);
|
||||
*/
|
||||
const CAPABILITY_CAST_AS_VACHAR = 'cast_as_varchar';
|
||||
const CAPABILITY_CAST_AS_VARCHAR = 'cast_as_varchar';
|
||||
/**
|
||||
* default capabilities will be changed by method set_capabilities($ado_driver,$db_version)
|
||||
*
|
||||
@ -248,7 +248,7 @@ class egw_db
|
||||
self::CAPABILITY_CLIENT_ENCODING => false,
|
||||
self::CAPABILITY_CASE_INSENSITIV_LIKE => 'LIKE',
|
||||
self::CAPABILITY_REQUIRE_TRUNCATE_VARCHAR => false,
|
||||
self::CAPABILITY_CAST_AS_VACHAR => 'CAST(%s AS varchar)',
|
||||
self::CAPABILITY_CAST_AS_VARCHAR => 'CAST(%s AS varchar)',
|
||||
);
|
||||
|
||||
var $prepared_sql = array(); // sql is the index
|
||||
@ -357,6 +357,7 @@ class egw_db
|
||||
switch($this->Type) // convert to ADO db-type-names
|
||||
{
|
||||
case 'pgsql':
|
||||
$this->query_log = '/tmp/pgsql-query.log';
|
||||
$type = 'postgres'; // name in ADOdb
|
||||
// create our own pgsql connection-string, to allow unix domain soccets if !$Host
|
||||
$Host = "dbname=$this->Database".($this->Host ? " host=$this->Host".($this->Port ? " port=$this->Port" : '') : '').
|
||||
@ -507,7 +508,7 @@ class egw_db
|
||||
$this->capabilities[self::CAPABILITY_UNION] = (float) $db_version >= 4.0;
|
||||
$this->capabilities[self::CAPABILITY_NAME_CASE] = 'preserv';
|
||||
$this->capabilities[self::CAPABILITY_CLIENT_ENCODING] = (float) $db_version >= 4.1;
|
||||
$this->capabilities[self::CAPABILITY_CAST_AS_VACHAR] = 'CAST(%s AS char)';
|
||||
$this->capabilities[self::CAPABILITY_CAST_AS_VARCHAR] = 'CAST(%s AS char)';
|
||||
break;
|
||||
|
||||
case 'postgres':
|
||||
|
Loading…
Reference in New Issue
Block a user