예제 #1
0
파일: TestMisc.cs 프로젝트: radtek/ACopy
        private void WriteCompressedEmptyTable()
        {
            IAWriter writer = AWriterFactory.CreateInstance(DbContext);

            writer.Directory      = Directory;
            writer.UseCompression = true;
            writer.Write(new List <string> {
                TestTable
            });
        }
예제 #2
0
파일: TestBase.cs 프로젝트: radtek/ACopy
        protected void Setup(string tableName)
        {
            TestTable   = tableName;
            _schemaFile = tableName + ".aschema";
            _dataFile   = tableName + ".adata";

            _writer       = AWriterFactory.CreateInstance(DbContext);
            _reader       = AReaderFactory.CreateInstance(DbContext);
            DbSchema      = DbContext.PowerPlant.CreateDbSchema();
            Commands      = DbContext.PowerPlant.CreateCommands();
            ColumnFactory = DbContext.PowerPlant.CreateColumnFactory();
            Cleanup();
        }
예제 #3
0
        public override void Setup()
        {
            DbContext        = DbContextFactory.CreateOracleContext(ConnectionStrings.GetOracle());
            _oraTableCreator = new OraTableCreator(DbContext);
            TableName        = _oraTableCreator.TableName;

            _writer           = AWriterFactory.CreateInstance(DbContext);
            _writer.Directory = ".\\";
            _reader           = AReaderFactory.CreateInstance(DbContext);
            _reader.Directory = ".\\";

            _schemaFileName = $@".\{TableName}.{_writer.SchemaFileSuffix}";
            _dataFileName   = $@".\{TableName}.{_writer.DataFileSuffix}";
            _blobFileName   = $@".\{TableName}\i000000000000000.raw";

            base.Setup();
        }
예제 #4
0
파일: Program.cs 프로젝트: radtek/ACopy
        private static void CopyOut(IDbContext dbContext, IArgumentCollection settings, List <string> tables)
        {
            IAWriter writer = AWriterFactory.CreateInstance(dbContext, new ConsoleLogger());

            writer.Directory = settings["Folder"].Value;
            if (settings["MaxDegreeOfParallelism"].IsSet)
            {
                writer.MaxDegreeOfParallelism = int.Parse(settings["MaxDegreeOfParallelism"].Value);
            }
            if (settings["DataFileSuffix"].IsSet)
            {
                writer.DataFileSuffix = settings["DataFileSuffix"].Value;
            }
            if (settings["SchemaFileSuffix"].IsSet)
            {
                writer.SchemaFileSuffix = settings["SchemaFileSuffix"].Value;
            }
            writer.UseCompression = settings["UseCompression"].IsSet;
            writer.UseU4Indexes   = settings["UseU4Indexes"].IsSet;
            writer.Write(tables);
        }
예제 #5
0
 public virtual void Setup()
 {
     writer           = AWriterFactory.CreateInstance(DbContext);
     writer.Directory = Directory;
 }