mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-29 08:09:58 +09:00
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:
parent
f1c9668478
commit
78db12a858
6 changed files with 88 additions and 76 deletions
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
?>
|
||||
Loading…
Add table
Add a link
Reference in a new issue