Example #1
0
        protected override bool WriteInnerElements(System.Xml.XmlWriter writer, XmlWriterContext context)
        {
            bool b = base.WriteInnerElements(writer, context);

            this.Parameter.WriteXml(writer, context);
            return(b);
        }
Example #2
0
        protected override bool WriteAllAttributes(System.Xml.XmlWriter writer, XmlWriterContext context)
        {
            this.WriteAttribute(writer, XmlHelper.TopValue, this.TopValue.ToString(), context);
            this.WriteAttribute(writer, XmlHelper.TopType, this.Type.ToString(), context);

            return(base.WriteAllAttributes(writer, context));
        }
Example #3
0
        protected override bool WriteAllAttributes(System.Xml.XmlWriter writer, XmlWriterContext context)
        {
            if (!string.IsNullOrEmpty(this.Name))
            {
                this.WriteAttribute(writer, XmlHelper.Name, this.Name, context);
            }
            if (!string.IsNullOrEmpty(this.Owner))
            {
                this.WriteAttribute(writer, XmlHelper.Owner, this.Owner, context);
            }
            if (!string.IsNullOrEmpty(this.TableName))
            {
                this.WriteAttribute(writer, XmlHelper.TableName, this.TableName, context);
            }
            if (!string.IsNullOrEmpty(this.TableOwner))
            {
                this.WriteAttribute(writer, XmlHelper.TableOwner, this.TableOwner, context);
            }
            if (this.Options != CreateOptions.None)
            {
                this.WriteAttribute(writer, XmlHelper.IndexOptions, this.Options.ToString(), context);
            }

            return(base.WriteAllAttributes(writer, context));
        }
Example #4
0
        protected override bool WriteAllAttributes(System.Xml.XmlWriter writer, XmlWriterContext context)
        {
            this.WriteOptionalAttribute(writer, XmlHelper.Name, this.ViewName, context);
            this.WriteOptionalAttribute(writer, XmlHelper.Owner, this.ViewOwner, context);

            return(base.WriteAllAttributes(writer, context));
        }
Example #5
0
        protected override bool WriteAllAttributes(System.Xml.XmlWriter writer, XmlWriterContext context)
        {
            this.WriteOptionalAttribute(writer, XmlHelper.Name, this.TableName, context);
            this.WriteOptionalAttribute(writer, XmlHelper.Owner, this.TableOwner, context);
            this.WriteOptionalAttribute(writer, XmlHelper.Temp, this.Temporary.ToString(), context);

            return(base.WriteAllAttributes(writer, context));
        }
Example #6
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="writer"></param>
 /// <param name="context"></param>
 /// <returns></returns>
 protected override bool WriteInnerElements(System.Xml.XmlWriter writer, XmlWriterContext context)
 {
     foreach (var item in this.All)
     {
         item.WriteXml(writer, context);
     }
     return(true);
 }
Example #7
0
 /// <summary>
 /// writes all the inner elements in this script
 /// </summary>
 /// <param name="writer"></param>
 /// <param name="context"></param>
 /// <returns></returns>
 protected override bool WriteInnerElements(System.Xml.XmlWriter writer, XmlWriterContext context)
 {
     if (this.HasInnerStatements)
     {
         this.Inner.WriteXml(writer, context);
     }
     return(base.WriteInnerElements(writer, context));
 }
Example #8
0
 protected override bool WriteInnerElements(System.Xml.XmlWriter writer, XmlWriterContext context)
 {
     if (this.PKColumns != null && this.PKColumns.Count > 0)
     {
         this.PKColumns.WriteReferenceXml(XmlHelper.ColumnList, writer, context);
     }
     return(base.WriteInnerElements(writer, context));
 }
Example #9
0
 protected override bool WriteInnerElements(System.Xml.XmlWriter writer, XmlWriterContext context)
 {
     if (this.HasRoot)
     {
         ((DBClause)this.Root).WriteXml(writer, context);
     }
     return(base.WriteInnerElements(writer, context));
 }
Example #10
0
        //
        //xml serialization
        //

        protected override bool WriteAllAttributes(System.Xml.XmlWriter writer, XmlWriterContext context)
        {
            if (string.IsNullOrEmpty(this.DBName) == false)
            {
                this.WriteAttribute(writer, XmlHelper.Name, this.DBName, context);
            }
            return(base.WriteAllAttributes(writer, context));
        }
Example #11
0
 protected override bool WriteInnerElements(System.Xml.XmlWriter writer, XmlWriterContext context)
 {
     if (this.InnerReference != null)
     {
         this.InnerReference.WriteXml(writer, context);
     }
     return(true);
 }
Example #12
0
 protected override bool WriteInnerElements(System.Xml.XmlWriter writer, XmlWriterContext context)
 {
     if (this.GroupItems != null)
     {
         this.GroupItems.WriteXml(writer, context);
     }
     return(base.WriteInnerElements(writer, context));
 }
