public SqlComparePredicate(SqlSearchCondition sqlSearchCondition, SqlExpression leftExpression, SqlCompareOperator sqlCompareOperator, SqlExpression rightExpression)
     : base(sqlSearchCondition)
 {
     this.leftExpression = leftExpression;
     this.sqlCompareOperator = sqlCompareOperator;
     this.rightExpression = rightExpression;
 }
 public SqlBetweenPredicate(SqlSearchCondition sqlSearchCondition, SqlExpression leftExpression, SqlExpression middleExpression, SqlExpression rightExpression, bool negative) : base(sqlSearchCondition)
 {
     this.leftExpression   = leftExpression;
     this.middleExpression = middleExpression;
     this.rightExpression  = rightExpression;
     this.negative         = negative;
 }
 public SqlBetweenPredicate(SqlSearchCondition sqlSearchCondition, SqlExpression leftExpression, SqlExpression middleExpression, SqlExpression rightExpression)
     : this(sqlSearchCondition, leftExpression, middleExpression, rightExpression, false)
 {
     this.leftExpression = leftExpression;
     this.middleExpression = middleExpression;
     this.rightExpression = rightExpression;
 }
 public SqlBetweenPredicate(SqlSearchCondition sqlSearchCondition, SqlExpression leftExpression, SqlExpression middleExpression, SqlExpression rightExpression, bool negative)
     : base(sqlSearchCondition)
 {
     this.leftExpression = leftExpression;
     this.middleExpression = middleExpression;
     this.rightExpression = rightExpression;
     this.negative = negative;
 }
 public SqlAllPredicate(SqlSearchCondition sqlSearchCondition, SqlExpression leftExpression, SqlCompareOperator sqlCompareOperator, SqlAllPredicateType sqlAllPredicateType)
     : base(sqlSearchCondition)
 {
     this.leftExpression = leftExpression;
     this.sqlCompareOperator = sqlCompareOperator;
     this.sqlSelectStatement = new SqlSelectStatement(this);
     this.sqlAllPredicateType = sqlAllPredicateType;
 }
예제 #6
0
 public SqlSearchCondition GetSubSqlSearchCondition()
 {
     if (this.subSqlSearchCondition == null)
     {
         this.subSqlSearchCondition = new SqlSearchCondition(this, true);
     }
     return(this.subSqlSearchCondition);
 }
 public SqlSearchCondition GetSqlSearchCondition()
 {
     if (this.sqlSearchCondition == null)
     {
         this.sqlSearchCondition = new SqlSearchCondition(this);
     }
     return(this.sqlSearchCondition);
 }
예제 #8
0
		public SqlSearchCondition GetSqlSearchCondition(bool orNext)
		{
			if (this.sqlSearchCondition == null)
			{
				this.sqlSearchCondition = new SqlSearchCondition(this) ;
				this.sqlSearchCondition.OrNext = orNext;
			}
			return this.sqlSearchCondition;				
		}
예제 #9
0
 public SqlSearchCondition GetSqlSearchCondition(bool orNext)
 {
     if (this.sqlSearchCondition == null)
     {
         this.sqlSearchCondition        = new SqlSearchCondition(this);
         this.sqlSearchCondition.OrNext = orNext;
     }
     return(this.sqlSearchCondition);
 }
예제 #10
0
		public SqlSearchCondition GetNextSqlSearchCondition()
		{
			if (this.sqlSearchCondition == null)
			{
				this.sqlSearchCondition = new SqlSearchCondition(this) ;
				return this.sqlSearchCondition;								
			}
			SqlSearchCondition sqlSearchCondition = this.sqlSearchCondition;
			while (sqlSearchCondition.NextSqlSearchCondition != null)
			{
				sqlSearchCondition = sqlSearchCondition.NextSqlSearchCondition;
			}
			sqlSearchCondition = sqlSearchCondition.GetNextSqlSearchCondition();
			return sqlSearchCondition;
		}
예제 #11
0
        public SqlSearchCondition GetCurrentSqlSearchCondition()
        {
            if (this.sqlSearchCondition == null)
            {
                this.sqlSearchCondition = new SqlSearchCondition(this);
                return(this.sqlSearchCondition);
            }
            SqlSearchCondition sqlSearchCondition = this.sqlSearchCondition;

            while (sqlSearchCondition.NextSqlSearchCondition != null)
            {
                sqlSearchCondition = sqlSearchCondition.NextSqlSearchCondition;
            }
            return(sqlSearchCondition);
        }
예제 #12
0
        public SqlSearchCondition GetCurrentSqlSearchCondition()
        {
            if (this.sqlSearchCondition == null)
            {
                this.sqlSearchCondition = new SqlSearchCondition(this) ;

                //fix parens
                //SqlSearchCondition search = this.sqlSearchCondition.GetNextSqlSearchCondition();
                //search = search.GetSubSqlSearchCondition();
                //return search;

                return this.sqlSearchCondition;
            }
            SqlSearchCondition sqlSearchCondition = this.sqlSearchCondition;
            while (sqlSearchCondition.NextSqlSearchCondition != null)
            {
                sqlSearchCondition = sqlSearchCondition.NextSqlSearchCondition;
            }
            return sqlSearchCondition;
        }
