protected override Expression VisitCollate(CollateExpression collateExpresion) { Check.NotNull(collateExpresion, nameof(collateExpresion)); Visit(collateExpresion.Operand); _relationalCommandBuilder .Append(" COLLATE ") .Append(collateExpresion.Collation); return(collateExpresion); }
protected override Expression VisitCollate(CollateExpression collateExpression) { Check.NotNull(collateExpression, nameof(collateExpression)); var parentOptimize = _optimize; _optimize = false; var operand = (SqlExpression)Visit(collateExpression.Operand); _optimize = parentOptimize; return(ApplyConversion(collateExpression.Update(operand), condition: false)); }
public virtual SqlExpression ApplyTypeMapping(SqlExpression sqlExpression, RelationalTypeMapping typeMapping) { if (sqlExpression == null || sqlExpression.TypeMapping != null) { return(sqlExpression); } return(sqlExpression switch { CaseExpression e => ApplyTypeMappingOnCase(e, typeMapping), CollateExpression e => ApplyTypeMappingOnCollate(e, typeMapping), LikeExpression e => ApplyTypeMappingOnLike(e), SqlBinaryExpression e => ApplyTypeMappingOnSqlBinary(e, typeMapping), SqlUnaryExpression e => ApplyTypeMappingOnSqlUnary(e, typeMapping), SqlConstantExpression e => e.ApplyTypeMapping(typeMapping), SqlFragmentExpression e => e, SqlFunctionExpression e => e.ApplyTypeMapping(typeMapping), SqlParameterExpression e => e.ApplyTypeMapping(typeMapping), _ => sqlExpression });
/// <inheritdoc /> public virtual SqlExpression ApplyTypeMapping(SqlExpression sqlExpression, RelationalTypeMapping typeMapping) { #pragma warning disable IDE0046 // Convert to conditional expression if (sqlExpression == null #pragma warning restore IDE0046 // Convert to conditional expression || sqlExpression.TypeMapping != null) { return(sqlExpression); } return(sqlExpression switch { CaseExpression e => ApplyTypeMappingOnCase(e, typeMapping), CollateExpression e => ApplyTypeMappingOnCollate(e, typeMapping), LikeExpression e => ApplyTypeMappingOnLike(e), SqlBinaryExpression e => ApplyTypeMappingOnSqlBinary(e, typeMapping), SqlUnaryExpression e => ApplyTypeMappingOnSqlUnary(e, typeMapping), SqlConstantExpression e => e.ApplyTypeMapping(typeMapping), SqlFragmentExpression e => e, SqlFunctionExpression e => e.ApplyTypeMapping(typeMapping), SqlParameterExpression e => e.ApplyTypeMapping(typeMapping), _ => sqlExpression });
/// <summary> /// Visits the children of the collate expression. /// </summary> /// <param name="collateExpression"> The expression to visit. </param> /// <returns> The modified expression, if it or any subexpression was modified; otherwise, returns the original expression. </returns> protected abstract Expression VisitCollate([NotNull] CollateExpression collateExpression);
/// <summary> /// Visits the children of the collate expression. /// </summary> /// <param name="collateExpression"> The expression to visit. </param> /// <returns> The modified expression, if it or any subexpression was modified; otherwise, returns the original expression. </returns> protected abstract Expression VisitCollate(CollateExpression collateExpression);
public virtual void Visit(CollateExpression node) { VisitInternal(node.StringValue); }
public void Visit(CollateExpression node) { VisitChild(2, false, false, node.StringValue); }
protected override Expression VisitCollate([NotNullAttribute] CollateExpression collateExpression) { throw new NotImplementedException(); }