Exemplo n.º 1
0
        public void ReadSchemaOfTable(AbstractTable table)
        {
            var schema = conn_.GetSchema(table.TableName);

            foreach (var col in schema.Columns)
            {
            }
        }
Exemplo n.º 2
0
        public BufferedTable(AbstractTable aTable)
            : base(aTable.OwnerDB)
        {
            table = aTable;

            // カラムコピー
            for (int i = 0; i < table.ColumnList.Count; i++)
            {
                var col = table.ColumnList[i];
                if (col.Name == "id")
                {
                    continue;
                }
                base.AddColumn(col.Name, col.Type, col.Option);
            }
        }
Exemplo n.º 3
0
        public T BackupTable <T>(string baseName, int year, bool createWhenNotExist = false) where T : AbstractTable
        {
            string tableName = "backup" + year + "_" + baseName;

            AbstractTable table = Table(tableName);

            if (table == null)
            {
                if (ExistTable(tableName) || createWhenNotExist)
                {
                    Type type = typeof(T);
                    System.Reflection.ConstructorInfo ctor = type.GetConstructor(new Type[] { typeof(AbstractDatabase), typeof(string) });
                    table = (T)ctor.Invoke(new object[] { this, tableName });
                    AddTable(tableName, table);
                    table.InitTable(createWhenNotExist);
                }
            }

            return(table as T);
        }
Exemplo n.º 4
0
 public Row(AbstractTable table)
 {
     columns_ = new Dictionary <string, object>();
     Table    = table;
 }
Exemplo n.º 5
0
 protected void AddTable(string tableName, AbstractTable table)
 {
     tables_[tableName] = table;
 }