本文整理汇总了C#中Deveel.Data.Sql.Expressions.SqlExpression.Accept方法的典型用法代码示例。如果您正苦于以下问题:C# SqlExpression.Accept方法的具体用法?C# SqlExpression.Accept怎么用?C# SqlExpression.Accept使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Deveel.Data.Sql.Expressions.SqlExpression
的用法示例。
在下文中一共展示了SqlExpression.Accept方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Visit
/// <summary>
/// Visits a given SQL expression.
/// </summary>
/// <param name="expression">The <see cref="SqlExpression"/> to visit.</param>
/// <returns>
/// Returns an instance of <see cref="SqlExpression"/> as result of the visit.
/// </returns>
public virtual SqlExpression Visit(SqlExpression expression)
{
if (expression == null)
return null;
var expressionType = expression.ExpressionType;
switch (expressionType) {
case SqlExpressionType.Add:
case SqlExpressionType.Subtract:
case SqlExpressionType.Divide:
case SqlExpressionType.Multiply:
case SqlExpressionType.Modulo:
case SqlExpressionType.And:
case SqlExpressionType.Or:
case SqlExpressionType.XOr:
case SqlExpressionType.Equal:
case SqlExpressionType.NotEqual:
case SqlExpressionType.Like:
case SqlExpressionType.NotLike:
case SqlExpressionType.GreaterThan:
case SqlExpressionType.GreaterOrEqualThan:
case SqlExpressionType.SmallerThan:
case SqlExpressionType.SmallerOrEqualThan:
case SqlExpressionType.Is:
case SqlExpressionType.IsNot:
return VisitBinary((SqlBinaryExpression) expression);
case SqlExpressionType.Negate:
case SqlExpressionType.Not:
case SqlExpressionType.UnaryPlus:
return VisitUnary((SqlUnaryExpression) expression);
case SqlExpressionType.Cast:
return VisitCast((SqlCastExpression) expression);
case SqlExpressionType.Reference:
return VisitReference((SqlReferenceExpression) expression);
case SqlExpressionType.VariableReference:
return VisitVariableReference((SqlVariableReferenceExpression) expression);
case SqlExpressionType.Assign:
return VisitAssign((SqlAssignExpression) expression);
case SqlExpressionType.FunctionCall:
return VisitFunctionCall((SqlFunctionCallExpression) expression);
case SqlExpressionType.Constant:
return VisitConstant((SqlConstantExpression) expression);
case SqlExpressionType.Conditional:
return VisitConditional((SqlConditionalExpression) expression);
case SqlExpressionType.Query:
return VisitQuery((SqlQueryExpression) expression);
case SqlExpressionType.Tuple:
return VisitTuple((SqlTupleExpression) expression);
case SqlExpressionType.All:
case SqlExpressionType.Any:
return VisitQuantified((SqlQuantifiedExpression) expression);
default:
return expression.Accept(this);
}
}