|
@@ -175,6 +175,7 @@ abstract class AttributeDefinition
|
|
public function FromSQLToValue($aCols, $sPrefix = '') {return null;} // returns a value out of suffix/value pairs, for SELECT result interpretation
|
|
public function FromSQLToValue($aCols, $sPrefix = '') {return null;} // returns a value out of suffix/value pairs, for SELECT result interpretation
|
|
public function GetSQLColumns() {return array();} // returns column/spec pairs (1 in most of the cases), for STRUCTURING (DB creation)
|
|
public function GetSQLColumns() {return array();} // returns column/spec pairs (1 in most of the cases), for STRUCTURING (DB creation)
|
|
public function GetSQLValues($value) {return array();} // returns column/value pairs (1 in most of the cases), for WRITING (Insert, Update)
|
|
public function GetSQLValues($value) {return array();} // returns column/value pairs (1 in most of the cases), for WRITING (Insert, Update)
|
|
|
|
+ public function RequiresIndex() {return false;}
|
|
|
|
|
|
public function GetJSCheckFunc()
|
|
public function GetJSCheckFunc()
|
|
{
|
|
{
|
|
@@ -676,6 +677,11 @@ class AttributeClass extends AttributeString
|
|
{
|
|
{
|
|
return MetaModel::GetName($sValue);
|
|
return MetaModel::GetName($sValue);
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ public function RequiresIndex()
|
|
|
|
+ {
|
|
|
|
+ return true;
|
|
|
|
+ }
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -704,6 +710,11 @@ class AttributeFinalClass extends AttributeString
|
|
return false;
|
|
return false;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ public function RequiresIndex()
|
|
|
|
+ {
|
|
|
|
+ return true;
|
|
|
|
+ }
|
|
|
|
+
|
|
public function SetFixedValue($sValue)
|
|
public function SetFixedValue($sValue)
|
|
{
|
|
{
|
|
$this->m_sValue = $sValue;
|
|
$this->m_sValue = $sValue;
|
|
@@ -869,8 +880,8 @@ class AttributeEnum extends AttributeString
|
|
}
|
|
}
|
|
if (count($aValues) > 0)
|
|
if (count($aValues) > 0)
|
|
{
|
|
{
|
|
- // The syntax used here is matters
|
|
|
|
- // In particular, I had to remove unnecessary spaces to stick to
|
|
|
|
|
|
+ // The syntax used here do matters
|
|
|
|
+ // In particular, I had to remove unnecessary spaces to
|
|
// make sure that this string will match the field type returned by the DB
|
|
// make sure that this string will match the field type returned by the DB
|
|
// (used to perform a comparison between the current DB format and the data model)
|
|
// (used to perform a comparison between the current DB format and the data model)
|
|
return "ENUM(".implode(",", $aValues).")";
|
|
return "ENUM(".implode(",", $aValues).")";
|
|
@@ -881,6 +892,11 @@ class AttributeEnum extends AttributeString
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ public function RequiresIndex()
|
|
|
|
+ {
|
|
|
|
+ return true;
|
|
|
|
+ }
|
|
|
|
+
|
|
public function GetBasicFilterOperators()
|
|
public function GetBasicFilterOperators()
|
|
{
|
|
{
|
|
return parent::GetBasicFilterOperators();
|
|
return parent::GetBasicFilterOperators();
|
|
@@ -1109,6 +1125,10 @@ class AttributeExternalKey extends AttributeDBFieldVoid
|
|
public function GetTypeDesc() {return "Link to another object";}
|
|
public function GetTypeDesc() {return "Link to another object";}
|
|
public function GetEditClass() {return "ExtKey";}
|
|
public function GetEditClass() {return "ExtKey";}
|
|
protected function GetSQLCol() {return "INT(11)";}
|
|
protected function GetSQLCol() {return "INT(11)";}
|
|
|
|
+ public function RequiresIndex()
|
|
|
|
+ {
|
|
|
|
+ return true;
|
|
|
|
+ }
|
|
|
|
|
|
public function IsExternalKey($iType = EXTKEY_RELATIVE) {return true;}
|
|
public function IsExternalKey($iType = EXTKEY_RELATIVE) {return true;}
|
|
public function GetTargetClass($iType = EXTKEY_RELATIVE) {return $this->Get("targetclass");}
|
|
public function GetTargetClass($iType = EXTKEY_RELATIVE) {return $this->Get("targetclass");}
|