private static FilterTree createDefaultExpression(string property, int exprType, int opType, int constType, string constant) { SQLTree root = new SQLTree(exprType); SQLTree op = new SQLTree(opType); SQLTree id = new SQLTree(new CommonToken(SQLFilterLexer.ID, property)); SQLTree constNode = new SQLTree(new CommonToken(constType, constant)); op.AddChild(id); op.AddChild(constNode); root.AddChild(op); constNode.MarkAsDirty(); id.IsDirty = true; root.IsLeaf = true; return(root); }
private static SQLTree createDefaultStringExpression(string property) { SQLTree root = new SQLTree(SQLFilterLexer.STRING_EXPR); StringTree op = new StringTree(StringPatternLexer.IS); SQLTree id = new SQLTree(new CommonToken(SQLFilterLexer.ID, property)); StringTree constant = new StringTree(new CommonToken(StringPatternLexer.TEXT, "")); op.AddChild(id); op.AddChild(constant); root.AddChild(op); constant.MarkAsDirty(); id.IsDirty = true; root.IsLeaf = true; return(root); }