mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-04-13 23:42:13 +09:00
[UDPDATE] translated korean code comments into English
git-svn-id: http://xe-core.googlecode.com/svn/sandbox@7152 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
634421b9aa
commit
e00ab11d62
1 changed files with 47 additions and 5 deletions
|
|
@ -2,16 +2,21 @@
|
|||
/**
|
||||
* @class XmlQueryParser
|
||||
* @author zero (zero@nzeo.com)
|
||||
* @brief query xml을 파싱하여 캐싱을 한 후 결과를 return
|
||||
* @brief case to parse XE xml query
|
||||
* @version 0.1
|
||||
*
|
||||
* @todo subquery나 union등의 확장 쿼리에 대한 지원이 필요
|
||||
* @todo need to support extend query such as subquery, union
|
||||
**/
|
||||
|
||||
class XmlQueryParser extends XmlParser {
|
||||
|
||||
/**
|
||||
* @brief 쿼리 파일을 찾아서 파싱하고 캐싱한다
|
||||
* @brief parse a xml query file and save the result as a new file specified by cache_file
|
||||
* @param[in] $query_id name of query
|
||||
* @param[in] $xml_file file path of a xml query file to be loaded
|
||||
* @param[in] $cache_file file path of a cache file to store resultant php code after parsing xml query
|
||||
* @return Nothing is requred.
|
||||
* @remarks {there should be a way to report an error}
|
||||
**/
|
||||
function parse($query_id, $xml_file, $cache_file) {
|
||||
// query xml 파일을 찾아서 파싱, 결과가 없으면 return
|
||||
|
|
@ -240,6 +245,12 @@
|
|||
FileHandler::writeFile($cache_file, $buff);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief transfer given column information to object->columns
|
||||
* @param[in] column information
|
||||
* @result Returns $object
|
||||
*/
|
||||
|
||||
function _setColumn($columns){
|
||||
if(!$columns) {
|
||||
$output->column[] = array("*" => "*");
|
||||
|
|
@ -270,6 +281,11 @@
|
|||
return $output;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief transfer condition information to $object->conditions
|
||||
* @param[in] SQL condition information
|
||||
* @result Returns $output
|
||||
*/
|
||||
function _setConditions($conditions){
|
||||
// 조건절 정리
|
||||
|
||||
|
|
@ -308,6 +324,11 @@
|
|||
return $output;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief transfer condition information to $object->groups
|
||||
* @param[in] SQL group information
|
||||
* @result Returns $output
|
||||
*/
|
||||
function _setGroup($group_list){
|
||||
// group 정리
|
||||
|
||||
|
|
@ -325,6 +346,11 @@
|
|||
}
|
||||
|
||||
|
||||
/**
|
||||
* @brief transfer pagnation information to $output
|
||||
* @param[in] $xml_obj xml object containing Navigation information
|
||||
* @result Returns $output
|
||||
*/
|
||||
function _setNavigation($xml_obj){
|
||||
$navigation = $xml_obj->query->navigation;
|
||||
if($navigation) {
|
||||
|
|
@ -348,6 +374,12 @@
|
|||
return $output;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief retrieve column information from $output->colums to generate corresponding php code
|
||||
* @param[in] $column
|
||||
* @remarks the name of this method is misleading.
|
||||
* @result Returns string buffer containing php code
|
||||
*/
|
||||
function _getColumn($columns){
|
||||
$buff = '';
|
||||
$str = '';
|
||||
|
|
@ -392,6 +424,12 @@
|
|||
return $buff;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief retrieve condition information from $output->condition to generate corresponding php code
|
||||
* @param[in] $conditions array containing Query conditions
|
||||
* @remarks the name of this method is misleading.
|
||||
* @return Returns string buffer containing php code
|
||||
*/
|
||||
function _getConditions($conditions){
|
||||
$buff = '';
|
||||
foreach($conditions as $key => $val) {
|
||||
|
|
@ -418,9 +456,13 @@
|
|||
return $buff;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @brief column, condition등의 key에 default 값을 세팅
|
||||
**/
|
||||
* @brief returns predefined default values correspoding to given parameters
|
||||
* @param[in] $name
|
||||
* @param[in] $value
|
||||
* @return Returns a default value for specified field
|
||||
*/
|
||||
function getDefault($name, $value) {
|
||||
$db_info = Context::getDBInfo ();
|
||||
if(!$value) return;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue