Beispiel #1
0
        // no statement building
#else
        #region protected virtual void BuildColumnListStatement(DBStatementBuilder builder, DBColumnList tooutput)

        /// <summary>
        /// Generates the SQL statement for a list of columns outputting only their names
        /// </summary>
        /// <param name="builder"></param>
        /// <param name="tooutput"></param>
        protected virtual void BuildColumnListStatement(DBStatementBuilder builder, DBColumnList tooutput)
        {
            builder.BeginBlock();
            bool first = true;

            foreach (DBColumn col in tooutput)
            {
                if (first)
                {
                    first = false;
                }
                else
                {
                    builder.WriteReferenceSeparator();
                }
                builder.WriteSourceField(string.Empty, string.Empty, string.Empty, col.Name, string.Empty);
            }
            builder.EndBlock();
        }
 protected override bool ReadAnInnerElement(System.Xml.XmlReader reader, XmlReaderContext context)
 {
     if (this.IsElementMatch(XmlHelper.ColumnList, reader, context))
     {
         DBColumnList cols = new DBColumnList();
         cols.ReadReferenceXml(reader, context);
         this.TableColumns = cols;
         return(true);
     }
     else if (this.IsElementMatch(XmlHelper.ReferenceColumns, reader, context))
     {
         DBColumnList cols = new DBColumnList();
         cols.ReadReferenceXml(reader, context);
         this.ReferenceColumns = cols;
         return(true);
     }
     else
     {
         return(base.ReadAnInnerElement(reader, context));
     }
 }
 protected override bool ReadAnInnerElement(System.Xml.XmlReader reader, XmlReaderContext context)
 {
     if (IsElementMatch(XmlHelper.ColumnList, reader, context))
     {
         reader.Read();
         DBColumnList all = new DBColumnList();
         all.ReadXml(XmlHelper.ColumnList, reader, context);
         this.Columns = all;
         return(true);
     }
     else if (IsElementMatch(XmlHelper.ConstraintList, reader, context))
     {
         reader.Read();
         DBConstraintList list = new DBConstraintList();
         list.ReadXml(XmlHelper.ConstraintList, reader, context);
         this.ConstraintList = list;
         return(true);
     }
     else
     {
         return(base.ReadAnInnerElement(reader, context));
     }
 }
        //
        // ctors
        //

        #region protected DBPrimaryKey()

        /// <summary>
        /// Protected constructor for abstract class
        /// </summary>
        protected DBPrimaryKey()
            : base()
        {
            _columns = new DBColumnList();
        }