本文整理汇总了C#中Deveel.Data.Sql.Expression.SetArgument方法的典型用法代码示例。如果您正苦于以下问题:C# Expression.SetArgument方法的具体用法?C# Expression.SetArgument怎么用?C# Expression.SetArgument使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Deveel.Data.Sql.Expression
的用法示例。
在下文中一共展示了Expression.SetArgument方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: InspectParam
private static void InspectParam(IGraphInspector inspector, Expression expression, string paramArg)
{
object paramVal = expression.GetArgument(paramArg);
if (paramVal != null && paramVal is Expression) {
Expression inspected = paramVal as Expression;
expression.SetArgument(paramArg, WalkGraph(inspected, inspector));
}
}
示例2: NormalizeReferences
private Expression NormalizeReferences(Expression op)
{
// Assert the operator is qualified
if (op.GetArgument("qualified") == null)
throw new ApplicationException("Operator is not qualified.");
// Perform the normalization
op = WalkGraph(op, new ReferenceQualifier(this));
// Mark up that we have successfully normalized the all
// definitions/references
op.SetArgument("normalized_def", true);
return op;
}
示例3: QualifyAgainstTableList
public Expression QualifyAgainstTableList(Expression expression, IList<TableName> tableNames)
{
// First pass qualifies the table names and expands out the output
// (globs, etc) on the exit.
expression = WalkGraph(expression, new TableQualifyInspector(this));
// Second pass qualifies all remaining references in the query, including
// forward and backward references in nested queries.
ExpressionQualifier qualifier = new ExpressionQualifier(this);
// If there's a base set of tables to qualify the expression against,
if (tableNames.Count > 0) {
// Make a var list for all the tables that represent the base
// qualifications
List<FetchVariableExpression> varList = new List<FetchVariableExpression>(4);
foreach (TableName t in tableNames) {
PopulateVariables(varList, t);
}
// Add the reference set to the qualifier
qualifier.AddReferences(varList);
}
// And qualify
expression = WalkGraph(expression, qualifier);
// Third pass, we perform type completion on the SELECT output and
// functions and verify the functions are correct.
expression = WalkGraph(expression, new SelectOutputTypeCompletion(this));
// Fourth pass, check functions,
expression = WalkGraph(expression, new AllFunctionTypeCompletion(this));
// Mark up that the expression has successfully qualified,
expression.SetArgument("qualified", true);
return expression;
}