Improvements for query classes.

git-svn-id: http://xe-core.googlecode.com/svn/branches/1.5.0@9102 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
ucorina 2011-09-07 17:10:40 +00:00
parent f1c9668478
commit 78db12a858
6 changed files with 88 additions and 76 deletions

View file

@ -1,11 +1,11 @@
<?php
<?php
/**
* @class SelectExpression
* @author Arnia Software
* @brief Represents an expresion that appears in the select clause
*
* @remarks
*
* @remarks
* $column_name can be:
* - a table column name
* - an sql function - like count(*)
@ -15,22 +15,26 @@
class SelectExpression extends Expression {
var $column_alias;
function SelectExpression($column_name, $alias = NULL){
parent::Expression($column_name);
$this->column_alias = $alias;
}
function getExpression() {
return sprintf("%s%s", $this->column_name, $this->column_alias ? " as ".$this->column_alias : "");
}
function show() {
return true;
}
function getArgument(){
return null;
}
function isSubquery(){
return false;
}
}
?>