private static Expression TypeConstantConstantEquals(ConstantExpression c1, ConstantExpression c2) { if (c1.IsNull()) { if (c2.IsNull()) { return(True); } else { return(False); } } else { if (c2.IsNull()) { return(False); } if (c1.Value.Equals(c2.Value)) { return(True); } else { return(False); } } }
private static Expression TypeConstantIbaEquals(ConstantExpression ce, TypeImplementedByAllExpression typeIba) { if (ce.IsNull()) { return(EqualsToNull(typeIba.TypeColumn)); } return(EqualNullable(QueryBinder.TypeConstant((Type)ce.Value), typeIba.TypeColumn.Value)); }
private static Expression TypeConstantIbEquals(ConstantExpression ce, TypeImplementedByExpression typeIb) { if (ce.IsNull()) { return(typeIb.TypeImplementations.Select(imp => EqualsToNull(imp.Value)).AggregateAnd()); } Type type = (Type)ce.Value; var externalId = typeIb.TypeImplementations.TryGetC(type); return(NotEqualToNull(externalId)); }
private static Expression TypeConstantFieEquals(ConstantExpression ce, TypeEntityExpression typeFie) { if (ce.IsNull()) { return(EqualsToNull(typeFie.ExternalId)); } if (((Type)ce.Value == typeFie.TypeValue)) { return(NotEqualToNull(typeFie.ExternalId)); } return(False); }