Beispiel #1
0
        /// <summary>
        /// Creates a WhereTerm which represents SQL NOT IN clause
        /// </summary>
        /// <param name="expr">Expression to be looked up</param>
        /// <param name="values"></param>
        /// <returns></returns>
        public static WhereTerm CreateNotIn(OmExpression expr, OmConstantCollection values)
        {
            WhereTerm term = new WhereTerm();

            term.Expr1  = expr;
            term.values = values;
            term.Type   = WhereTermType.NotIn;
            return(term);
        }
Beispiel #2
0
        /// <summary>
        /// Creates a SqlConstantCollection from a list of values.
        /// </summary>
        /// <remarks>
        /// The type of SqlConstant items in the collection is determined automatically.
        /// See Add method for more info.
        /// </remarks>
        /// <param name="values"></param>
        /// <returns></returns>
        public static OmConstantCollection FromList(IList values)
        {
            OmConstantCollection collection = new OmConstantCollection(values.Count);

            foreach (object val in values)
            {
                collection.Add(val);
            }
            return(collection);
        }
Beispiel #3
0
 /// <summary>
 /// Initializes a new instance of the SqlConstantCollection class, containing elements
 /// copied from another instance of SqlConstantCollection
 /// </summary>
 /// <param name="items">
 /// The SqlConstantCollection whose elements are to be added to the new SqlConstantCollection.
 /// </param>
 public OmConstantCollection(OmConstantCollection items)
     : base(items)
 {
 }