예제 #13
0
        public SqlSearchCondition GetCurrentSqlSearchCondition()
        {
            if (this.sqlSearchCondition == null)
            {
                this.sqlSearchCondition = new SqlSearchCondition(this);

                //fix parens
                //SqlSearchCondition search = this.sqlSearchCondition.GetNextSqlSearchCondition();
                //search = search.GetSubSqlSearchCondition();
                //return search;

                return(this.sqlSearchCondition);
            }
            SqlSearchCondition sqlSearchCondition = this.sqlSearchCondition;

            while (sqlSearchCondition.NextSqlSearchCondition != null)
            {
                sqlSearchCondition = sqlSearchCondition.NextSqlSearchCondition;
            }
            return(sqlSearchCondition);
        }
예제 #14
0
 public SqlAllPredicate(SqlSearchCondition sqlSearchCondition, SqlExpression leftExpression, SqlCompareOperator sqlCompareOperator) : this(sqlSearchCondition, leftExpression, sqlCompareOperator, SqlAllPredicateType.All)
 {
 }
 public SqlSearchCondition GetSubSqlSearchCondition()
 {
     if (this.subSqlSearchCondition == null)
         this.subSqlSearchCondition = new SqlSearchCondition(this, true) ;
     return this.subSqlSearchCondition;
 }
 public SqlBetweenPredicate(SqlSearchCondition sqlSearchCondition, SqlExpression leftExpression, SqlExpression middleExpression, SqlExpression rightExpression) : this(sqlSearchCondition, leftExpression, middleExpression, rightExpression, false)
 {
     this.leftExpression   = leftExpression;
     this.middleExpression = middleExpression;
     this.rightExpression  = rightExpression;
 }
예제 #17
0
 protected SqlPredicate(SqlSearchCondition sqlSearchCondition)
 {
     this.Parent = sqlSearchCondition;
     sqlSearchCondition.SqlPredicate = this;
 }
예제 #18
0
 public SqlComparePredicate(SqlSearchCondition sqlSearchCondition, SqlExpression leftExpression, SqlCompareOperator sqlCompareOperator, SqlExpression rightExpression) : base(sqlSearchCondition)
 {
     this.leftExpression     = leftExpression;
     this.sqlCompareOperator = sqlCompareOperator;
     this.rightExpression    = rightExpression;
 }
 public SqlExistsPredicate(SqlSearchCondition sqlSearchCondition) : base(sqlSearchCondition)
 {
     this.sqlSelectStatement = new SqlSelectStatement(this);
 }
예제 #20
0
 public SqlInPredicate(SqlSearchCondition sqlSearchCondition, SqlExpression leftExpression, bool negative) : base(sqlSearchCondition)
 {
     this.leftExpression = leftExpression;
     this.negative       = negative;
 }
예제 #21
0
 public SqlLikePredicate(SqlSearchCondition sqlSearchCondition, SqlExpression leftExpression, SqlExpression rightExpression) : this(sqlSearchCondition, leftExpression, rightExpression, false, "")
 {
 }
예제 #22
0
 public SqlAllPredicate(SqlSearchCondition sqlSearchCondition, SqlExpression leftExpression,SqlCompareOperator sqlCompareOperator)
     : this(sqlSearchCondition, leftExpression, sqlCompareOperator, SqlAllPredicateType.All)
 {
 }
예제 #23
0
 public virtual void Visited(SqlSearchCondition searchCondition)
 {
     if (searchCondition.NextSqlSearchCondition != null)
     {
         if (searchCondition.SqlPredicate != null || searchCondition.SubSqlSearchCondition != null )
         {
             if (searchCondition.OrNext)
                 sqlBuilder.Append(" Or ");
             else
                 sqlBuilder.Append(" And ");
         }
     }
     else
         sqlBuilder.Append(")");
 }
 public SqlExistsPredicate(SqlSearchCondition sqlSearchCondition)
     : base(sqlSearchCondition)
 {
     this.sqlSelectStatement = new SqlSelectStatement(this);
 }
 public SqlIsNullPredicate(SqlSearchCondition sqlSearchCondition, SqlExpression leftExpression)
     : this(sqlSearchCondition, leftExpression, false)
 {
 }
 public SqlIsNullPredicate(SqlSearchCondition sqlSearchCondition, SqlExpression leftExpression, bool negative)
     : base(sqlSearchCondition)
 {
     this.leftExpression = leftExpression;
     this.negative = negative;
 }
 public SqlSearchCondition(SqlSearchCondition sqlSearchCondition, bool isSubClause)
 {
     this.Parent = sqlSearchCondition;
     this.isSubClause = isSubClause;
 }
예제 #28
0
 public SqlSearchCondition(SqlSearchCondition sqlSearchCondition, bool isSubClause)
 {
     this.Parent      = sqlSearchCondition;
     this.isSubClause = isSubClause;
 }
예제 #29
0
		private void AddTypeColumnToWhereClause(IClassMap classMap, SqlSearchCondition search) 
		{
			IColumnMap typeColumnMap = classMap.GetTypeColumnMap(); 
			if (typeColumnMap != null)
			{
				ITableMap tableMap = classMap.MustGetTableMap();
				SqlTableAlias tbl = null ;
				foreach (IPropertyMap idPropertyMap in classMap.GetIdentityPropertyMaps())
				{
					tbl = GetTableAlias(tableMap, idPropertyMap)  ;
					break;
				}

				SqlColumnAlias column = this.propertyPathTraverser.GetPropertyColumnAlias(tbl, ".NPersistTypeColumn" , typeColumnMap, ".NPersistTypeColumn");

				search.GetSqlComparePredicate(column, SqlCompareOperatorType.Equals, new SqlStringLiteral(classMap.TypeValue));				
				search.OrNext = true;
			}
		}
 public SqlContainsPredicate(SqlSearchCondition sqlSearchCondition, SqlExpression leftExpression, SqlExpression rightExpression) : base(sqlSearchCondition)
 {
     this.leftExpression  = leftExpression;
     this.rightExpression = rightExpression;
 }
예제 #31
0
 public SqlLikePredicate(SqlSearchCondition sqlSearchCondition, SqlExpression leftExpression, SqlExpression rightExpression, bool negative) : this(sqlSearchCondition, leftExpression, rightExpression, negative, "")
 {
 }
예제 #32
0
 public SqlAllPredicate(SqlSearchCondition sqlSearchCondition, SqlExpression leftExpression, SqlCompareOperatorType sqlCompareOperatorType, SqlAllPredicateType sqlAllPredicateType)
     : this(sqlSearchCondition, leftExpression, new SqlCompareOperator(sqlCompareOperatorType), sqlAllPredicateType)
 {
 }
예제 #33
0
 public SqlComparePredicate(SqlSearchCondition sqlSearchCondition, SqlExpression leftExpression, SqlCompareOperatorType sqlCompareOperatorType, SqlExpression rightExpression) : this(sqlSearchCondition, leftExpression, new SqlCompareOperator(sqlCompareOperatorType), rightExpression)
 {
 }
예제 #34
0
 public SqlFreeTextPredicate(SqlSearchCondition sqlSearchCondition, SqlExpression leftExpression, SqlExpression rightExpression) : base(sqlSearchCondition, leftExpression, rightExpression)
 {
 }
예제 #35
0
 public SqlLikePredicate(SqlSearchCondition sqlSearchCondition, SqlExpression leftExpression, SqlExpression rightExpression, bool negative, string escapeCharacter) : base(sqlSearchCondition, leftExpression, SqlCompareOperatorType.Like, rightExpression)
 {
     this.negative        = negative;
     this.escapeCharacter = escapeCharacter;
 }
예제 #36
0
 public SqlAllPredicate(SqlSearchCondition sqlSearchCondition, SqlExpression leftExpression, SqlCompareOperatorType sqlCompareOperatorType, SqlAllPredicateType sqlAllPredicateType) : this(sqlSearchCondition, leftExpression, new SqlCompareOperator(sqlCompareOperatorType), sqlAllPredicateType)
 {
 }
 public SqlComparePredicate(SqlSearchCondition sqlSearchCondition, SqlExpression leftExpression, SqlCompareOperatorType sqlCompareOperatorType, SqlExpression rightExpression)
     : this(sqlSearchCondition, leftExpression, new SqlCompareOperator(sqlCompareOperatorType), rightExpression)
 {
 }
 public SqlContainsPredicate(SqlSearchCondition sqlSearchCondition, SqlExpression leftExpression, SqlExpression rightExpression)
     : base(sqlSearchCondition)
 {
     this.leftExpression = leftExpression;
     this.rightExpression = rightExpression;
 }
예제 #39
0
        public virtual void Visiting(SqlSearchCondition searchCondition)
        {
            if (searchCondition.Negative)
                sqlBuilder.Append("Not ");

            if (searchCondition.PrevSqlSearchCondition == null)
                sqlBuilder.Append("(");
        }
예제 #40
0
 protected SqlPredicate(SqlSearchCondition sqlSearchCondition)
 {
     this.Parent = sqlSearchCondition;
     sqlSearchCondition.SqlPredicate = this;
 }
예제 #41
0
 public SqlInPredicate(SqlSearchCondition sqlSearchCondition, SqlExpression leftExpression) : this(sqlSearchCondition, leftExpression, false)
 {
 }
 public SqlSearchCondition GetSqlSearchCondition()
 {
     if (this.sqlSearchCondition == null)
     {
         this.sqlSearchCondition = new SqlSearchCondition(this) ;
     }
     return this.sqlSearchCondition;
 }