Ido\CustomvarQuery: add is_json

This has to be done in a backward compatible way, we check for IDO
>= 1.12.0.

refs #7569
This commit is contained in:
Thomas Gelf 2014-11-06 16:14:03 +01:00
parent 2782b0a744
commit 816c309193
1 changed files with 5 additions and 0 deletions

View File

@ -10,6 +10,7 @@ class CustomvarQuery extends IdoQuery
'customvars' => array(
'varname' => 'cvs.varname',
'varvalue' => 'cvs.varvalue',
'is_json' => 'cvs.is_json',
),
'objects' => array(
'host' => 'cvo.name1 COLLATE latin1_general_ci',
@ -37,6 +38,10 @@ class CustomvarQuery extends IdoQuery
protected function joinBaseTables()
{
if (version_compare($this->getIdoVersion(), '1.12.0', '<')) {
$this->columnMap['customvars']['is_json'] = '(0)';
}
$this->select->from(
array('cvs' => $this->prefix . 'customvariablestatus'),
array()