XpressEngine Core  1.11.2
 All Classes Namespaces Files Functions Variables Pages
CubridTableWithHint.class.php
Go to the documentation of this file.
1 <?php
2 /* Copyright (C) NAVER <http://www.navercorp.com> */
3 
10 {
11 
16  var $name;
17 
22  var $alias;
23 
29 
38  {
39  parent::__construct($name, $alias);
40  $this->index_hints_list = $index_hints_list;
41  }
42 
47  function getIndexHintString()
48  {
49  $result = '';
50 
51  // Retrieve table prefix, to add it to index name
52  $db_info = Context::getDBInfo();
53  $prefix = $db_info->master_db["db_table_prefix"];
54 
55  foreach($this->index_hints_list as $index_hint)
56  {
57  $index_hint_type = $index_hint->getIndexHintType();
58  if($index_hint_type !== 'IGNORE')
59  {
60  $result .= $this->alias . '.'
61  . '"' . $prefix . substr($index_hint->getIndexName(), 1)
62  . ($index_hint_type == 'FORCE' ? '(+)' : '')
63  . ', ';
64  }
65  }
66  $result = substr($result, 0, -2);
67  return $result;
68  }
69 
70 }
71 /* End of file CubridTableWithHint.class.php */
72 /* Location: ./classes/db/queryparts/table/CubridTableWithHint.class.php */
__construct($name, $alias=NULL, $index_hints_list)