mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-09 03:32:00 +09:00
reverse merge from 1.6.0 (r10563)
git-svn-id: http://xe-core.googlecode.com/svn/branches/1.5.0@10711 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
09dc853b4d
commit
f0aa085c94
9 changed files with 292 additions and 53 deletions
|
|
@ -69,14 +69,14 @@
|
|||
|
||||
// Write query cache file
|
||||
$parser = new QueryParser($xml_obj->query);
|
||||
FileHandler::writeFile($cache_file, $parser->toString());
|
||||
FileHandler::writeFile($cache_file, $parser->toString());
|
||||
|
||||
return $parser;
|
||||
}
|
||||
|
||||
function parse($query_id = NULL, $xml_file = NULL, $cache_file = NULL)
|
||||
{
|
||||
$query_parser = &$this->parse_xml_query($query_id, $xml_file, $cache_file);
|
||||
$this->parse_xml_query($query_id, $xml_file, $cache_file);
|
||||
}
|
||||
|
||||
function getXmlFileContent($xml_file){
|
||||
|
|
|
|||
|
|
@ -12,20 +12,21 @@
|
|||
var $click_count;
|
||||
|
||||
function SelectColumnTag($column){
|
||||
parent::ColumnTag($column->attrs->name);
|
||||
if(!$this->name) {
|
||||
if($column->attrs->var)
|
||||
$this->name = '$' . $column->attrs->var;
|
||||
else
|
||||
$this->name = "*";
|
||||
if ($column == "*" || $column->attrs->name == '*')
|
||||
{
|
||||
parent::ColumnTag(NULL);
|
||||
$this->name = "*";
|
||||
}
|
||||
if($this->name != "*" && substr($this->name, 0, 1) != '$') {
|
||||
else
|
||||
{
|
||||
parent::ColumnTag($column->attrs->name);
|
||||
$dbParser = DB::getParser();
|
||||
$this->name = $dbParser->parseExpression($this->name);
|
||||
|
||||
$this->alias = $column->attrs->alias;
|
||||
$this->click_count = $column->attrs->click_count;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function getExpressionString(){
|
||||
|
|
|
|||
|
|
@ -176,7 +176,7 @@ class QueryTag {
|
|||
return $this->buff;
|
||||
}
|
||||
|
||||
function getTables() {
|
||||
function getTables(){
|
||||
if($this->query->index_hint && ($this->query->index_hint->attrs->for == 'ALL' || Context::getDBType() == strtolower($this->query->index_hint->attrs->for)))
|
||||
return $this->tables = new TablesTag($this->query->tables, $this->query->index_hint);
|
||||
else
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@
|
|||
$this->tables[] = new QueryTag($tag, true);
|
||||
}
|
||||
else {
|
||||
if(isset($indexes) && $indexes && isset($indexes[$tag->attrs->name]))
|
||||
if(isset($indexes[$tag->attrs->name]) && $indexes[$tag->attrs->name])
|
||||
$this->tables[] = new HintTableTag($tag, $indexes[$tag->attrs->name]);
|
||||
else
|
||||
$this->tables[] = new TableTag($tag);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue