24 namespace Deveel.Data.Sql.Statements {
32 CursorName = cursorName;
33 Arguments = arguments;
37 CursorName = data.
GetString(
"CursorName");
41 public string CursorName {
get;
private set; }
47 if (Arguments != null) {
50 for (
int i = 0; i < args.Length; i++) {
51 args[i] = args[i].
Prepare(preparer);
61 var cursor = context.
Query.FindCursor(CursorName);
66 var orderedParams = cursor.CursorInfo.Parameters.OrderBy(x => x.Offset).ToArray();
68 if (args.Length != orderedParams.Length)
69 throw new StatementPrepareException(String.Format(
"Invalid number of arguments for cursor '{0}' OPEN statement.", CursorName));
79 data.
SetValue(
"CursorName", CursorName);
80 data.
SetValue(
"Arguments", Arguments);
84 var cursor = context.
Request.
Query.FindCursor(CursorName);
86 throw new StatementException(String.Format(
"Cursor '{0}' was not found in the context.", CursorName));
88 cursor.Open(context.
Request, Arguments);
An exception that happens during the SqlStatement.Prepare(IExpressionPreparer, IQueryContext).
OpenStatement(string cursorName, SqlExpression[] arguments)
OpenStatement(string cursorName)
override void ExecuteStatement(ExecutionContext context)
void SetValue(string key, Type type, object value)
Represents the foundation class of SQL statements to be executed.
override void GetData(SerializeData data)
An interface used to prepare a SqlExpression object.
virtual SqlExpression Prepare(IExpressionPreparer preparer)
object Prepare(IExpressionPreparer preparer)
Converts the underlying value of this instance into an object that can be evaluated by an expression...
OpenStatement(ObjectData data)
object GetValue(string key)
IStatement Prepare(IRequest request)
Defines the base class for instances that represent SQL expression tree nodes.
A contract for objects that participate to a SqlExpression.Prepare phase of an expression evaluation...
string GetString(string key)