XpressEngine Core  1.11.2
 All Classes Namespaces Files Functions Variables Pages
MssqlTableWithHint.class.php
Go to the documentation of this file.
1 <?php
2 /* Copyright (C) NAVER <http://www.navercorp.com> */
3 
9 class MssqlTableWithHint extends Table
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 
43  function toString()
44  {
45  $result = parent::toString();
46 
47  $index_hint_string = '';
48  $indexTypeList = array('USE' => 1, 'FORCE' => 1);
49  foreach($this->index_hints_list as $index_hint)
50  {
51  $index_hint_type = $index_hint->getIndexHintType();
52  if(isset($indexTypeList[$index_hint_type]))
53  {
54  $index_hint_string .= 'INDEX(' . $index_hint->getIndexName() . '), ';
55  }
56  }
57  if($index_hint_string != '')
58  {
59  $result .= ' WITH(' . substr($index_hint_string, 0, -2) . ') ';
60  }
61  return $result;
62  }
63 
64 }
65 /* End of file MssqlTableWithHint.class.php */
66 /* Location: ./classes/db/queryparts/table/MssqlTableWithHint.class.php */
__construct($name, $alias=NULL, $index_hints_list)