Example #13
0
        protected override bool WriteAllAttributes(System.Xml.XmlWriter writer, XmlWriterContext context)
        {
            if (string.IsNullOrEmpty(this.Alias) == false)
            {
                this.WriteAlias(writer, this.Alias, context);
            }

            return(base.WriteAllAttributes(writer, context));
        }
Example #14
0
        protected override bool WriteAllAttributes(System.Xml.XmlWriter writer, XmlWriterContext context)
        {
            if (this.CheckExists != DBExistState.Unknown)
            {
                this.WriteAttribute(writer, XmlHelper.CheckExists, this.CheckExists.ToString(), context);
            }

            return(base.WriteAllAttributes(writer, context));
        }
Example #15
0
        protected override bool WriteInnerElements(System.Xml.XmlWriter writer, XmlWriterContext context)
        {
            if (this.HasOrderBy)
            {
                this.OrderList.WriteXml(writer, context);
            }

            return(base.WriteInnerElements(writer, context));
        }
Example #16
0
        protected override bool WriteInnerElements(System.Xml.XmlWriter writer, XmlWriterContext context)
        {
            if (null != this.Select)
            {
                this.Select.WriteXml(writer, context);
            }

            return(base.WriteInnerElements(writer, context));
        }
Example #17
0
 protected override bool WriteInnerElements(System.Xml.XmlWriter writer, XmlWriterContext context)
 {
     if (this.ColumnOrders != null && this.ColumnOrders.Count > 0)
     {
         this.WriteStartElement(XmlHelper.IndexColumns, writer, context);
         this.ColumnOrders.WriteXml(writer, context);
         this.WriteEndElement(XmlHelper.IndexColumns, writer, context);
     }
     return(base.WriteInnerElements(writer, context));
 }
Example #18
0
 /// <summary>
 /// Writes the child elements
 /// </summary>
 /// <param name="writer"></param>
 /// <param name="context"></param>
 /// <returns></returns>
 protected override bool WriteInnerElements(System.Xml.XmlWriter writer, XmlWriterContext context)
 {
     if (null != Clause)
     {
         this.WriteStartElement(XmlHelper.HintParameter, writer, context);
         this.Clause.WriteXml(writer, context);
         this.WriteEndElement(XmlHelper.HintParameter, writer, context);
     }
     return(base.WriteInnerElements(writer, context));
 }
Example #19
0
 /// <summary>
 /// Overrides the default implementation to write all the parameters for this EXEC query
 /// </summary>
 /// <param name="writer">The XmlWriter</param>
 /// <param name="context">The XmlWriterContext</param>
 /// <returns>the base result</returns>
 protected override bool WriteInnerElements(System.Xml.XmlWriter writer, XmlWriterContext context)
 {
     if (this.HasParameters)
     {
         this.WriteStartElement(XmlHelper.Parameters, writer, context);
         this.Parameters.WriteXml(writer, context);
         this.WriteEndElement(XmlHelper.Parameters, writer, context);
     }
     return(base.WriteInnerElements(writer, context));
 }
Example #20
0
 protected override bool WriteInnerElements(System.Xml.XmlWriter writer, XmlWriterContext context)
 {
     if (null != this.ToReturn)
     {
         this.WriteStartElement("to-return", writer, context);
         this.ToReturn.WriteXml(writer, context);
         this.WriteEndElement("to-return", writer, context);
     }
     return(base.WriteInnerElements(writer, context));
 }
Example #21
0
 protected override bool WriteInnerElements(System.Xml.XmlWriter writer, XmlWriterContext context)
 {
     if (this.HasDefault)
     {
         this.WriteStartElement(XmlHelper.Default, writer, context);
         this.DefaultValue.WriteXml(writer, context);
         this.WriteEndElement(XmlHelper.Default, writer, context);
     }
     return(base.WriteInnerElements(writer, context));
 }
Example #22
0
        protected override bool WriteAllAttributes(System.Xml.XmlWriter writer, XmlWriterContext context)
        {
            this.WriteAttribute(writer, XmlHelper.Operator, this.BinaryOp.ToString(), context);

            if (string.IsNullOrEmpty(this.Alias) == false)
            {
                this.WriteAlias(writer, this.Alias, context);
            }

            return(base.WriteAllAttributes(writer, context));
        }
Example #23
0
 protected override bool WriteInnerElements(System.Xml.XmlWriter writer, XmlWriterContext context)
 {
     if (this.HasHints)
     {
         foreach (DBTableHintOption option in this.Hints)
         {
             option.WriteXml(writer, context);
         }
     }
     return(base.WriteInnerElements(writer, context));
 }
