DeveelDB  20151217
complete SQL database system, primarly developed for .NET/Mono frameworks
Classes | Public Member Functions | Properties | Private Member Functions | List of all members
Deveel.Data.Sql.Statements.UpdateFromCursorStatement Class Reference
Inheritance diagram for Deveel.Data.Sql.Statements.UpdateFromCursorStatement:
Deveel.Data.Sql.Statements.SqlStatement Deveel.Data.Sql.Statements.IPreparableStatement Deveel.Data.Sql.Statements.IStatement Deveel.Data.Serialization.ISerializable Deveel.Data.Sql.Statements.IStatement Deveel.Data.Sql.IExecutable Deveel.Data.Sql.IExecutable

Classes

class  Prepared
 

Public Member Functions

 UpdateFromCursorStatement (ObjectName tableName, string cursorName)
 
- Public Member Functions inherited from Deveel.Data.Sql.Statements.SqlStatement
ITable Execute (IRequest context)
 Prepares and evaluates this statement into a tabular result. More...
 

Properties

ObjectName TableName [get, private set]
 
string CursorName [get, private set]
 
- Properties inherited from Deveel.Data.Sql.Statements.SqlStatement
SqlQuery SourceQuery [get, set]
 Gets the SqlQuery that is the origin of this statement. More...
 
bool IsFromQuery [get, private set]
 Gets a boolean value indicating if this object was formed from the parsing of a SqlQuery or if it was manually created. More...
 
- Properties inherited from Deveel.Data.Sql.Statements.IStatement
SqlQuery SourceQuery [get]
 

Private Member Functions

IStatement IPreparableStatement. Prepare (IRequest request)
 

Additional Inherited Members

- Static Public Member Functions inherited from Deveel.Data.Sql.Statements.SqlStatement
static IEnumerable< SqlStatementParse (string sqlSource)
 Parses a given string into one of more statements. More...
 
static IEnumerable< SqlStatementParse (IContext context, string sqlSource)
 Parses a given string into one of more statements. More...
 
static IEnumerable< SqlStatementParse (IContext context, SqlQuery query)
 
- Protected Member Functions inherited from Deveel.Data.Sql.Statements.SqlStatement
 SqlStatement ()
 
 SqlStatement (ObjectData data)
 
virtual void ExecuteStatement (ExecutionContext context)
 
virtual void GetData (SerializeData data)
 
- Package Functions inherited from Deveel.Data.Sql.Statements.SqlStatement
void SetSource (SqlQuery query)
 

Detailed Description

Definition at line 10 of file UpdateFromCursorStatement.cs.

Constructor & Destructor Documentation

Deveel.Data.Sql.Statements.UpdateFromCursorStatement.UpdateFromCursorStatement ( ObjectName  tableName,
string  cursorName 
)
inline

Definition at line 11 of file UpdateFromCursorStatement.cs.

11  {
12  if (tableName == null)
13  throw new ArgumentNullException("tableName");
14  if (String.IsNullOrEmpty(cursorName))
15  throw new ArgumentNullException("cursorName");
16 
17  TableName = tableName;
18  CursorName = cursorName;
19  }
A long string in the system.

Member Function Documentation

IStatement IPreparableStatement. Deveel.Data.Sql.Statements.UpdateFromCursorStatement.Prepare ( IRequest  request)
inlineprivate

Implements Deveel.Data.Sql.Statements.IPreparableStatement.

Definition at line 25 of file UpdateFromCursorStatement.cs.

25  {
26  var cursor = request.FindCursor(CursorName);
27  if (cursor == null)
28  throw new ObjectNotFoundException(new ObjectName(CursorName), "The source cursor was not found.");
29 
30  var tableName = request.Query.ResolveTableName(TableName);
31  if (tableName == null)
32  throw new ObjectNotFoundException(TableName);
33 
34  var table = request.Query.GetMutableTable(tableName);
35  if (table == null)
36  throw new ObjectNotFoundException(tableName);
37 
38  var columns = table.TableInfo.Select(x => new ObjectName(tableName, x.ColumnName));
39 
40  var queryExpression = cursor.QueryExpression;
41  var queryFrom = QueryExpressionFrom.Create(request, queryExpression);
42 
43  var assignments = new List<SqlColumnAssignment>();
44  foreach (var column in columns) {
45  // TODO:
46  }
47 
48  // TODO: get the columns from the table and the columns exposed by the cursor
49  // and then make a set of assignments
50  throw new NotImplementedException();
51  }
static QueryExpressionFrom Create(IRequest context, SqlQueryExpression expression)

Property Documentation

string Deveel.Data.Sql.Statements.UpdateFromCursorStatement.CursorName
getprivate set

Definition at line 23 of file UpdateFromCursorStatement.cs.

ObjectName Deveel.Data.Sql.Statements.UpdateFromCursorStatement.TableName
getprivate set

Definition at line 21 of file UpdateFromCursorStatement.cs.


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