EFIngresProvider/SqlGen/SqlGenerator/SqlGeneratorDbExpressionVisitorMembers.cs
/// <summary>
/// This method determines whether an extent from an outer scope(free variable)
/// is used in the CurrentSelectStatement.
///
/// An extent in an outer scope, if its symbol is not in the FromExtents
/// of the CurrentSelectStatement.
/// </summary>
/// <param name="e"></param>
/// <returns>A <see cref="Symbol"/>.</returns>
This method determines whether an extent from an outer scope(free variable)
is used in the CurrentSelectStatement.

An extent in an outer scope, if its symbol is not in the FromExtents
of the CurrentSelectStatement.
This method determines whether an extent from an outer scope ( free variable ) is used in the CurrentSelectStatement . An extent in an outer scope if its symbol is not in the FromExtents of the CurrentSelectStatement .
public override ISqlFragment Visit(DbVariableReferenceExpression e)
        {
            if (isVarRefSingle)
            {
                throw new NotSupportedException();
            }
            isVarRefSingle = true; 
            var result = symbolTable.Lookup(e.VariableName);
            if (!CurrentSelectStatement.FromExtents.Contains(result))
            {
                CurrentSelectStatement.OuterExtents[result] = true;
            }
            return result;
        }
public override ISqlFragment Visit ( DbVariableReferenceExpression e ) { if ( isVarRefSingle ) { throw new NotSupportedException ( ) ; } isVarRefSingle = true ; var result = symbolTable . Lookup ( e . VariableName ) ; if ( ! CurrentSelectStatement . FromExtents . Contains ( result ) ) { CurrentSelectStatement . OuterExtents [ result ] = true ; } return result ; }
This method determines whether an extent from an outer scope(free variable)
is used in the CurrentSelectStatement.
This method determines whether an extent from an outer scope ( free variable ) is used in the CurrentSelectStatement .
// A DbVariableReferenceExpression has to be a child of DbPropertyExpression or MethodExpression // This is also checked in GenerateSql(...) at the end of the visiting. // This will be reset by DbPropertyExpression or MethodExpression
None
e
DbVariableReferenceExpression
None