mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-18 10:49:54 +09:00
Updates to unit tests for correlated subqueries.
git-svn-id: http://xe-core.googlecode.com/svn/branches/1.5.0-DB@8560 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
e313076cc8
commit
909276e16b
8 changed files with 54 additions and 55 deletions
|
|
@ -18,7 +18,7 @@ class QueryParser {
|
|||
function QueryParser($query, $isSubQuery = false){
|
||||
$this->queryTag = new QueryTag($query, $isSubQuery);
|
||||
}
|
||||
|
||||
|
||||
function getTableInfo($query_id, $table_name){
|
||||
$column_type = array();
|
||||
|
||||
|
|
|
|||
|
|
@ -16,31 +16,25 @@
|
|||
* Can have children of type <table> or <query>
|
||||
*/
|
||||
|
||||
require_once(_XE_PATH_.'classes/xml/xmlquery/tags/table/TableTag.class.php');
|
||||
|
||||
class TablesTag {
|
||||
var $tables;
|
||||
|
||||
function TablesTag($xml_tables_tag){
|
||||
$xml_tables = $xml_tables_tag->table;
|
||||
$xml_queries = $xml_tables_tag->query;
|
||||
|
||||
function TablesTag($xml_tables_tag){
|
||||
$this->tables = array();
|
||||
|
||||
|
||||
if($xml_tables){
|
||||
if(!is_array($xml_tables)) $xml_tables = array($xml_tables);
|
||||
|
||||
if(count($xml_tables)) require_once(_XE_PATH_.'classes/xml/xmlquery/tags/table/TableTag.class.php');
|
||||
|
||||
foreach($xml_tables as $table){
|
||||
$this->tables[] = new TableTag($table);
|
||||
}
|
||||
}
|
||||
if(!$xml_queries) return;
|
||||
if(!is_array($xml_queries)) $xml_queries = array($xml_queries);
|
||||
|
||||
foreach($xml_queries as $table){
|
||||
$this->tables[] = new QueryTag($table, true);
|
||||
}
|
||||
$xml_tables = $xml_tables_tag->table;
|
||||
if(!is_array($xml_tables)) $xml_tables = array($xml_tables);
|
||||
|
||||
foreach($xml_tables as $tag){
|
||||
if($tag->attrs->query == 'true'){
|
||||
$this->tables[] = new QueryTag($tag, true);
|
||||
}
|
||||
else {
|
||||
$this->tables[] = new TableTag($tag);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function getTables(){
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue