Definition at line 29 of file CreateViewStatement.cs.
Deveel.Data.Sql.Statements.CreateViewStatement.CreateViewStatement |
( |
string |
viewName, |
|
|
SqlQueryExpression |
queryExpression |
|
) |
| |
|
inline |
Deveel.Data.Sql.Statements.CreateViewStatement.CreateViewStatement |
( |
string |
viewName, |
|
|
IEnumerable< string > |
columnNames, |
|
|
SqlQueryExpression |
queryExpression |
|
) |
| |
|
inline |
Definition at line 34 of file CreateViewStatement.cs.
36 throw new ArgumentNullException(
"viewName");
37 if (queryExpression == null)
38 throw new ArgumentNullException(
"queryExpression");
SqlQueryExpression QueryExpression
IEnumerable< string > ColumnNames
IStatement IPreparableStatement. Deveel.Data.Sql.Statements.CreateViewStatement.Prepare |
( |
IRequest |
context | ) |
|
|
inlineprivate |
Implements Deveel.Data.Sql.Statements.IPreparableStatement.
Definition at line 53 of file CreateViewStatement.cs.
54 var viewName = context.Query.ResolveTableName(
ViewName);
63 int sz = colList.Length;
64 var originalNames = queryFrom.GetResolvedColumns();
65 var newColumnNames =
new ObjectName[originalNames.Length];
68 if (sz != originalNames.Length)
69 throw new InvalidOperationException(
"Column list is not the same size as the columns selected.");
71 for (
int i = 0; i < sz; ++i) {
72 var colName = colList[i];
73 newColumnNames[i] =
new ObjectName(viewName, colName);
76 sz = originalNames.Length;
77 for (
int i = 0; i < sz; ++i) {
78 newColumnNames[i] =
new ObjectName(viewName, originalNames[i].Name);
83 for (
int i = 0; i < sz; ++i) {
84 var columnName = newColumnNames[i];
85 for (
int n = i + 1; n < sz; ++n) {
86 if (newColumnNames[n].Equals(columnName))
87 throw new InvalidOperationException(
String.Format(
"Duplicate column name '{0}' in view. A view may not contain duplicate column names.", columnName));
92 queryPlan =
new SubsetNode(queryPlan, originalNames, newColumnNames);
A long string in the system.
SqlQueryExpression QueryExpression
static QueryExpressionFrom Create(IRequest context, SqlQueryExpression expression)
IEnumerable< string > ColumnNames
IEnumerable<string> Deveel.Data.Sql.Statements.CreateViewStatement.ColumnNames |
|
getprivate set |
bool Deveel.Data.Sql.Statements.CreateViewStatement.ReplaceIfExists |
|
getset |
string Deveel.Data.Sql.Statements.CreateViewStatement.ViewName |
|
getprivate set |
The documentation for this class was generated from the following file:
- /var/calculate/remote/distfiles/egit-src/deveeldb.git/src/deveeldb/Deveel.Data.Sql.Statements/CreateViewStatement.cs