Beispiel #1
0
 public void LoadFrom(ITableStructure table)
 {
     _Columns.Clear();
     _Constraints.Clear();
     //_ReferencedFrom.Clear();
     FullName = table.FullName;
     Comment  = table.Comment;
     //Name = table.FullName.Name;
     //SchemaName = table.FullName.Schema;
     foreach (IColumnStructure col in table.Columns)
     {
         _Columns.Add(new ColumnStructure(col));
     }
     foreach (IConstraint cnt in table.Constraints)
     {
         _Constraints.Add(Constraint.CreateCopy(cnt));
     }
     //foreach (IForeignKey fk in table.ReferencedFrom)
     //{
     //    _ReferencedFrom.Add(new ForeignKey(fk));
     //}
     SpecificData.AddAll(table.SpecificData);
     FixedData = table.FixedData;
     //FilledMembers = table.FilledMembers;
 }
Beispiel #2
0
 public Constraint(IConstraint src)
     : base(src)
 {
     Name = src.Name;
     //Table = src.Table;
     SpecificData.AddAll(src.SpecificData);
 }
Beispiel #3
0
 public CharacterSetStructure(ICharacterSetStructure src)
     : base(src)
 {
     SpecificData.AddAll(src.SpecificData);
     Name             = src.Name;
     DefaultCollation = src.DefaultCollation;
 }
Beispiel #4
0
        public override void AssignFrom(IAbstractObjectStructure source)
        {
            base.AssignFrom(source);
            var cnt = source as IConstraint;

            Name = cnt.Name;
            SpecificData.Clear();
            SpecificData.AddAll(source.SpecificData);
        }
Beispiel #5
0
 public DomainStructure(IDomainStructure src)
     : base(src)
 {
     FullName     = src.FullName;
     DataType     = src.DataType;
     IsNullable   = src.IsNullable;
     DefaultValue = src.DefaultValue;
     CheckExpr    = src.CheckExpr;
     Collation    = src.Collation;
     CharacterSet = src.CharacterSet;
     SpecificData.AddAll(src.SpecificData);
 }
Beispiel #6
0
 public ColumnStructure(IColumnStructure src)
     : base(src)
 {
     m_columnName   = src.ColumnName;
     m_dataType     = src.DataType.Clone();
     m_isNullable   = src.IsNullable;
     m_defaultValue = src.DefaultValue;
     m_characterSet = src.CharacterSet;
     m_collation    = src.Collation;
     SpecificData.AddAll(src.SpecificData);
     //TableName = src.Table;
     //Table = src.Table;
     Domain = src.Domain;
 }
Beispiel #7
0
        /// <summary>Create a new Event Reader</summary>
        /// <param name="in"/>
        /// <exception cref="System.IO.IOException"/>
        public EventReader(DataInputStream @in)
        {
            this.@in     = @in;
            this.version = @in.ReadLine();
            if (!EventWriter.Version.Equals(version))
            {
                throw new IOException("Incompatible event log version: " + version);
            }
            Schema myschema = new SpecificData(typeof(Event).GetClassLoader()).GetSchema(typeof(
                                                                                             Event));

            this.schema  = Schema.Parse(@in.ReadLine());
            this.reader  = new SpecificDatumReader(schema, myschema);
            this.decoder = DecoderFactory.Get().JsonDecoder(schema, @in);
        }
Beispiel #8
0
 public SpecificObjectStructure(ISpecificObjectStructure src)
     : base(src)
 {
     CreateSql       = src.CreateSql;
     ObjectType      = src.ObjectType;
     SpecificDialect = src.SpecificDialect;
     ObjectName      = src.ObjectName;
     RelatedTable    = src.RelatedTable;
     SpecificData.AddAll(src.SpecificData);
     if (src.DependsOn != null)
     {
         DependsOn = new List <DependencyItem>();
         foreach (var p in src.DependsOn)
         {
             DependsOn.Add(new DependencyItem(p));
         }
     }
 }
Beispiel #9
0
 public Monster()
 {
     specificData = new SpecificData(new System.Random());
 }
Beispiel #10
0
 public void AlterDatabaseOptions(string dbname, Dictionary <string, string> options)
 {
     SpecificData.AddAll(options);
 }
Beispiel #11
0
 public CollationStructure(ICollationStructure src)
 {
     SpecificData.AddAll(src.SpecificData);
     Name         = src.Name;
     CharacterSet = src.CharacterSet;
 }
Beispiel #12
0
 public SchemaStructure(ISchemaStructure schema)
     : base(schema)
 {
     SpecificData.AddAll(schema.SpecificData);
     SchemaName = schema.SchemaName;
 }