Exemplo n.º 1
0
        protected override bool WriteAllAttributes(System.Xml.XmlWriter writer, XmlWriterContext context)
        {
            this.WriteOptionalAttribute(writer, XmlHelper.Name, this.SequenceName, context);
            this.WriteOptionalAttribute(writer, XmlHelper.Owner, this.SequenceOwner, context);

            return(base.WriteAllAttributes(writer, context));
        }
Exemplo n.º 2
0
 internal void WriteXml(System.Xml.XmlWriter writer, XmlWriterContext context)
 {
     foreach (DBColumn col in this)
     {
         col.WriteXml(writer, context);
     }
 }
Exemplo n.º 3
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));
        }
Exemplo n.º 4
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));
        }
Exemplo n.º 5
0
        /// <summary>
        /// Outputs all the xml elements of this INSERT query on the XmlWriter
        /// </summary>
        /// <param name="writer"></param>
        /// <param name="context"></param>
        /// <returns></returns>
        protected override bool WriteInnerElements(System.Xml.XmlWriter writer, XmlWriterContext context)
        {
            if (this._into != null)
            {
                this.WriteStartElement(XmlHelper.Into, writer, context);
                this._into.WriteXml(writer, context);
                this.WriteEndElement(XmlHelper.Into, writer, context);
            }

            if (this._fields != null && this._fields.Results.Count > 0)
            {
                _fields.WriteXml(writer, context);
            }

            if (_values != null)
            {
                _values.WriteXml(writer, context);
            }
            else if (_innerselect != null)
            {
                _innerselect.WriteXml(writer, context);
            }

            return(base.WriteInnerElements(writer, context));
        }
Exemplo n.º 6
0
        /// <summary>
        /// Writes all the values for this DBParam instance
        /// </summary>
        /// <param name="writer"></param>
        /// <param name="context"></param>
        /// <returns></returns>
        public bool WriteFullParameterXml(System.Xml.XmlWriter writer, XmlWriterContext context)
        {
            writer.WriteStartElement(this.XmlElementName);

            if (this.HasName)
            {
                this.WriteAttribute(writer, XmlHelper.Name, this.Name, context);
            }
            if (this.HasType)
            {
                this.WriteAttribute(writer, XmlHelper.DbType, this.DbType.ToString(), context);
            }
            if (this.HasSize)
            {
                this.WriteAttribute(writer, XmlHelper.ParameterSize, this.Size.ToString(), context);
            }

            this.WriteAttribute(writer, XmlHelper.ParameterDirection, this.Direction.ToString(), context);

            base.WriteAllAttributes(writer, context);

            XmlHelper.WriteNativeValue(this.Value, writer, context);

            writer.WriteEndElement();

            return(true);
        }
Exemplo n.º 7
0
        protected override bool WriteAllAttributes(System.Xml.XmlWriter writer, XmlWriterContext context)
        {
            base.WriteAllAttributes(writer, context);
            this.WriteAttribute(writer, XmlHelper.Name, this.Name, context);
            if (!string.IsNullOrEmpty(this.OtherType))
            {
                this.WriteAttribute(writer, XmlHelper.OtherType, this.OtherType, context);
            }
            else
            {
                this.WriteAttribute(writer, XmlHelper.DbType, this.Type.ToString(), context);
            }

            if (this.Length > 0)
            {
                this.WriteAttribute(writer, XmlHelper.Length, this.Length.ToString(), context);
            }

            if (this.Precision > 0)
            {
                this.WriteAttribute(writer, XmlHelper.Precision, this.Precision.ToString(), context);
            }

            this.WriteAttribute(writer, XmlHelper.ColumnFlags, this.Flags.ToString(), context);

            return(true);
        }
Exemplo n.º 8
0
        protected override bool WriteInnerElements(System.Xml.XmlWriter writer, XmlWriterContext context)
        {
            bool b = base.WriteInnerElements(writer, context);

            this.Parameter.WriteXml(writer, context);
            return(b);
        }
Exemplo n.º 9
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));
 }
Exemplo n.º 10
0
 protected override bool WriteInnerElements(System.Xml.XmlWriter writer, XmlWriterContext context)
 {
     if (this.InnerReference != null)
     {
         this.InnerReference.WriteXml(writer, context);
     }
     return(true);
 }
Exemplo n.º 11
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));
        }
Exemplo n.º 12
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));
        }
Exemplo n.º 13
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));
 }
Exemplo n.º 14
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));
 }
Exemplo n.º 15
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));
 }
Exemplo n.º 16
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);
 }
Exemplo n.º 17
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));
        }
Exemplo n.º 18
0
        protected override bool WriteInnerElements(System.Xml.XmlWriter writer, XmlWriterContext context)
        {
            if (this.HasOrderBy)
            {
                this.OrderList.WriteXml(writer, context);
            }

            return(base.WriteInnerElements(writer, context));
        }
Exemplo n.º 19
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));
        }
Exemplo n.º 20
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));
        }
Exemplo n.º 21
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));
 }
Exemplo n.º 22
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));
 }
Exemplo n.º 23
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));
 }
Exemplo n.º 24
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));
 }
Exemplo n.º 25
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));
 }
Exemplo n.º 26
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));
        }
Exemplo n.º 27
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));
 }
Exemplo n.º 28
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));
 }
Exemplo n.º 29
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);
     }
 }
Exemplo n.º 30
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));
        }