mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-14 00:39:57 +09:00
Updated query classes in order to support prepared statements - added support for parameter binding. Added unit tests for mssql select using new prepared statement syntax.
git-svn-id: http://xe-core.googlecode.com/svn/branches/1.5.0-DB@8511 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
32fe8750e9
commit
6f17aa5759
11 changed files with 93 additions and 16 deletions
|
|
@ -109,6 +109,7 @@ class QueryParser {
|
|||
|
||||
$this->setTableColumnTypes($tables);
|
||||
|
||||
// TODO Check if this work with arguments in join clause
|
||||
$arguments = array();
|
||||
if($columns)
|
||||
$arguments = array_merge($arguments, $columns->getArguments());
|
||||
|
|
@ -122,7 +123,6 @@ class QueryParser {
|
|||
$prebuff .= sprintf("$%s_argument->setColumnType('%s');\n"
|
||||
, $argument->getArgumentName()
|
||||
, $this->column_type[$this->getQueryId()][$argument->getColumnName()] );
|
||||
$prebuff .= sprintf('$query->addArgument($%s_argument);', $argument->getArgumentName());
|
||||
}
|
||||
}
|
||||
$prebuff .= "\n";
|
||||
|
|
|
|||
|
|
@ -14,6 +14,10 @@
|
|||
$this->isValid = true;
|
||||
}
|
||||
|
||||
function getName(){
|
||||
return $this->name;
|
||||
}
|
||||
|
||||
function getValue(){
|
||||
if(is_array($this->value)) return implode(',', $this->value);
|
||||
return $this->value;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue