mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-05-01 00:02:21 +09:00
Issue 524 - Query error.
git-svn-id: http://xe-core.googlecode.com/svn/branches/1.5.0@9685 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
6eed0f10f2
commit
8de6d4338d
2 changed files with 26 additions and 4 deletions
|
|
@ -20,10 +20,22 @@
|
|||
if($column->attrs->var)
|
||||
$this->argument = new QueryArgument($column);
|
||||
else {
|
||||
$default_value = new DefaultValue($this->name, $column->attrs->default);
|
||||
if($default_value->isOperation())
|
||||
if(strpos($column->attrs->default, '.') !== false)
|
||||
$this->default_value = "'" . $dbParser->parseColumnName($column->attrs->default) . "'";
|
||||
else {
|
||||
$default_value = new DefaultValue($this->name, $column->attrs->default);
|
||||
if($default_value->isOperation())
|
||||
$this->argument = new QueryArgument($column, true);
|
||||
else $this->default_value = $dbParser->parseColumnName($column->attrs->default);
|
||||
//else $this->default_value = $dbParser->parseColumnName($column->attrs->default);
|
||||
else {
|
||||
$this->default_value = $default_value->toString();
|
||||
if($default_value->isString()){
|
||||
$this->default_value = '"' . $this->default_value . '"';
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -33,7 +45,7 @@
|
|||
, $this->name
|
||||
, $this->argument->argument_name);
|
||||
else {
|
||||
return sprintf('new UpdateExpressionWithoutArgument(\'%s\', \'%s\')'
|
||||
return sprintf('new UpdateExpressionWithoutArgument(\'%s\', %s)'
|
||||
, $this->name
|
||||
, $this->default_value);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue