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

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