コード例 #1
0
        private void HandleWhereClause(SelectStatement selectStatement)
        {
            if (selectStatement.WhereClause != null)
            {
                var whereStage = WhereHelper.GetWhereStage(LastStage, selectStatement.WhereClause, _visitorMetadata, _usedProperties);

                if (LastStage is FromTableStage fromTableStage)
                {
                    //Push the where condition into the table resolvers
                    fromTableStage.WhereExpression        = whereStage.WhereExpression;
                    fromTableStage.ContainsFullTextSearch = whereStage.ContainsFullTextSearch;
                }
                else
                {
                    //If its not possible to push up, add it as a normal stage
                    _stages.Add(whereStage);
                }
            }
        }