protected internal override Expression VisitTypeFieldInit(TypeEntityExpression typeFie) { return(Expression.Condition( Expression.NotEqual(Visit(NullifyColumn(typeFie.ExternalId)), NullId), Expression.Constant(typeFie.TypeValue, typeof(Type)), NullType)); }
private static Expression TypeFieFieEquals(TypeEntityExpression typeFie1, TypeEntityExpression typeFie2) { if (typeFie1.TypeValue != typeFie2.TypeValue) { return(False); } return(Expression.And(NotEqualToNull(typeFie1.ExternalId), NotEqualToNull(typeFie2.ExternalId))); }
protected internal virtual Expression VisitTypeEntity(TypeEntityExpression typeFie) { var externalId = (PrimaryKeyExpression)Visit(typeFie.ExternalId); if (externalId != typeFie.ExternalId) { return(new TypeEntityExpression(externalId, typeFie.TypeValue)); } return(typeFie); }
private static Expression TypeFieIbEquals(TypeEntityExpression typeFie, TypeImplementedByExpression typeIb) { var externalId = typeIb.TypeImplementations.TryGetC(typeFie.TypeValue); if (externalId == null) { return(False); } return(Expression.And(NotEqualToNull(typeFie.ExternalId), 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); }
private bool IsCacheable(Expression newTypeId) { TypeEntityExpression tfie = newTypeId as TypeEntityExpression; if (tfie != null) { return(IsCached(tfie.TypeValue)); } TypeImplementedByExpression tibe = newTypeId as TypeImplementedByExpression; if (tibe != null) { return(tibe.TypeImplementations.All(t => IsCached(t.Key))); } return(false); }
protected internal override Expression VisitTypeEntity(TypeEntityExpression typeFie) { throw InvalidSqlExpression(typeFie); }
protected virtual bool CompareTypeFieldInit(TypeEntityExpression a, TypeEntityExpression b) { return(a.TypeValue == b.TypeValue && Compare(a.ExternalId, b.ExternalId)); }
protected internal override Expression VisitTypeFieldInit(TypeEntityExpression typeFie) { return(base.VisitTypeFieldInit(typeFie)); }
private static Expression TypeFieIbaEquals(TypeEntityExpression typeFie, TypeImplementedByAllExpression typeIba) { return Expression.And(NotEqualToNull(typeFie.ExternalId), EqualNullable(typeIba.TypeColumn, QueryBinder.TypeConstant(typeFie.TypeValue))); }
private static Expression TypeFieIbEquals(TypeEntityExpression typeFie, TypeImplementedByExpression typeIb) { var externalId = typeIb.TypeImplementations.TryGetC(typeFie.TypeValue); if (externalId == null) return False; return Expression.And(NotEqualToNull(typeFie.ExternalId), NotEqualToNull(externalId)); }
private static Expression TypeFieFieEquals(TypeEntityExpression typeFie1, TypeEntityExpression typeFie2) { if (typeFie1.TypeValue != typeFie2.TypeValue) return False; return Expression.And(NotEqualToNull(typeFie1.ExternalId), NotEqualToNull(typeFie2.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; }
protected virtual Expression VisitTypeFieldInit(TypeEntityExpression typeFie) { var externalId = Visit(typeFie.ExternalId); if (externalId != typeFie.ExternalId) return new TypeEntityExpression(externalId, typeFie.TypeValue); return typeFie; }
protected override Expression VisitTypeFieldInit(TypeEntityExpression typeFie) { return base.VisitTypeFieldInit(typeFie); }
private static Expression TypeFieIbaEquals(TypeEntityExpression typeFie, TypeImplementedByAllExpression typeIba) { return(Expression.And(NotEqualToNull(typeFie.ExternalId), EqualNullable(typeIba.TypeColumn, QueryBinder.TypeConstant(typeFie.TypeValue)))); }
protected override Expression VisitTypeFieldInit(TypeEntityExpression typeFie) { throw InvalidSqlExpression(typeFie); }