18 using System.Collections.Generic;
29 namespace Deveel.Data.Sql.Statements {
33 : this(cursorName, null, queryExpression) {
41 : this(cursorName, null, flags, queryExpression) {
45 if (queryExpression == null)
46 throw new ArgumentNullException(
"queryExpression");
47 if (String.IsNullOrEmpty(cursorName))
48 throw new ArgumentNullException(
"cursorName");
50 CursorName = cursorName;
51 Parameters = parameters;
53 QueryExpression = queryExpression;
57 CursorName = data.
GetString(
"CursorName");
63 Parameters =
new List<CursorParameter>(parameters);
67 public string CursorName {
get;
private set; }
73 public IEnumerable<CursorParameter> Parameters {
get; set; }
76 data.
SetValue(
"CursorName", CursorName);
77 data.
SetValue(
"QueryExpression", QueryExpression);
80 if (Parameters != null) {
81 var parameters = Parameters.ToArray();
82 data.
SetValue(
"Parameters", parameters);
87 var cursorInfo =
new CursorInfo(CursorName, Flags, QueryExpression);
88 if (Parameters != null) {
89 foreach (var parameter
in Parameters) {
90 cursorInfo.Parameters.Add(parameter);
DeclareCursorStatement(string cursorName, IEnumerable< CursorParameter > parameters, CursorFlags flags, SqlQueryExpression queryExpression)
override void ExecuteStatement(ExecutionContext context)
void SetValue(string key, Type type, object value)
Represents the foundation class of SQL statements to be executed.
DeclareCursorStatement(string cursorName, CursorFlags flags, SqlQueryExpression queryExpression)
DeclareCursorStatement(string cursorName, SqlQueryExpression queryExpression)
DeclareCursorStatement(ObjectData data)
object GetValue(string key)
override void GetData(SerializeData data)
bool HasValue(string key)
string GetString(string key)
DeclareCursorStatement(string cursorName, IEnumerable< CursorParameter > parameters, SqlQueryExpression queryExpression)