/// <summary> /// Creates a new instance of the <see cref="JoinExpressionBase" /> class. /// </summary> /// <param name="table"> A table source to join with. </param> protected JoinExpressionBase(TableExpressionBase table) : base(null) { Check.NotNull(table, nameof(table)); Table = table; }
/// <summary> /// Creates a new instance of the <see cref="PredicateJoinExpressionBase" /> class. /// </summary> /// <param name="table"> A table source to join with. </param> /// <param name="joinPredicate"> A predicate to use for the join. </param> protected PredicateJoinExpressionBase(TableExpressionBase table, SqlExpression joinPredicate) : base(table) { Check.NotNull(joinPredicate, nameof(joinPredicate)); JoinPredicate = joinPredicate; }
internal ColumnExpression(ProjectionExpression subqueryProjection, TableExpressionBase table) : this( subqueryProjection.Alias, table, subqueryProjection.Type, subqueryProjection.Expression.TypeMapping, IsNullableProjection(subqueryProjection)) { }
/// <summary> /// Creates a new expression that is like this one, but using the supplied children. If all of the children are the same, it will /// return this expression. /// </summary> /// <param name="table"> The <see cref="P:Table" /> property of the result. </param> /// <returns> This expression if no children changed, or an expression with the updated children. </returns> public virtual CrossApplyExpression Update(TableExpressionBase table) { Check.NotNull(table, nameof(table)); return(table != Table ? new CrossApplyExpression(table) : this); }
/// <summary> /// Creates a new expression that is like this one, but using the supplied children. If all of the children are the same, it will /// return this expression. /// </summary> /// <param name="table"> The <see cref="P:Table" /> property of the result. </param> /// <returns> This expression if no children changed, or an expression with the updated children. </returns> public virtual OuterApplyExpression Update([NotNull] TableExpressionBase table) { Check.NotNull(table, nameof(table)); return(table != Table ? new OuterApplyExpression(table) : this); }
/// <summary> /// Creates a new expression that is like this one, but using the supplied children. If all of the children are the same, it will /// return this expression. /// </summary> /// <param name="table"> The <see cref="P:Table" /> property of the result. </param> /// <param name="joinPredicate"> The <see cref="P:JoinPredicate" /> property of the result. </param> /// <returns> This expression if no children changed, or an expression with the updated children. </returns> public virtual InnerJoinExpression Update(TableExpressionBase table, SqlExpression joinPredicate) { Check.NotNull(table, nameof(table)); Check.NotNull(joinPredicate, nameof(joinPredicate)); return(table != Table || joinPredicate != JoinPredicate ? new InnerJoinExpression(table, joinPredicate) : this); }
internal ColumnExpression(IProperty property, IColumnBase column, TableExpressionBase table, bool nullable) : this( column?.Name ?? property.GetColumnName(), table, property.ClrType, property.GetRelationalTypeMapping(), nullable || (column?.IsNullable ?? property.IsColumnNullable())) { }
internal ColumnExpression(IProperty property, IColumnBase column, TableExpressionBase table, bool nullable) : this( column.Name, table, property.ClrType.UnwrapNullableType(), column.PropertyMappings.First(m => m.Property == property).TypeMapping, nullable || column.IsNullable) { }
internal ColumnExpression(IProperty property, TableExpressionBase table, bool nullable) : this( property.GetTableColumnMappings().Cast <IColumnMappingBase>().Concat(property.GetViewColumnMappings()) .FirstOrDefault()?.Column.Name // TODO: this should take table into account ?? property.GetColumnName(), table, property.ClrType, property.GetRelationalTypeMapping(), nullable || (property.GetTableColumnMappings().Cast <IColumnMappingBase>().Concat(property.GetViewColumnMappings()) .FirstOrDefault()?.Column.IsNullable // TODO: this should take table into account ?? property.IsColumnNullable())) { }
/// <summary> /// Creates a new instance of the <see cref="OuterApplyExpression" /> class. /// </summary> /// <param name="table"> A table source to OUTER APPLY with. </param> public OuterApplyExpression(TableExpressionBase table) : base(table) { }
/// <summary> /// Creates a new instance of the <see cref="OuterApplyExpression" /> class. /// </summary> /// <param name="table"> A table source to OUTER APPLY with. </param> public OuterApplyExpression([NotNull] TableExpressionBase table) : base(table) { }
public virtual CrossJoinExpression Update(TableExpressionBase table) => table != Table ? new CrossJoinExpression(table) : this;
/// <summary> /// Creates a new instance of the <see cref="CrossApplyExpression" /> class. /// </summary> /// <param name="table"> A table source to CROSS APPLY with. </param> public CrossApplyExpression(TableExpressionBase table) : base(table) { }
public virtual LeftJoinExpression Update(TableExpressionBase table, SqlExpression joinPredicate) => table != Table || joinPredicate != JoinPredicate ? new LeftJoinExpression(table, joinPredicate) : this;
/// <summary> /// Creates a new instance of the <see cref="InnerJoinExpression" /> class. /// </summary> /// <param name="table"> A table source to INNER JOIN with. </param> /// <param name="joinPredicate"> A predicate to use for the join. </param> public InnerJoinExpression(TableExpressionBase table, SqlExpression joinPredicate) : base(table, joinPredicate) { }
public InnerJoinLateralExpression(TableExpressionBase table) : base(table) { }
/// <summary> /// Creates a new instance of the <see cref="JoinExpressionBase" /> class. /// </summary> /// <param name="table">A table source to join with.</param> protected JoinExpressionBase(TableExpressionBase table) : base(null) { Table = table; }
public CrossJoinExpression(TableExpressionBase table) : base(table) { }
public virtual InnerJoinLateralExpression Update(TableExpressionBase table) => table != Table ? new InnerJoinLateralExpression(table) : this;
/// <summary> /// Creates a new instance of the <see cref="CrossJoinExpression" /> class. /// </summary> /// <param name="table"> A table source to CROSS JOIN with. </param> public CrossJoinExpression([NotNull] TableExpressionBase table) : base(table) { }
/// <summary> /// Creates a new instance of the <see cref="InnerJoinExpression" /> class. /// </summary> /// <param name="table"> A table source to INNER JOIN with. </param> /// <param name="joinPredicate"> A predicate to use for the join. </param> public InnerJoinExpression([NotNull] TableExpressionBase table, [NotNull] SqlExpression joinPredicate) : base(table, joinPredicate) { }
public LeftJoinLateralExpression(TableExpressionBase table) : base(table) { }
public CrossApplyExpression([NotNull] TableExpressionBase table) : base(table) { }
protected PredicateJoinExpressionBase(TableExpressionBase table, SqlExpression joinPredicate) : base(table) { JoinPredicate = joinPredicate; }
public virtual OuterApplyExpression Update(TableExpressionBase table) => table != Table ? new OuterApplyExpression(table) : this;
internal ColumnExpression(IProperty property, TableExpressionBase table, bool nullable) : this(property.GetColumnName(), table, property.ClrType, property.GetRelationalTypeMapping(), nullable || property.IsNullable || property.DeclaringEntityType.BaseType != null) { }