/// <summary> /// Adds the elements of an array to the end of this SoqlExpressionCollection. /// </summary> /// <param name="items"> /// The array whose elements are to be added to the end of this SoqlExpressionCollection. /// </param> public virtual void AddRange(SoqlExpression[] items) { foreach (SoqlExpression item in items) { this.List.Add(item); } }
public SoodaOrderBy(SoqlExpression expression, SortOrder sortOrder) { SoodaObjectExpressionComparer ec = new SoodaObjectExpressionComparer(); ec.AddExpression(expression, sortOrder); _comparer = ec; }
private void AssertInvolved(string rootClassName, string expression, params string[] expectedClassNames) { SoqlExpression expr = SoqlParser.ParseExpression(expression); ClassInfo rootClass = _DatabaseSchema.GetSchema().FindClassByName(rootClassName); GetInvolvedClassesVisitor visitor = new GetInvolvedClassesVisitor(rootClass); expr.Accept(visitor); CollectionAssert.AreEquivalent(expectedClassNames, visitor.ClassNames); }
private void AssertExpression(string s, object expectedValue) { SoqlExpression expr = SoqlParser.ParseExpression(s); SoqlPrettyPrinter pp = new SoqlPrettyPrinter(Console.Out); pp.PrintExpression(expr); object val = expr.Evaluate(null); Console.WriteLine(" = {0} (expected {1})", val, expectedValue); Assert.AreEqual(expectedValue, val); }
public SoodaOrderBy(SoodaOrderBy other, SoqlExpression expression, SortOrder sortOrder) { SoodaObjectExpressionComparer ec = new SoodaObjectExpressionComparer(); if (other != null) { ec.AddExpressions(other._comparer); } ec.AddExpression(expression, sortOrder); _comparer = ec; }
public override object Evaluate(ISoqlEvaluateContext context) { object val = condition.Evaluate(context); if (val == null) { return(null); } SoqlExpression expr = (bool)val ? ifTrue : ifFalse; if (expr == null) { return(null); } return(expr.Evaluate(context)); }
/// <summary> /// Initializes a new instance of the SoqlExpressionCollection class, containing elements /// copied from an array. /// </summary> /// <param name="items"> /// The array whose elements are to be added to the new SoqlExpressionCollection. /// </param> public SoqlExpressionCollection(SoqlExpression[] items) { this.AddRange(items); }
/// <summary> /// Inserts an element into the SoqlExpressionCollection at the specified index /// </summary> /// <param name="index"> /// The index at which the SoqlExpression is to be inserted. /// </param> /// <param name="value"> /// The SoqlExpression to insert. /// </param> public virtual void Insert(int index, SoqlExpression value) { this.List.Insert(index, value); }
/// <summary> /// Determines whether a specfic SoqlExpression value is in this SoqlExpressionCollection. /// </summary> /// <param name="value"> /// The SoqlExpression value to locate in this SoqlExpressionCollection. /// </param> /// <returns> /// true if value is found in this SoqlExpressionCollection; /// false otherwise. /// </returns> public virtual bool Contains(SoqlExpression value) { return this.List.Contains(value); }
public SoqlGuidWrapperExpression(SoqlExpression innerExpression) : base(innerExpression) { }
public void AddExpression(SoqlExpression expression, SortOrder sortOrder) { expressions.Add(new ExpressionCompareInfo(expression, sortOrder)); }
/// <summary> /// Return the zero-based index of the first occurrence of a specific value /// in this SoqlExpressionCollection /// </summary> /// <param name="value"> /// The SoqlExpression value to locate in the SoqlExpressionCollection. /// </param> /// <returns> /// The zero-based index of the first occurrence of the _ELEMENT value if found; /// -1 otherwise. /// </returns> public virtual int IndexOf(SoqlExpression value) { return(this.List.IndexOf(value)); }
public SoqlImageWrapperExpression(SoqlExpression innerExpression) : base(innerExpression) { }
public SoqlTimeSpanWrapperExpression(SoqlExpression innerExpression) : base(innerExpression) { }
public SoqlStringWrapperExpression(SoqlExpression innerExpression) : base(innerExpression) { }
protected Sooda.QL.TypedWrappers.SoqlBooleanWrapperExpression ContainsImpl(SoqlExpression expr) { return(new SoqlBooleanWrapperExpression(new SoqlContainsExpression(_left, _collectionName, expr))); }
public SoqlDoubleWrapperExpression(SoqlExpression innerExpression) : base(innerExpression) { }
public SoqlImageWrapperExpression(SoqlExpression innerExpression) : base(innerExpression) { }
/// <summary> /// Adds an instance of type SoqlExpression to the end of this SoqlExpressionCollection. /// </summary> /// <param name="value"> /// The SoqlExpression to be added to the end of this SoqlExpressionCollection. /// </param> public virtual void Add(SoqlExpression value) { this.List.Add(value); }
public SoqlSingleWrapperExpression(SoqlExpression innerExpression) : base(innerExpression) { }
/// <summary> /// Removes the first occurrence of a specific SoqlExpression from this SoqlExpressionCollection. /// </summary> /// <param name="value"> /// The SoqlExpression value to remove from this SoqlExpressionCollection. /// </param> public virtual void Remove(SoqlExpression value) { this.List.Remove(value); }
public SoqlInt16WrapperExpression(SoqlExpression innerExpression) : base(innerExpression) { }
public SoqlInt32WrapperExpression(SoqlExpression innerExpression) : base(innerExpression) { }
public SoqlNullableSingleWrapperExpression(SoqlExpression innerExpression) : base(innerExpression) { }
public SoqlNullableDecimalWrapperExpression(SoqlExpression innerExpression) : base(innerExpression) { }
public SoqlBooleanWrapperExpression(SoqlExpression innerExpression) { _innerExpression = innerExpression; }
/// <summary> /// Adds an instance of type SoqlExpression to the end of this SoqlExpressionCollection. /// </summary> /// <param name="value"> /// The SoqlExpression to be added to the end of this SoqlExpressionCollection. /// </param> public virtual void Add(SoqlExpression value) { this.List.Add(value); }
public SoqlBooleanIsNullExpression(SoqlExpression expr, bool notnull) { this.Expr = expr; this.NotNull = notnull; }
/// <summary> /// Return the zero-based index of the first occurrence of a specific value /// in this SoqlExpressionCollection /// </summary> /// <param name="value"> /// The SoqlExpression value to locate in the SoqlExpressionCollection. /// </param> /// <returns> /// The zero-based index of the first occurrence of the _ELEMENT value if found; /// -1 otherwise. /// </returns> public virtual int IndexOf(SoqlExpression value) { return this.List.IndexOf(value); }
public SoqlNullableDateTimeWrapperExpression(SoqlExpression innerExpression) : base(innerExpression) { }
/// <summary> /// Removes the first occurrence of a specific SoqlExpression from this SoqlExpressionCollection. /// </summary> /// <param name="value"> /// The SoqlExpression value to remove from this SoqlExpressionCollection. /// </param> public virtual void Remove(SoqlExpression value) { this.List.Remove(value); }
public ISoodaObjectList Sort(SoqlExpression expression, SortOrder sortOrder) { return(new SoodaObjectListSnapshot(this).Sort(expression, sortOrder)); }
public SoqlBooleanIsNullExpression(SoqlExpression expr, bool notnull) { this.Expr = expr; this.NotNull = notnull; }
public ISoodaObjectList Sort(SoqlExpression expression) { return(new SoodaObjectListSnapshot(this).Sort(expression, SortOrder.Ascending)); }
public SoqlNullableGuidWrapperExpression(SoqlExpression innerExpression) : base(innerExpression) { }
public SoqlBooleanWrapperExpression(SoqlExpression innerExpression) { _innerExpression = innerExpression; }
/// <summary> /// Determines whether a specfic SoqlExpression value is in this SoqlExpressionCollection. /// </summary> /// <param name="value"> /// The SoqlExpression value to locate in this SoqlExpressionCollection. /// </param> /// <returns> /// true if value is found in this SoqlExpressionCollection; /// false otherwise. /// </returns> public virtual bool Contains(SoqlExpression value) { return(this.List.Contains(value)); }
public SoqlStringWrapperExpression(SoqlExpression innerExpression) : base(innerExpression) { }
/// <summary> /// Inserts an element into the SoqlExpressionCollection at the specified index /// </summary> /// <param name="index"> /// The index at which the SoqlExpression is to be inserted. /// </param> /// <param name="value"> /// The SoqlExpression to insert. /// </param> public virtual void Insert(int index, SoqlExpression value) { this.List.Insert(index, value); }
public SoqlTypedWrapperExpression(SoqlExpression innerExpression) { _innerExpression = innerExpression; }
public static SoodaOrderBy Descending(SoqlExpression expression) { return(new SoodaOrderBy(expression, SortOrder.Descending)); }
public SoqlConditionalExpression(SoqlBooleanExpression condition, SoqlExpression ifTrue, SoqlExpression ifFalse) { this.condition = condition; this.ifTrue = ifTrue; this.ifFalse = ifFalse; }
public SoqlConditionalExpression(SoqlBooleanExpression condition, SoqlExpression ifTrue, SoqlExpression ifFalse) { this.condition = condition; this.ifTrue = ifTrue; this.ifFalse = ifFalse; }
public static SoodaOrderBy FromExpression(SoqlExpression sortExpression) { return(FromExpression(sortExpression, SortOrder.Ascending)); }
public SoqlNullableTimeSpanWrapperExpression(SoqlExpression innerExpression) : base(innerExpression) { }
public static SoodaOrderBy FromExpression(SoqlExpression sortExpression, SortOrder sortOrder) { return(new SoodaOrderBy(sortExpression, sortOrder)); }
public ExpressionCompareInfo(SoqlExpression expression, SortOrder sortOrder) { this.Expression = expression; this.SortOrder = sortOrder; }
public SoqlNullableInt32WrapperExpression(SoqlExpression innerExpression) : base(innerExpression) { }
public SoqlNullableDecimalWrapperExpression(SoqlExpression innerExpression) : base(innerExpression) { }
public SoqlNullableBooleanWrapperExpression(SoqlExpression innerExpression) : base(innerExpression) { }
protected Sooda.QL.TypedWrappers.SoqlBooleanWrapperExpression ContainsImpl(SoqlExpression expr) { return new SoqlBooleanWrapperExpression(new SoqlContainsExpression(_left, _collectionName, expr)); }
public SoqlNullableDateTimeWrapperExpression(SoqlExpression innerExpression) : base(innerExpression) { }