mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-14 00:39:57 +09:00
Bug fixes:
DBCubrid.class.php - remove "WHERE" clause when all conditions are empty queryargument/QueryArgument.class.php and queryargument/validator/QueryArgumentValidator.class.php - this is for backwords compatibility - there are many xml files that have variable names (var) given with "." table/TableTag.class.php - autocomplete default table name alias with table name. git-svn-id: http://xe-core.googlecode.com/svn/branches/1.5.0-DB@8426 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
b4ca6896bc
commit
23e991bec0
5 changed files with 14 additions and 8 deletions
|
|
@ -777,10 +777,10 @@
|
|||
|
||||
$where = '';
|
||||
if(count($output->conditions) > 0){
|
||||
$where = 'WHERE ';
|
||||
foreach($output->conditions as $conditionGroup){
|
||||
$where .= $conditionGroup->toString();
|
||||
}
|
||||
if(trim($where) != '') $where = 'WHERE ' . $where;
|
||||
}
|
||||
|
||||
$groupBy = '';
|
||||
|
|
|
|||
|
|
@ -8,12 +8,14 @@
|
|||
var $ignoreValue;
|
||||
|
||||
function QueryArgument($tag){
|
||||
$this->argument_name = $tag->attrs->var;
|
||||
// HACK (this is for backwords compatibility - there are many xml files that have variable names (var) given with .)
|
||||
// eg. var = point.memeber_srl (getMemberList query from point module)
|
||||
$this->argument_name = str_replace('.', '_',$tag->attrs->var);
|
||||
if(!$this->argument_name) $this->ignoreValue = true;
|
||||
else $this->ignoreValue = false;
|
||||
|
||||
if(!$this->argument_name) $this->argument_name = $tag->attrs->name;
|
||||
if(!$this->argument_name) $this->argument_name = $tag->attrs->column;
|
||||
if(!$this->argument_name) $this->argument_name = str_replace('.', '_',$tag->attrs->column);
|
||||
|
||||
$name = $tag->attrs->name;
|
||||
if(!$name) $name = $tag->attrs->column;
|
||||
|
|
@ -26,7 +28,7 @@
|
|||
if($tag->attrs->operation) $this->operation = $tag->attrs->operation;
|
||||
|
||||
require_once(_XE_PATH_.'classes/xml/xmlquery/queryargument/validator/QueryArgumentValidator.class.php');
|
||||
$this->argument_validator = new QueryArgumentValidator($tag);
|
||||
$this->argument_validator = new QueryArgumentValidator($tag, $this);
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -11,10 +11,12 @@
|
|||
|
||||
var $validator_string;
|
||||
|
||||
function QueryArgumentValidator($tag){
|
||||
$this->argument_name = $tag->attrs->var;
|
||||
if(!$this->argument_name) $this->argument_name = $tag->attrs->name;
|
||||
if(!$this->argument_name) $this->argument_name = $tag->attrs->column;
|
||||
var $argument;
|
||||
|
||||
function QueryArgumentValidator($tag, $argument){
|
||||
$this->argument = $argument;
|
||||
$this->argument_name = $this->argument->getArgumentName();
|
||||
|
||||
$this->default_value = $tag->attrs->default;
|
||||
$this->notnull = $tag->attrs->notnull;
|
||||
$this->filter = $tag->attrs->filter;
|
||||
|
|
|
|||
|
|
@ -27,6 +27,7 @@
|
|||
if($condition->attrs->var || $isColumnName === false){
|
||||
require_once(_XE_PATH_.'classes/xml/xmlquery/queryargument/QueryArgument.class.php');
|
||||
//$this->argument_name = $condition->attrs->var;
|
||||
|
||||
$this->argument = new QueryArgument($condition);
|
||||
$this->argument_name = $this->argument->getArgumentName();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -22,6 +22,7 @@
|
|||
$dbParser = XmlQueryParser::getDBParser();
|
||||
$this->name = $dbParser->parseTableName($table->attrs->name);
|
||||
$this->alias = $table->attrs->alias;
|
||||
if(!$this->alias) $this->alias = $table->attrs->name;
|
||||
//if(!$this->alias) $this->alias = $alias;
|
||||
|
||||
$this->join_type = $table->attrs->type;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue