protected void SetUp(IDbFactory dbFactory)
 {
     this.Factory = dbFactory;
     this.Connection = this.Factory.CreateConnection(IntegrationTestOptions.Oracle.ConnectionString);
     this.Processor = new OracleProcessor(this.Connection, new OracleGenerator(), new TextWriterAnnouncer(System.Console.Out), new ProcessorOptions(), this.Factory);
     this.Connection.Open();
 }
 public void SetUp()
 {
     Factory = new OracleDbFactory();
     Connection = Factory.CreateConnection(IntegrationTestOptions.Oracle.ConnectionString);
     Quoter = new OracleQuoter();
     Processor = new OracleProcessor(Connection, new OracleGenerator(), new TextWriterAnnouncer(System.Console.Out), new ProcessorOptions(), Factory);
     Connection.Open();
 }
        /// <summary>
        /// Creates tables in source oracle database and asserts that they exist
        /// </summary>
        /// <param name="experssions">The tables to be created</param>
        private void ExecuteMigrations(params IMigrationExpression[] experssions)
        {
            if (experssions == null)
            return;

             using (var connection = OracleFactory.GetOpenConnection(_source.ConnectionString))
             {
            var processor = new OracleProcessor(connection, new OracleGenerator(), new DebugAnnouncer(), new ProcessorOptions());

            foreach (var expression in experssions)
            {
                if (expression is CreateTableExpression)
                {
                    var create = (CreateTableExpression)expression;
                    processor.Process(create);
                    Assert.IsTrue(processor.TableExists(string.Empty, create.TableName), "Source " + create.TableName);
                }

                if (expression is CreateForeignKeyExpression)
                {
                    processor.Process((CreateForeignKeyExpression)expression);
                }
            }

            processor.CommitTransaction();
             }
        }
        /// <summary>
        /// Creates views in Oracle using the <see cref="ViewDefinition.CreateViewSql"/>
        /// </summary>
        /// <param name="view">The views to be created</param>
        private void CreateViews(params ViewDefinition[] view)
        {
            using (var connection = OracleFactory.GetOpenConnection(_source.ConnectionString))
             {
            var processor = new OracleProcessor(connection, new OracleGenerator(), new DebugAnnouncer(), new ProcessorOptions());

            foreach (var viewDefinition in view)
            {
               processor.Execute(viewDefinition.CreateViewSql);
            }

            processor.CommitTransaction();
             }
        }
 /// <summary>
 /// Creates a new instance of a <see cref="OracleSchemaDumper"/>
 /// </summary>
 /// <param name="processor">The processor that will be used to obtain schema information from</param>
 /// <param name="announcer">The anncouncer instance that will report progress</param>
 public OracleSchemaDumper(OracleProcessor processor, IAnnouncer announcer)
 {
     Announcer = announcer;
      Processor = processor;
 }