mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-04-28 14:52:24 +09:00
add priority_hint to mysql
git-svn-id: http://xe-core.googlecode.com/svn/branches/1.5.0@9485 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
cc7477d4e3
commit
055b7e0d68
4 changed files with 30 additions and 9 deletions
|
|
@ -3,6 +3,7 @@
|
|||
class QueryTag {
|
||||
var $action;
|
||||
var $query_id;
|
||||
var $priority;
|
||||
var $column_type;
|
||||
var $query;
|
||||
|
||||
|
|
@ -23,6 +24,7 @@ class QueryTag {
|
|||
function QueryTag($query, $isSubQuery = false){
|
||||
$this->action = $query->attrs->action;
|
||||
$this->query_id = $query->attrs->id;
|
||||
$this->priority = $query->attrs->priority;
|
||||
$this->query = $query;
|
||||
$this->isSubQuery = $isSubQuery;
|
||||
if($this->isSubQuery) $this->action = 'select';
|
||||
|
|
@ -46,6 +48,10 @@ class QueryTag {
|
|||
function getQueryId(){
|
||||
return $this->query->attrs->query_id ? $this->query->attrs->query_id : $this->query->attrs->id;
|
||||
}
|
||||
|
||||
function getPriority(){
|
||||
return $this->query->attrs->priority;
|
||||
}
|
||||
|
||||
function getAction(){
|
||||
return $this->query->attrs->action;
|
||||
|
|
@ -124,6 +130,7 @@ class QueryTag {
|
|||
$buff .= '$query = new Query();'.PHP_EOL;
|
||||
$buff .= sprintf('$query->setQueryId("%s");%s', $this->query_id, "\n");
|
||||
$buff .= sprintf('$query->setAction("%s");%s', $this->action, "\n");
|
||||
$buff .= sprintf('$query->setPriority("%s");%s', $this->priority, "\n");
|
||||
$buff .= $this->preBuff;
|
||||
if($this->columns)
|
||||
$buff .= '$query->setColumns(' . $this->columns->toString() . ');'.PHP_EOL;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue