diff --git a/classes/db/DB.class.php b/classes/db/DB.class.php index 09ca3e2eb..f312ff97e 100644 --- a/classes/db/DB.class.php +++ b/classes/db/DB.class.php @@ -26,21 +26,6 @@ class DB 'mysql' => 1, ); - /** - * operations for condition - * @var array - */ - protected static $cond_operation = array( - 'equal' => '=', - 'more' => '>=', - 'excess' => '>', - 'less' => '<=', - 'below' => '<', - 'notequal' => '<>', - 'notnull' => 'is not null', - 'null' => 'is null', - ); - /** * master database connection string * @var array @@ -705,6 +690,7 @@ class DB $tableObjects = $query->getTables(); $index_hint_list = ''; + /* foreach($tableObjects as $tableObject) { if(is_a($tableObject, 'CubridTableWithHint')) @@ -717,6 +703,7 @@ class DB { $index_hint_list = 'USING INDEX ' . $index_hint_list; } + */ $groupBy = $query->getGroupByString(); if($groupBy != '') diff --git a/classes/db/queryparts/table/CubridTableWithHint.class.php b/classes/db/queryparts/table/CubridTableWithHint.class.php deleted file mode 100644 index 9f614a816..000000000 --- a/classes/db/queryparts/table/CubridTableWithHint.class.php +++ /dev/null @@ -1,71 +0,0 @@ - */ - -/** - * @author NAVER (developers@xpressengine.com) - * @package /classes/db/queryparts/table - * @version 0.1 - */ -class CubridTableWithHint extends Table -{ - - /** - * table name - * @var string - */ - var $name; - - /** - * table alias - * @var string - */ - var $alias; - - /** - * index hint list - * @var array - */ - var $index_hints_list; - - /** - * constructor - * @param string $name - * @param string $alias - * @param array $index_hints_list - * @return void - */ - function __construct($name, $alias = NULL, $index_hints_list) - { - parent::__construct($name, $alias); - $this->index_hints_list = $index_hints_list; - } - - /** - * Return index hint string - * @return string - */ - function getIndexHintString() - { - $result = ''; - - // Retrieve table prefix, to add it to index name - $prefix = config('db.master.prefix'); - - foreach($this->index_hints_list as $index_hint) - { - $index_hint_type = $index_hint->getIndexHintType(); - if($index_hint_type !== 'IGNORE') - { - $result .= $this->alias . '.' - . '"' . $prefix . substr($index_hint->getIndexName(), 1) - . ($index_hint_type == 'FORCE' ? '(+)' : '') - . ', '; - } - } - $result = substr($result, 0, -2); - return $result; - } - -} -/* End of file CubridTableWithHint.class.php */ -/* Location: ./classes/db/queryparts/table/CubridTableWithHint.class.php */ diff --git a/classes/db/queryparts/table/MssqlTableWithHint.class.php b/classes/db/queryparts/table/MssqlTableWithHint.class.php deleted file mode 100644 index edc49accc..000000000 --- a/classes/db/queryparts/table/MssqlTableWithHint.class.php +++ /dev/null @@ -1,66 +0,0 @@ - */ - -/** - * @author NAVER (developers@xpressengine.com) - * @package /classes/db/queryparts/table - * @version 0.1 - */ -class MssqlTableWithHint extends Table -{ - - /** - * table name - * @var string - */ - var $name; - - /** - * table alias - * @var string - */ - var $alias; - - /** - * index hint type, ex) IGNORE, FORCE, USE... - * @var array - */ - var $index_hints_list; - - /** - * constructor - * @param string $name - * @param string $alias - * @param string $index_hints_list - * @return void - */ - function __construct($name, $alias = NULL, $index_hints_list) - { - parent::__construct($name, $alias); - $this->index_hints_list = $index_hints_list; - } - - function toString() - { - $result = parent::toString(); - - $index_hint_string = ''; - $indexTypeList = array('USE' => 1, 'FORCE' => 1); - foreach($this->index_hints_list as $index_hint) - { - $index_hint_type = $index_hint->getIndexHintType(); - if(isset($indexTypeList[$index_hint_type])) - { - $index_hint_string .= 'INDEX(' . $index_hint->getIndexName() . '), '; - } - } - if($index_hint_string != '') - { - $result .= ' WITH(' . substr($index_hint_string, 0, -2) . ') '; - } - return $result; - } - -} -/* End of file MssqlTableWithHint.class.php */ -/* Location: ./classes/db/queryparts/table/MssqlTableWithHint.class.php */ diff --git a/common/autoload.php b/common/autoload.php index c4312273c..cbcd870ba 100644 --- a/common/autoload.php +++ b/common/autoload.php @@ -66,10 +66,8 @@ $GLOBALS['RX_AUTOLOAD_FILE_MAP'] = array_change_key_case(array( 'UpdateExpressionWithoutArgument' => 'classes/db/queryparts/expression/UpdateExpressionWithoutArgument.class.php', 'Limit' => 'classes/db/queryparts/limit/Limit.class.php', 'OrderByColumn' => 'classes/db/queryparts/order/OrderByColumn.class.php', - 'CubridTableWithHint' => 'classes/db/queryparts/table/CubridTableWithHint.class.php', 'IndexHint' => 'classes/db/queryparts/table/IndexHint.class.php', 'JoinTable' => 'classes/db/queryparts/table/JoinTable.class.php', - 'MssqlTableWithHint' => 'classes/db/queryparts/table/MssqlTableWithHint.class.php', 'MysqlTableWithHint' => 'classes/db/queryparts/table/MysqlTableWithHint.class.php', 'Table' => 'classes/db/queryparts/table/Table.class.php', 'DisplayHandler' => 'classes/display/DisplayHandler.class.php',