本文整理汇总了C#中Deveel.Data.Sql.Expression.UnsetCost方法的典型用法代码示例。如果您正苦于以下问题:C# Expression.UnsetCost方法的具体用法?C# Expression.UnsetCost怎么用?C# Expression.UnsetCost使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Deveel.Data.Sql.Expression
的用法示例。
在下文中一共展示了Expression.UnsetCost方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ClearGraph
public void ClearGraph(Expression expression)
{
// The graph should only have 'FETCHTABLE', 'JOIN', 'FILTER' and 'FUNCTION'
// operations in the graph. The FUNCTION expressions are themselves other
// costed operation graphs.
if (expression is FilterExpression) {
// Recurse to the child
ClearGraph(((FilterExpression)expression).Child);
} else if (expression is JoinExpression) {
JoinExpression joinExp = (JoinExpression) expression;
// Recurse the left and right nodes
ClearGraph(joinExp.Left);
ClearGraph(joinExp.Right);
} else if (expression is AliasTableNameExpression) {
} else if (expression is FunctionExpression) {
// This does not have costing information we should clear
return;
} else {
throw new ApplicationException("Unknown operation type in graph.");
}
// Clear the costing information
expression.UnsetCost();
}