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

Object used to represent a column in the ORDER BY clauses of a select statement. More...

Inheritance diagram for Deveel.Data.Sql.SortColumn:
Deveel.Data.Sql.Expressions.IPreparable

Public Member Functions

 SortColumn (SqlExpression expression, bool ascending)
 Constructs the BY column reference with the expression and the sort order given. More...
 
 SortColumn (SqlExpression expression)
 Constructs the BY column reference with the expression given and the ascending sort order. More...
 
 SortColumn (string expression, bool ascending)
 Constructs the BY column reference with the expression and the sort order given. More...
 
 SortColumn (string expression)
 Constructs the BY column reference with the expression given and the ascending sort order. More...
 

Properties

SqlExpression Expression [get, set]
 Gets the expression used to order the result of a query. More...
 
bool Ascending [get, private set]
 Gets a boolean value indicating whether we're sorting in ascending or descending order. More...
 

Private Member Functions

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

Object used to represent a column in the ORDER BY clauses of a select statement.

Definition at line 26 of file SortColumn.cs.

Constructor & Destructor Documentation

Deveel.Data.Sql.SortColumn.SortColumn ( SqlExpression  expression,
bool  ascending 
)
inline

Constructs the BY column reference with the expression and the sort order given.

Parameters
expressionThe expression of the column reference.
ascendingThe sort order for the column. If this is set to true, the column will be used to sort the results of a query in ascending order.

Definition at line 35 of file SortColumn.cs.

35  {
36  Expression = expression;
37  Ascending = ascending;
38  }
bool Ascending
Gets a boolean value indicating whether we're sorting in ascending or descending order.
Definition: SortColumn.cs:79
SqlExpression Expression
Gets the expression used to order the result of a query.
Definition: SortColumn.cs:73
Deveel.Data.Sql.SortColumn.SortColumn ( SqlExpression  expression)
inline

Constructs the BY column reference with the expression given and the ascending sort order.

Parameters
expressionThe expression of the column reference.

Definition at line 45 of file SortColumn.cs.

46  : this(expression, true) {
47  }
Deveel.Data.Sql.SortColumn.SortColumn ( string  expression,
bool  ascending 
)
inline

Constructs the BY column reference with the expression and the sort order given.

Parameters
expressionThe expression of the column reference.
ascendingThe sort order for the column. If this is set to true, the column will be used to sort the results of a query in ascending order.

Definition at line 57 of file SortColumn.cs.

58  : this(SqlExpression.Parse(expression), ascending) {
59  }
static SqlExpression Parse(string s)
Parses the given SQL string to an expression that can be evaluated.
Defines the base class for instances that represent SQL expression tree nodes.
Deveel.Data.Sql.SortColumn.SortColumn ( string  expression)
inline

Constructs the BY column reference with the expression given and the ascending sort order.

Parameters
expressionThe expression of the column reference.

Definition at line 66 of file SortColumn.cs.

67  : this(expression, true) {
68  }

Member Function Documentation

object IPreparable. Deveel.Data.Sql.SortColumn.Prepare ( IExpressionPreparer  preparer)
inlineprivate

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

Parameters
preparerThe context used to prepare this object.
Returns
Returns an object that can be evaluated by an expression.

Implements Deveel.Data.Sql.Expressions.IPreparable.

Definition at line 81 of file SortColumn.cs.

81  {
82  var exp = Expression;
83  if (exp != null) {
84  exp = exp.Prepare(preparer);
85  }
86 
87  return new SortColumn(exp, Ascending);
88  }
bool Ascending
Gets a boolean value indicating whether we're sorting in ascending or descending order.
Definition: SortColumn.cs:79
SortColumn(SqlExpression expression, bool ascending)
Constructs the BY column reference with the expression and the sort order given.
Definition: SortColumn.cs:35
virtual SqlExpression Prepare(IExpressionPreparer preparer)
SqlExpression Expression
Gets the expression used to order the result of a query.
Definition: SortColumn.cs:73

Property Documentation

bool Deveel.Data.Sql.SortColumn.Ascending
getprivate set

Gets a boolean value indicating whether we're sorting in ascending or descending order.

Definition at line 79 of file SortColumn.cs.

SqlExpression Deveel.Data.Sql.SortColumn.Expression
getset

Gets the expression used to order the result of a query.

Definition at line 73 of file SortColumn.cs.


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