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

Public Member Functions

 DeclareCursorStatement (string cursorName, SqlQueryExpression queryExpression)
 
 DeclareCursorStatement (string cursorName, IEnumerable< CursorParameter > parameters, SqlQueryExpression queryExpression)
 
 DeclareCursorStatement (string cursorName, CursorFlags flags, SqlQueryExpression queryExpression)
 
 DeclareCursorStatement (string cursorName, IEnumerable< CursorParameter > parameters, CursorFlags flags, SqlQueryExpression queryExpression)
 
- Public Member Functions inherited from Deveel.Data.Sql.Statements.SqlStatement
ITable Execute (IRequest context)
 Prepares and evaluates this statement into a tabular result. More...
 

Protected Member Functions

override void GetData (SerializeData data)
 
override void ExecuteStatement (ExecutionContext context)
 
- Protected Member Functions inherited from Deveel.Data.Sql.Statements.SqlStatement
 SqlStatement ()
 
 SqlStatement (ObjectData data)
 

Properties

string CursorName [get, private set]
 
SqlQueryExpression QueryExpression [get, private set]
 
CursorFlags Flags [get, set]
 
IEnumerable< CursorParameterParameters [get, 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

 DeclareCursorStatement (ObjectData data)
 

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)
 
- Package Functions inherited from Deveel.Data.Sql.Statements.SqlStatement
void SetSource (SqlQuery query)
 

Detailed Description

Definition at line 31 of file DeclareCursorStatement.cs.

Constructor & Destructor Documentation

Deveel.Data.Sql.Statements.DeclareCursorStatement.DeclareCursorStatement ( string  cursorName,
SqlQueryExpression  queryExpression 
)
inline

Definition at line 32 of file DeclareCursorStatement.cs.

33  : this(cursorName, null, queryExpression) {
34  }
Deveel.Data.Sql.Statements.DeclareCursorStatement.DeclareCursorStatement ( string  cursorName,
IEnumerable< CursorParameter parameters,
SqlQueryExpression  queryExpression 
)
inline

Definition at line 36 of file DeclareCursorStatement.cs.

37  : this(cursorName, parameters, CursorFlags.Insensitive, queryExpression) {
38  }
Deveel.Data.Sql.Statements.DeclareCursorStatement.DeclareCursorStatement ( string  cursorName,
CursorFlags  flags,
SqlQueryExpression  queryExpression 
)
inline

Definition at line 40 of file DeclareCursorStatement.cs.

41  : this(cursorName, null, flags, queryExpression) {
42  }
Deveel.Data.Sql.Statements.DeclareCursorStatement.DeclareCursorStatement ( string  cursorName,
IEnumerable< CursorParameter parameters,
CursorFlags  flags,
SqlQueryExpression  queryExpression 
)
inline

Definition at line 44 of file DeclareCursorStatement.cs.

44  {
45  if (queryExpression == null)
46  throw new ArgumentNullException("queryExpression");
47  if (String.IsNullOrEmpty(cursorName))
48  throw new ArgumentNullException("cursorName");
49 
50  CursorName = cursorName;
51  Parameters = parameters;
52  Flags = flags;
53  QueryExpression = queryExpression;
54  }
A long string in the system.
Deveel.Data.Sql.Statements.DeclareCursorStatement.DeclareCursorStatement ( ObjectData  data)
inlineprivate

Definition at line 56 of file DeclareCursorStatement.cs.

56  {
57  CursorName = data.GetString("CursorName");
58  QueryExpression = data.GetValue<SqlQueryExpression>("QueryExpression");
59  Flags = (CursorFlags) data.GetInt32("Flags");
60 
61  if (data.HasValue("Parameters")) {
62  var parameters = data.GetValue<CursorParameter[]>("Parameters");
63  Parameters = new List<CursorParameter>(parameters);
64  }
65  }

Member Function Documentation

override void Deveel.Data.Sql.Statements.DeclareCursorStatement.ExecuteStatement ( ExecutionContext  context)
inlineprotectedvirtual

Reimplemented from Deveel.Data.Sql.Statements.SqlStatement.

Definition at line 86 of file DeclareCursorStatement.cs.

86  {
87  var cursorInfo = new CursorInfo(CursorName, Flags, QueryExpression);
88  if (Parameters != null) {
89  foreach (var parameter in Parameters) {
90  cursorInfo.Parameters.Add(parameter);
91  }
92  }
93 
94  context.Request.Query.DeclareCursor(cursorInfo);
95  }
override void Deveel.Data.Sql.Statements.DeclareCursorStatement.GetData ( SerializeData  data)
inlineprotectedvirtual

Reimplemented from Deveel.Data.Sql.Statements.SqlStatement.

Definition at line 75 of file DeclareCursorStatement.cs.

75  {
76  data.SetValue("CursorName", CursorName);
77  data.SetValue("QueryExpression", QueryExpression);
78  data.SetValue("Flags", (int)Flags);
79 
80  if (Parameters != null) {
81  var parameters = Parameters.ToArray();
82  data.SetValue("Parameters", parameters);
83  }
84  }
void SetValue(string key, Type type, object value)

Property Documentation

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

Definition at line 67 of file DeclareCursorStatement.cs.

CursorFlags Deveel.Data.Sql.Statements.DeclareCursorStatement.Flags
getset

Definition at line 71 of file DeclareCursorStatement.cs.

IEnumerable<CursorParameter> Deveel.Data.Sql.Statements.DeclareCursorStatement.Parameters
getset

Definition at line 73 of file DeclareCursorStatement.cs.

SqlQueryExpression Deveel.Data.Sql.Statements.DeclareCursorStatement.QueryExpression
getprivate set

Definition at line 69 of file DeclareCursorStatement.cs.


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