Exemple #1
0
        public static Cond NotIn(Expr expr, params string[] values)
        {
            List <Constant> col = new List <Constant>();

            for (int i = 0; i < values.Length; i++)
            {
                col.Add(Constant.String(values[i]));
            }
            return(Cond.NotIn(expr, col));
        }
Exemple #2
0
        public static Cond In(Expr expr, params DateTime[] values)
        {
            List <Constant> col = new List <Constant>();

            for (int i = 0; i < values.Length; i++)
            {
                col.Add(Constant.Date(values[i]));
            }
            return(Cond.In(expr, col));
        }
Exemple #3
0
        public static Cond NotIn(Expr expr, List <Constant> values)
        {
            Cond oper = new Cond();
            OmConstantCollection col = new OmConstantCollection();

            for (int i = 0; i < values.Count; i++)
            {
                col.Add(values[i].Const);
            }
            oper.Term = WhereTerm.CreateNotIn(expr.Expression, col);
            return(oper);
        }
Exemple #4
0
        /// <summary>
        /// Creates a WhereTerm which represents SQL IN clause
        /// </summary>
        /// <param name="expr">Expression to be looked up</param>
        /// <param name="values">List of values</param>
        /// <returns></returns>
        static Cond In(Expr expr, List <Constant> values)
        {
            OmConstantCollection col = new OmConstantCollection();

            for (int i = 0; i < values.Count; i++)
            {
                col.Add(values[i].Const.Value);
            }
            Cond term = new Cond();

            term.Term = WhereTerm.CreateIn(expr.Expression, col);
            return(term);
        }
Exemple #5
0
 /// <summary>Операция NotIn</summary>
 public static Cond NotIn(string field, From alias, Select subQuery)
 {
     return(Cond.NotIn(Expr.Field(field, alias), subQuery));
 }
Exemple #6
0
 /// <summary>Операция NotIn</summary>
 public static Cond NotIn(string field, Select subQuery)
 {
     return(Cond.NotIn(field, null, subQuery));
 }