rhymix/classes/db/queryparts/table/CubridTableWithHint.class.php
2011-10-03 17:35:25 +00:00

25 lines
No EOL
777 B
PHP

<?php
class CubridTableWithHint extends Table {
var $name;
var $alias;
var $index_hints_list;
function CubridTableWithHint($name, $alias = NULL, $index_hints_list){
parent::Table($name, $alias);
$this->index_hints_list = $index_hints_list;
}
function getIndexHintString(){
$result = '';
foreach($this->index_hints_list as $index_hint){
$result .= $this->alias . '.' . $index_hint->getIndexName()
. ($index_hint->getIndexHintType() == 'FORCE' ? '(+)' : '') . ', ';
}
$result = substr($result, 0, -2);
return $result;
}
}
?>