Esempio n. 1
0
        public static DBTableHintOption WithHint(DBTableHint hint, string[] parameters)
        {
            DBTableHintOption with = WithHint(hint);

            with.Parameters = parameters;
            return(with);
        }
Esempio n. 2
0
        public DBTableHintSet WithHint(DBTableHint hint, params string[] options)
        {
            DBTableHintOption opt = DBTableHintOption.WithHint(hint, options);

            this.WithHint(opt);
            return(this);
        }
Esempio n. 3
0
        //
        // Instance methods - each adds a new hint to the collection and returns the owner table
        //


        public DBTableHintSet WithHint(DBTableHint hint)
        {
            DBTableHintOption opt = DBTableHintOption.WithHint(hint);

            this.WithHint(opt);
            return(this);
        }
Esempio n. 4
0
        //
        // hints
        //

        #region public DBTableSet WithHint(DBTableHint hint) + 2 overload

        /// <summary>
        /// Adds a specific query hint to the current table in this statement
        /// </summary>
        /// <param name="hint"></param>
        /// <returns></returns>
        public DBTableSet WithHint(DBTableHintOption hint)
        {
            if (this.Last is DBTable)
            {
                (this.Last as DBTable).WithHint(hint);
            }
            else
            {
                throw new InvalidOperationException(Errors.NoRootOrLastForHint);
            }
            return(this);
        }
Esempio n. 5
0
        //
        // XML Serialization
        //

        protected override bool ReadAnInnerElement(System.Xml.XmlReader reader, XmlReaderContext context)
        {
            if (this.IsElementMatch(XmlHelper.TableHint, reader, context))
            {
                DBTableHintOption inner = DBTableHintOption.Empty();
                inner.ReadXml(reader, context);
                this.Hints.Add(inner);
                return(true);
            }
            else
            {
                return(base.ReadAnInnerElement(reader, context));
            }
        }
Esempio n. 6
0
 /// <summary>
 /// Appends a Query execution table hint and option
 /// </summary>
 /// <param name="hint"></param>
 /// <returns></returns>
 public DBTable WithHint(DBTableHintOption hint)
 {
     this.Hints.WithHint(hint);
     return(this);
 }
Esempio n. 7
0
 public DBTableHintSet WithHint(DBTableHintOption hint)
 {
     this.Hints.Add(hint);
     return(this);
 }