mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-14 00:39:57 +09:00
Query cache file - added condition to skip null arguments that do not need validation and are not mandatory.
git-svn-id: http://xe-core.googlecode.com/svn/branches/1.5.0@9066 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
34246aa267
commit
33df36e715
12 changed files with 148 additions and 116 deletions
|
|
@ -22,10 +22,15 @@
|
|||
$this->max_length = $tag->attrs->max_length;
|
||||
}
|
||||
|
||||
function isIgnorable(){
|
||||
if(isset($this->default_value) || isset($this->notnull)) return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
function toString(){
|
||||
$validator = '';
|
||||
if(isset($this->default_value)){
|
||||
$this->default_value = new DefaultValue($this->argument_name, $this->default_value);
|
||||
$this->default_value = new DefaultValue($this->argument_name, $this->default_value);
|
||||
if($this->default_value->isSequence())
|
||||
$validator .= '$db = &DB::getInstance(); $sequence = $db->getNextSequence(); ';
|
||||
if($this->default_value->isOperation())
|
||||
|
|
@ -33,10 +38,10 @@
|
|||
, $this->argument_name
|
||||
, $this->default_value->getOperation()
|
||||
);
|
||||
$validator .= sprintf("$%s_argument->ensureDefaultValue(%s);\n"
|
||||
, $this->argument_name
|
||||
, $this->default_value->toString()
|
||||
);
|
||||
$validator .= sprintf("$%s_argument->ensureDefaultValue(%s);\n"
|
||||
, $this->argument_name
|
||||
, $this->default_value->toString()
|
||||
);
|
||||
}
|
||||
if($this->notnull){
|
||||
$validator .= sprintf("$%s_argument->checkNotNull();\n"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue