public void interpretQuery(Context context, IQueryBuilder builder) { AttributeDeclaration decl = left.CheckAttribute(context); if (decl == null || !decl.Storable) { throw new SyntaxError("Unable to interpret predicate"); } IValue value = right.interpret(context); AttributeInfo info = decl.getAttributeInfo(); if (value is IInstance) { value = ((IInstance)value).GetMemberValue(context, "dbId", false); } MatchOp matchOp = getMatchOp(); builder.Verify(info, matchOp, value == null ? null : value.GetStorableData()); switch (oper) { case CmpOp.GTE: case CmpOp.LTE: builder.Not(); break; } }
public void interpretQuery(Context context, IQueryBuilder builder) { AttributeDeclaration decl = left.CheckAttribute(context); if (decl == null || !decl.Storable) { throw new SyntaxError("Unable to interpret predicate"); } IValue value = right.interpret(context); if (value is IInstance) { value = ((IInstance)value).GetMemberValue(context, "dbId", false); } AttributeInfo info = decl.getAttributeInfo(); Object data = value == null ? null : value.GetStorableData(); MatchOp match = GetMatchOp(); builder.Verify <Object>(info, match, data); if (oper == EqOp.NOT_EQUALS || oper == EqOp.IS_NOT || oper == EqOp.NOT_CONTAINS) { builder.Not(); } }
public void interpretQuery(Context context, IQueryBuilder builder) { AttributeDeclaration decl = left.CheckAttribute(context); if (decl == null || !decl.Storable) { throw new SyntaxError("Unable to interpret predicate"); } IValue value = right.interpret(context); MatchOp matchOp = getMatchOp(context, decl.getIType(), value.GetIType(), this.oper, false); if (value is IInstance) { value = ((IInstance)value).GetMemberValue(context, "dbId", false); } AttributeInfo info = decl.getAttributeInfo(); Object data = value == null ? null : value.GetStorableData(); builder.Verify <Object>(info, matchOp, data); if (oper.ToString().StartsWith("NOT_")) { builder.Not(); } }
public void Verify <T>(AttributeInfo info, MatchOp match, T fieldValue) { predicates.Push(new MatchesPredicate <T>(info, match, fieldValue)); }
/// <summary> /// Constructor for non-root node /// </summary> internal MatchTask(MatchTask<P_IN, P_OUT> parent, Spliterator<P_IN> spliterator) : base(parent, spliterator) { this.Op = parent.Op; }
/// <summary> /// Constructor for root node /// </summary> internal MatchTask(MatchOp<P_OUT> op, PipelineHelper<P_OUT> helper, Spliterator<P_IN> spliterator) : base(helper, spliterator) { this.Op = op; }
public MatchesPredicate(AttributeInfo info, MatchOp match, T value) { this.info = info; this.match = match; this.value = value; }
public void Verify <T>(AttributeInfo info, MatchOp match, T fieldValue) { query.Verify(info, match, fieldValue); }