void BuildSql(string field_type, MemberNode memberNode, ValueNode valueNode, ExpressionType op) { if(valueNode.Value == null) { ResolveNullValue(memberNode, op); } else { _builder.QueryByField(field_type/*memberNode.TableName*/, memberNode.TableName, memberNode.FieldName, _operationDictionary[op], valueNode.Value); } }
void BuildSql(MemberNode leftMember, MemberNode rightMember, ExpressionType op) { _builder.QueryByFieldComparison(leftMember.TableName, leftMember.FieldName, _operationDictionary[op], rightMember.TableName, rightMember.FieldName); }
void BuildSql(ValueNode valueNode, MemberNode memberNode, ExpressionType op) { BuildSql(memberNode, valueNode, op); }
void BuildSql(string field_type, MemberNode memberNode) { _builder.QueryByField(field_type, memberNode.TableName , memberNode.FieldName, _operationDictionary[ExpressionType.Equal], true); }
void ResolveNullValue(MemberNode memberNode, ExpressionType op) { switch (op) { case ExpressionType.Equal: _builder.QueryByFieldNull(memberNode.TableName, memberNode.FieldName); break; case ExpressionType.NotEqual: _builder.QueryByFieldNotNull(memberNode.TableName, memberNode.FieldName); break; } }