mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-04-28 14:52:24 +09:00
adds comments for phpDoc
git-svn-id: http://xe-core.googlecode.com/svn/branches/1.5.0@10739 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
94be154d88
commit
c65e9d3071
29 changed files with 1701 additions and 583 deletions
|
|
@ -1,26 +1,40 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @class SelectExpression
|
||||
* @author Arnia Software
|
||||
* @brief Represents an expresion that appears in the select clause
|
||||
* SelectExpression
|
||||
* Represents an expresion that appears in the select clause
|
||||
*
|
||||
* @remarks
|
||||
* $column_name can be:
|
||||
* - a table column name
|
||||
* - an sql function - like count(*)
|
||||
* - an sql expression - substr(column_name, 1, 8) or score1 + score2
|
||||
* $column_name is already escaped
|
||||
*
|
||||
* @author Arnia Software
|
||||
* @package /classes/db/queryparts/expression
|
||||
* @version 0.1
|
||||
*/
|
||||
|
||||
class SelectExpression extends Expression {
|
||||
/**
|
||||
* column alias name
|
||||
* @var string
|
||||
*/
|
||||
var $column_alias;
|
||||
|
||||
/**
|
||||
* constructor
|
||||
* @param string $column_name
|
||||
* @param string $alias
|
||||
* @return void
|
||||
*/
|
||||
function SelectExpression($column_name, $alias = NULL){
|
||||
parent::Expression($column_name);
|
||||
$this->column_alias = $alias;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return column expression, ex) column as alias
|
||||
* @return string
|
||||
*/
|
||||
function getExpression() {
|
||||
return sprintf("%s%s", $this->column_name, $this->column_alias ? " as ".$this->column_alias : "");
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue