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;
 }
 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);
 }
		public SqlSearchCondition GetSqlSearchCondition(bool orNext)
		{
			if (this.sqlSearchCondition == null)
			{
				this.sqlSearchCondition = new SqlSearchCondition(this) ;
				this.sqlSearchCondition.OrNext = orNext;
			}
			return this.sqlSearchCondition;				
		}
Beispiel #9
0
 public SqlSearchCondition GetSqlSearchCondition(bool orNext)
 {
     if (this.sqlSearchCondition == null)
     {
         this.sqlSearchCondition        = new SqlSearchCondition(this);
         this.sqlSearchCondition.OrNext = orNext;
     }
     return(this.sqlSearchCondition);
 }
		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;
		}
Beispiel #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);
        }
        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;
        }
Beispiel #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);
        }
 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;
 }
 protected SqlPredicate(SqlSearchCondition sqlSearchCondition)
 {
     this.Parent = sqlSearchCondition;
     sqlSearchCondition.SqlPredicate = this;
 }
Beispiel #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);
 }
 public SqlInPredicate(SqlSearchCondition sqlSearchCondition, SqlExpression leftExpression, bool negative) : base(sqlSearchCondition)
 {
     this.leftExpression = leftExpression;
     this.negative       = negative;
 }
Beispiel #21
0
 public SqlLikePredicate(SqlSearchCondition sqlSearchCondition, SqlExpression leftExpression, SqlExpression rightExpression) : this(sqlSearchCondition, leftExpression, rightExpression, false, "")
 {
 }
 public SqlAllPredicate(SqlSearchCondition sqlSearchCondition, SqlExpression leftExpression,SqlCompareOperator sqlCompareOperator)
     : this(sqlSearchCondition, leftExpression, sqlCompareOperator, SqlAllPredicateType.All)
 {
 }
 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;
 }
 public SqlSearchCondition(SqlSearchCondition sqlSearchCondition, bool isSubClause)
 {
     this.Parent      = sqlSearchCondition;
     this.isSubClause = isSubClause;
 }
Beispiel #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;
 }
Beispiel #31
0
 public SqlLikePredicate(SqlSearchCondition sqlSearchCondition, SqlExpression leftExpression, SqlExpression rightExpression, bool negative) : this(sqlSearchCondition, leftExpression, rightExpression, negative, "")
 {
 }
 public SqlAllPredicate(SqlSearchCondition sqlSearchCondition, SqlExpression leftExpression, SqlCompareOperatorType sqlCompareOperatorType, SqlAllPredicateType sqlAllPredicateType)
     : this(sqlSearchCondition, leftExpression, new SqlCompareOperator(sqlCompareOperatorType), sqlAllPredicateType)
 {
 }
Beispiel #33
0
 public SqlComparePredicate(SqlSearchCondition sqlSearchCondition, SqlExpression leftExpression, SqlCompareOperatorType sqlCompareOperatorType, SqlExpression rightExpression) : this(sqlSearchCondition, leftExpression, new SqlCompareOperator(sqlCompareOperatorType), rightExpression)
 {
 }
Beispiel #34
0
 public SqlFreeTextPredicate(SqlSearchCondition sqlSearchCondition, SqlExpression leftExpression, SqlExpression rightExpression) : base(sqlSearchCondition, leftExpression, rightExpression)
 {
 }
Beispiel #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;
 }
 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;
 }
        public virtual void Visiting(SqlSearchCondition searchCondition)
        {
            if (searchCondition.Negative)
                sqlBuilder.Append("Not ");

            if (searchCondition.PrevSqlSearchCondition == null)
                sqlBuilder.Append("(");
        }
Beispiel #40
0
 protected SqlPredicate(SqlSearchCondition sqlSearchCondition)
 {
     this.Parent = sqlSearchCondition;
     sqlSearchCondition.SqlPredicate = this;
 }
 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;
 }