Example #24
0
 public static void WriteStartElement(XmlWriter writer, string eleName, XmlWriterContext context)
 {
     if (context.QualifiedElement && string.IsNullOrEmpty(context.Prefix) == false)
     {
         writer.WriteStartElement(context.Prefix, eleName, context.NameSpace);
     }
     else
     {
         writer.WriteStartElement(eleName);
     }
 }
Example #25
0
 protected override bool WriteInnerElements(System.Xml.XmlWriter writer, XmlWriterContext context)
 {
     if (this._items != null && this._items.Count > 0)
     {
         foreach (DBQueryHintOption hint in this._items)
         {
             hint.WriteXml(writer, context);
         }
     }
     return(base.WriteInnerElements(writer, context));
 }
Example #26
0
        protected override bool WriteAllAttributes(System.Xml.XmlWriter writer, XmlWriterContext context)
        {
            if (!string.IsNullOrEmpty(this.SequenceName))
            {
                this.WriteAttribute(writer, XmlHelper.Name, this.SequenceName, context);
            }

            if (!string.IsNullOrEmpty(this.Owner))
            {
                this.WriteAttribute(writer, XmlHelper.Owner, this.Owner, context);
            }

            if (this.MinValue != DEF_MIN)
            {
                this.WriteAttribute(writer, XmlHelper.SequenceMin, this.MinValue.ToString(), context);
            }

            if (this.MaxValue != DEF_MAX)
            {
                this.WriteAttribute(writer, XmlHelper.SequenceMax, this.MaxValue.ToString(), context);
            }

            if (this.StartWithValue != DEF_START)
            {
                this.WriteAttribute(writer, XmlHelper.SequenceStart, this.StartWithValue.ToString(), context);
            }

            if (this.IncrementValue != DEF_INCREMENT)
            {
                this.WriteAttribute(writer, XmlHelper.SequenceIncrement, this.IncrementValue.ToString(), context);
            }

            if (this.CacheSize == NO_CACHE_VALUE)
            {
                this.WriteAttribute(writer, XmlHelper.SequenceNoCache, true.ToString(), context);
            }
            else if (this.CacheSize != DEF_CACHE)
            {
                this.WriteAttribute(writer, XmlHelper.SequenceCache, this.CacheSize.ToString(), context);
            }

            if (this.Cycling != DBSequenceCycling.None)
            {
                this.WriteAttribute(writer, XmlHelper.SequenceCycling, this.Cycling.ToString(), context);
            }

            if (this.Order != DBSequenceOrdering.None)
            {
                this.WriteAttribute(writer, XmlHelper.SequenceOrdering, this.Order.ToString(), context);
            }

            return(base.WriteAllAttributes(writer, context));
        }
Example #27
0
 protected override bool WriteInnerElements(System.Xml.XmlWriter writer, XmlWriterContext context)
 {
     if (this.Parameters != null && this.Parameters.Length > 0)
     {
         for (int i = 0; i < Parameters.Length; i++)
         {
             writer.WriteStartElement(XmlHelper.HintParameter);
             writer.WriteValue(this.Parameters[i]);
             writer.WriteEndElement();
         }
     }
     return(base.WriteInnerElements(writer, context));
 }
Example #28
0
        protected override bool WriteAllAttributes(System.Xml.XmlWriter writer, XmlWriterContext context)
        {
            if (!string.IsNullOrEmpty(this.TableName))
            {
                this.WriteAttribute(writer, XmlHelper.TableName, this.TableName, context);
            }
            if (!string.IsNullOrEmpty(this.TableOwner))
            {
                this.WriteAttribute(writer, XmlHelper.TableOwner, this.TableOwner, context);
            }

            return(base.WriteAllAttributes(writer, context));
        }
Example #29
0
        /// <summary>
        /// Writes all the Xml Attributes for this parameter
        /// </summary>
        /// <param name="writer"></param>
        /// <param name="context"></param>
        /// <returns></returns>
        protected override bool WriteAllAttributes(System.Xml.XmlWriter writer, XmlWriterContext context)
        {
            if (this.HasName)
            {
                this.WriteAttribute(writer, XmlHelper.Name, this.Name, context);
            }

            if (context.Parameters.Contains(this) == false)
            {
                context.Parameters.Add(this);
            }

            return(true);
        }
Example #30
0
 protected override bool WriteInnerElements(System.Xml.XmlWriter writer, XmlWriterContext context)
 {
     if (this.HasHints)
     {
         this.Hints.WriteXml(writer, context);
     }
     if (this.Joins != null && this.Joins.Count > 0)
     {
         this.WriteStartElement(XmlHelper.JoinList, writer, context);
         this.Joins.WriteXml(writer, context);
         this.WriteEndElement(XmlHelper.JoinList, writer, context);
     }
     return(base.WriteInnerElements(writer, context));
 }