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.Expressions.FromTable Class Reference

Describes a single table declaration in the from clause of a table expression (SELECT). More...

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

Public Member Functions

 FromTable (string tableName, string tableAlias)
 Constructs a table that is aliased under a different name. More...
 
 FromTable (string tableName)
 A simple table definition (not aliased). More...
 
 FromTable (SqlQueryExpression query)
 A table that is a sub-query with no alias set. More...
 
 FromTable (SqlQueryExpression query, string tableAlias)
 A table that is a sub-query and given an aliased name. More...
 

Properties

string Name [get, private set]
 
string Alias [get, private set]
 Returns the alias for this table (or null if no alias given). More...
 
string UniqueKey [get, set]
 Gets or sets the unique key. More...
 
bool IsSubQuery [get, private set]
 Returns true if this item in the FROM clause is a subquery table. More...
 
SqlQueryExpression SubQuery [get, private set]
 Returns the TableSelectExpression if this is a subquery table. More...
 

Private Member Functions

 FromTable (string tableName, SqlQueryExpression query, string alias)
 
 FromTable (ObjectData data)
 
object IPreparable. Prepare (IExpressionPreparer preparer)
 Converts the underlying value of this instance into an object that can be evaluated by an expression. More...
 
void ISerializable. GetData (SerializeData data)
 

Detailed Description

Describes a single table declaration in the from clause of a table expression (SELECT).

Definition at line 27 of file FromTable.cs.

Constructor & Destructor Documentation

Deveel.Data.Sql.Expressions.FromTable.FromTable ( string  tableName,
string  tableAlias 
)
inline

Constructs a table that is aliased under a different name.

Parameters
tableName
tableAlias

Definition at line 33 of file FromTable.cs.

34  : this(tableName, null, tableAlias) {
35  if (String.IsNullOrEmpty(tableName))
36  throw new ArgumentNullException("tableName");
37  }
A long string in the system.
Deveel.Data.Sql.Expressions.FromTable.FromTable ( string  tableName)
inline

A simple table definition (not aliased).

Parameters
tableName

Definition at line 43 of file FromTable.cs.

44  : this(tableName, null) {
45  }
Deveel.Data.Sql.Expressions.FromTable.FromTable ( SqlQueryExpression  query)
inline

A table that is a sub-query with no alias set.

Parameters
query

Definition at line 51 of file FromTable.cs.

52  : this(query, null) {
53  }
Deveel.Data.Sql.Expressions.FromTable.FromTable ( SqlQueryExpression  query,
string  tableAlias 
)
inline

A table that is a sub-query and given an aliased name.

Parameters
query
tableAlias

Definition at line 60 of file FromTable.cs.

61  : this(null, query, tableAlias) {
62  if (query == null)
63  throw new ArgumentNullException("query");
64  }
Deveel.Data.Sql.Expressions.FromTable.FromTable ( string  tableName,
SqlQueryExpression  query,
string  alias 
)
inlineprivate

Definition at line 66 of file FromTable.cs.

66  {
67  Name = tableName;
68  SubQuery = query;
69  Alias = alias;
70  IsSubQuery = query != null;
71  }
bool IsSubQuery
Returns true if this item in the FROM clause is a subquery table.
Definition: FromTable.cs:98
SqlQueryExpression SubQuery
Returns the TableSelectExpression if this is a subquery table.
Definition: FromTable.cs:103
string Alias
Returns the alias for this table (or null if no alias given).
Definition: FromTable.cs:88
Deveel.Data.Sql.Expressions.FromTable.FromTable ( ObjectData  data)
inlineprivate

summary> Gets the name of the table. /summary>

Definition at line 73 of file FromTable.cs.

Member Function Documentation

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

Implements Deveel.Data.Serialization.ISerializable.

Definition at line 113 of file FromTable.cs.

113  {
114  data.SetValue("Name", Name);
115  data.SetValue("SubQuery", SubQuery);
116  data.SetValue("Alias", Alias);
117  }
void SetValue(string key, Type type, object value)
SqlQueryExpression SubQuery
Returns the TableSelectExpression if this is a subquery table.
Definition: FromTable.cs:103
string Alias
Returns the alias for this table (or null if no alias given).
Definition: FromTable.cs:88
object IPreparable. Deveel.Data.Sql.Expressions.FromTable.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 105 of file FromTable.cs.

105  {
106  var subQuery = SubQuery;
107  if (subQuery != null)
108  subQuery = (SqlQueryExpression) subQuery.Prepare(preparer);
109 
110  return new FromTable(Name, subQuery, Alias);
111  }
FromTable(string tableName, string tableAlias)
Constructs a table that is aliased under a different name.
Definition: FromTable.cs:33
SqlQueryExpression SubQuery
Returns the TableSelectExpression if this is a subquery table.
Definition: FromTable.cs:103
virtual SqlExpression Prepare(IExpressionPreparer preparer)
string Alias
Returns the alias for this table (or null if no alias given).
Definition: FromTable.cs:88

Property Documentation

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

Returns the alias for this table (or null if no alias given).

Definition at line 88 of file FromTable.cs.

bool Deveel.Data.Sql.Expressions.FromTable.IsSubQuery
getprivate set

Returns true if this item in the FROM clause is a subquery table.

Definition at line 98 of file FromTable.cs.

string Deveel.Data.Sql.Expressions.FromTable.Name
getprivate set

Definition at line 83 of file FromTable.cs.

SqlQueryExpression Deveel.Data.Sql.Expressions.FromTable.SubQuery
getprivate set

Returns the TableSelectExpression if this is a subquery table.

Definition at line 103 of file FromTable.cs.

string Deveel.Data.Sql.Expressions.FromTable.UniqueKey
getsetpackage

Gets or sets the unique key.

Definition at line 93 of file FromTable.cs.


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