コード例 #1
0
        public override WTableReference ToTableReference()
        {
            List <WScalarExpression> parameters = new List <WScalarExpression>();

            WSearchedCaseExpression searchCaseExpr = new WSearchedCaseExpression();

            searchCaseExpr.WhenClauses = new List <WSearchedWhenClause>();

            WSearchedWhenClause booleanIsTrueClause = new WSearchedWhenClause();

            booleanIsTrueClause.WhenExpression = this.Predicate;
            booleanIsTrueClause.ThenExpression = new WValueExpression("1");

            searchCaseExpr.WhenClauses.Add(booleanIsTrueClause);
            searchCaseExpr.ElseExpr = new WValueExpression("0");

            parameters.Add(searchCaseExpr);

            var tableRef = SqlUtil.GetFunctionTableReference(GremlinKeyword.func.Filter, parameters, GetVariableName());

            return(SqlUtil.GetCrossApplyTableReference(tableRef));
        }
コード例 #2
0
 public virtual void Visit(WSearchedWhenClause node)
 {
     node.AcceptChildren(this);
 }
コード例 #3
0
 public virtual void Visit(WSearchedWhenClause node)
 {
     node.AcceptChildren(this);
 }