19 using System.Collections.Generic;
23 namespace Deveel.Data.Sql.Objects {
43 if (expressions == null) {
44 this.expressions = null;
48 Array.Copy(expressions, this.expressions, expressions.Length);
52 int IComparable.CompareTo(
object obj) {
53 throw new NotSupportedException();
56 int IComparable<ISqlObject>.CompareTo(
ISqlObject other) {
57 throw new NotSupportedException();
60 public bool IsNull {
get;
private set; }
71 return expressions.Length;
81 throw new NullReferenceException(
"The array is null");
102 get {
return GetValue(index); }
125 if (index < 0 || index >= Length)
126 throw new ArgumentOutOfRangeException(
"index");
128 return expressions[index];
136 IEnumerator IEnumerable.GetEnumerator() {
137 return GetEnumerator();
157 array.AssertNotNull();
158 return ++index < length;
162 array.AssertNotNull();
165 length = array.Length;
170 array.AssertNotNull();
171 return array.GetValue(index);
175 object IEnumerator.Current {
176 get {
return Current; }
IEnumerator< SqlExpression > GetEnumerator()
int Length
Gets the length of the array.
Defines the contract for a valid SQL Object
readonly SqlExpression[] expressions
bool IsComparableTo(ISqlObject other)
Checks if the current object is comparable with the given one.
SqlExpression GetValue(int index)
Gets the expression at the given index of the array.
Enumerator(SqlArray array)
Defines the base class for instances that represent SQL expression tree nodes.
An object that provides methods for accessing a finite collection of SQL expressions.
SqlArray(SqlExpression[] expressions)
Constructs a new SqlArray on the given array of expressions.