DeveelDB  20151217
complete SQL database system, primarly developed for .NET/Mono frameworks
Public Member Functions | Static Public Member Functions | Properties | Private Member Functions | List of all members
Deveel.Data.Sql.Expressions.SelectColumn Class Reference

Represents a column selected to be in the output of a select statement. More...

Inheritance diagram for Deveel.Data.Sql.Expressions.SelectColumn:
Deveel.Data.Sql.Expressions.IPreparable Deveel.Data.Serialization.ISerializable

Public Member Functions

 SelectColumn (SqlExpression expression, string alias)
 Constructs a new SelectColumn for the given expression and aliased with the given name. More...
 
 SelectColumn (SqlExpression expression)
 Constructs a new SelectColumn for the given expression. More...
 

Static Public Member Functions

static SelectColumn Glob (string glob)
 Creates a special SelectColumn that is used to select all the columns in a table. More...
 

Properties

SqlExpression Expression [get, private set]
 Gets the expression used to select the column. More...
 
string Alias [get, private set]
 Gets the name used to alias the select expression. More...
 
bool IsGlob [get]
 
bool IsAll [get]
 
ObjectName TableName [get]
 
ObjectName ReferenceName [get]
 
ObjectName InternalName [get, set]
 The name of this column used internally to reference it. More...
 
ObjectName ResolvedName [get, set]
 The fully resolved name that this column is given in the resulting table. More...
 

Private Member Functions

 SelectColumn (ObjectData data)
 
void ISerializable. GetData (SerializeData data)
 
object IPreparable. Prepare (IExpressionPreparer preparer)
 Converts the underlying value of this instance into an object that can be evaluated by an expression. More...
 

Detailed Description

Represents a column selected to be in the output of a select statement.

This includes being either an aggregate function, a column or "*" which is the entire set of columns.

Definition at line 31 of file SelectColumn.cs.

Constructor & Destructor Documentation

Deveel.Data.Sql.Expressions.SelectColumn.SelectColumn ( SqlExpression  expression,
string  alias 
)
inline

Constructs a new SelectColumn for the given expression and aliased with the given name.

Parameters
expressionThe Expression used for select a column within a SELECT statement.
aliasThe name to alias the resulted expression.

Definition at line 39 of file SelectColumn.cs.

39  {
40  if (expression == null)
41  throw new ArgumentNullException("expression");
42 
43  Expression = expression;
44  Alias = alias;
45  }
SqlExpression Expression
Gets the expression used to select the column.
Definition: SelectColumn.cs:65
string Alias
Gets the name used to alias the select expression.
Definition: SelectColumn.cs:70
Deveel.Data.Sql.Expressions.SelectColumn.SelectColumn ( SqlExpression  expression)
inline

Constructs a new SelectColumn for the given expression.

Parameters
expressionThe Expression used for select a column within a SELECT statement.

Definition at line 53 of file SelectColumn.cs.

54  : this(expression, null) {
55  }
Deveel.Data.Sql.Expressions.SelectColumn.SelectColumn ( ObjectData  data)
inlineprivate

Definition at line 57 of file SelectColumn.cs.

57  {
58  Expression = data.GetValue<SqlExpression>("Expression");
59  Alias = data.GetString("Alias");
60  }
SqlExpression Expression
Gets the expression used to select the column.
Definition: SelectColumn.cs:65
string Alias
Gets the name used to alias the select expression.
Definition: SelectColumn.cs:70

Member Function Documentation

void ISerializable. Deveel.Data.Sql.Expressions.SelectColumn.GetData ( SerializeData  data)
inlineprivate

Implements Deveel.Data.Serialization.ISerializable.

Definition at line 117 of file SelectColumn.cs.

117  {
118  data.SetValue("Expression", Expression);
119  data.SetValue("Alias", Alias);
120  }
void SetValue(string key, Type type, object value)
SqlExpression Expression
Gets the expression used to select the column.
Definition: SelectColumn.cs:65
string Alias
Gets the name used to alias the select expression.
Definition: SelectColumn.cs:70
static SelectColumn Deveel.Data.Sql.Expressions.SelectColumn.Glob ( string  glob)
inlinestatic

Creates a special SelectColumn that is used to select all the columns in a table.

Parameters
globThe glob name for the column, which can be a simple asterisk (*) or prefixed by a table name (eg. Table.*).
Returns
Returns an instance of SelectColumn that is specially used for selecting all the columns from a table.

Definition at line 142 of file SelectColumn.cs.

142  {
143  return new SelectColumn(SqlExpression.Reference(ObjectName.Parse(glob)));
144  }
SelectColumn(SqlExpression expression, string alias)
Constructs a new SelectColumn for the given expression and aliased with the given name...
Definition: SelectColumn.cs:39
object IPreparable. Deveel.Data.Sql.Expressions.SelectColumn.Prepare ( IExpressionPreparer  preparer)
inlineprivate

Converts the underlying value of this instance into an object that can be evaluated by an expression.

Implements Deveel.Data.Sql.Expressions.IPreparable.

Definition at line 123 of file SelectColumn.cs.

123  {
124  var exp = Expression;
125  if (exp != null) {
126  exp = exp.Prepare(preparer);
127  }
128 
129  return new SelectColumn(exp, Alias);
130  }
virtual SqlExpression Prepare(IExpressionPreparer preparer)
SqlExpression Expression
Gets the expression used to select the column.
Definition: SelectColumn.cs:65
string Alias
Gets the name used to alias the select expression.
Definition: SelectColumn.cs:70
SelectColumn(SqlExpression expression, string alias)
Constructs a new SelectColumn for the given expression and aliased with the given name...
Definition: SelectColumn.cs:39

Property Documentation

string Deveel.Data.Sql.Expressions.SelectColumn.Alias
getprivate set

Gets the name used to alias the select expression.

Definition at line 70 of file SelectColumn.cs.

SqlExpression Deveel.Data.Sql.Expressions.SelectColumn.Expression
getprivate set

Gets the expression used to select the column.

Definition at line 65 of file SelectColumn.cs.

ObjectName Deveel.Data.Sql.Expressions.SelectColumn.InternalName
getsetpackage

The name of this column used internally to reference it.

Definition at line 110 of file SelectColumn.cs.

bool Deveel.Data.Sql.Expressions.SelectColumn.IsAll
get

Definition at line 79 of file SelectColumn.cs.

bool Deveel.Data.Sql.Expressions.SelectColumn.IsGlob
get

Definition at line 72 of file SelectColumn.cs.

ObjectName Deveel.Data.Sql.Expressions.SelectColumn.ReferenceName
get

Definition at line 97 of file SelectColumn.cs.

ObjectName Deveel.Data.Sql.Expressions.SelectColumn.ResolvedName
getsetpackage

The fully resolved name that this column is given in the resulting table.

Definition at line 115 of file SelectColumn.cs.

ObjectName Deveel.Data.Sql.Expressions.SelectColumn.TableName
get

Definition at line 87 of file SelectColumn.cs.


The documentation for this class was generated from the following file: