public JetProcessor( [NotNull] JetGenerator generator, [NotNull] ILogger <JetProcessor> logger, [NotNull] IOptionsSnapshot <ProcessorOptions> options, [NotNull] IConnectionStringAccessor connectionStringAccessor) : base(generator, logger, options.Value) { var factory = OleDbFactory.Instance; var connectionString = connectionStringAccessor.ConnectionString ?? options.Value.ConnectionString; if (factory != null) { _connection = new Lazy <OleDbConnection>( () => { var conn = (OleDbConnection)factory.CreateConnection(); Debug.Assert(conn != null, nameof(conn) + " != null"); conn.ConnectionString = connectionString; return(conn); }); } #pragma warning disable 612 ConnectionString = connectionString; #pragma warning restore 612 }
public ExtendedOracleProcessorBase(OracleBaseDbFactory factory, IMigrationGenerator generator, ILogger logger, IOptionsSnapshot <ProcessorOptions> options, IOptionsSnapshot <RunnerOptions> runnerOptions, IConnectionStringAccessor connectionStringAccessor, IExtendedMigrationGenerator <ExtendedOracleMigrationGenerator> extendedGenerator, IDbMigrationConfig migrationConfig, IMigrationSourceItem migrationSourceItem = null, IVersionTableMetaData versionTableMetaData = null, IOptions <FluentMigratorLoggerOptions> loggerGenOptions = null, IOptions <LogFileFluentMigratorLoggerOptions> logFileOptions = null) : base(ProcessorIds.OracleProcessorId, factory, generator, logger, options, connectionStringAccessor) { RunnerOptions = runnerOptions; MigrationConfig = migrationConfig; VersionTableMetaData = versionTableMetaData; LoggerOptions = loggerGenOptions?.Value; LoggerFileOptions = logFileOptions?.Value; IsSqlLogEnabled = (LoggerOptions?.ShowSql ?? false) || (LoggerFileOptions?.ShowSql ?? false); ExtendedGenerator = extendedGenerator; MigrationMetadata = new MigrationMetadata(migrationSourceItem).InitMetadata(MigrationConfig); ConnectionStringFunc = () => connectionStringAccessor.ConnectionString; Initialize(); }
public ExtendedPostgresProcessor(IDbMigrationConfig dbMigrationConfig, PostgresQuoter quoter, PostgresDbFactory factory, PostgresGenerator generator, ILogger <ExtendedPostgresProcessor> logger, IOptionsSnapshot <ProcessorOptions> options, IConnectionStringAccessor connectionStringAccessor, IExtendedMigrationGenerator <ExtendedPostgresGenerator> extendedGenerator) : base(factory, generator, logger, options, connectionStringAccessor) { ExtendedGeneratorField = extendedGenerator; DbMigrationConfig = dbMigrationConfig; if (dbMigrationConfig.ProcessorId == ProcessorIds.PostgresProcessorId) { var stopWatch = new StopWatch(); PostgresDatabaseCreator.CreateDatabase( dbMigrationConfig, () => { Logger.LogSay($"Creating Postgres database '{dbMigrationConfig.DatabaseName.ToLower()}'..."); stopWatch.Start(); }, sql => { stopWatch.Stop(); Logger.LogSql(sql); Logger.LogSay($"Created Postgres database '{dbMigrationConfig.DatabaseName.ToLower()}'..."); Logger.LogElapsedTime(stopWatch.ElapsedTime()); }); } this.SetPrivateFieldValue <PostgresProcessor>("_quoter", quoter); }
public NzbDroneSQLiteProcessor(SQLiteDbFactory factory, SQLiteGenerator generator, ILogger <NzbDroneSQLiteProcessor> logger, IOptionsSnapshot <ProcessorOptions> options, IConnectionStringAccessor connectionStringAccessor, IServiceProvider serviceProvider) : base(factory, generator, logger, options, connectionStringAccessor, serviceProvider) { }
public ExtendedOracleProcessorBase(OracleBaseDbFactory factory, IMigrationGenerator generator, ILogger logger, IOptionsSnapshot <ProcessorOptions> options, IConnectionStringAccessor connectionStringAccessor, IExtendedMigrationGenerator <ExtendedOracleMigrationGenerator> extendedGenerator) : base(ProcessorIds.OracleProcessorId, factory, generator, logger, options, connectionStringAccessor) { ExtendedGenerator = extendedGenerator; }
public RedshiftProcessor( [NotNull] RedshiftDbFactory factory, [NotNull] RedshiftGenerator generator, [NotNull] ILogger <RedshiftProcessor> logger, [NotNull] IOptions <ProcessorOptions> options, [NotNull] IConnectionStringAccessor connectionStringAccessor) : base(() => factory.Factory, generator, logger, options.Value, connectionStringAccessor) { }
public DotConnectOracleProcessor( [NotNull] DotConnectOracleDbFactory factory, [NotNull] IOracleGenerator generator, [NotNull] ILogger <DotConnectOracleProcessor> logger, [NotNull] IOptionsSnapshot <ProcessorOptions> options, [NotNull] IConnectionStringAccessor connectionStringAccessor) : base(() => factory.Factory, generator, logger, options.Value, connectionStringAccessor) { }
/// <inheritdoc /> public Processor( DbProviderFactory factory, [NotNull] ILogger logger, [NotNull] SqlServer2000Generator generator, [NotNull] IOptionsSnapshot <ProcessorOptions> options, [NotNull] IConnectionStringAccessor connectionStringAccessor) : base(factory, logger, generator, options, connectionStringAccessor, new SqlServerBatchParserFactory(null)) { }
public HanaProcessor( [NotNull] HanaDbFactory factory, [NotNull] HanaGenerator generator, [NotNull] ILogger <HanaProcessor> logger, [NotNull] IOptionsSnapshot <ProcessorOptions> options, [NotNull] IConnectionStringAccessor connectionStringAccessor) : base(() => factory.Factory, generator, logger, options.Value, connectionStringAccessor) { }
public PostgresProcessor( [NotNull] PostgresDbFactory factory, [NotNull] PostgresGenerator generator, [NotNull] ILogger <PostgresProcessor> logger, [NotNull] IOptions <ProcessorOptions> options, [NotNull] IConnectionStringAccessor connectionStringAccessor) : base(() => factory.Factory, generator, logger, options.Value, connectionStringAccessor) { }
public OracleManagedProcessor( [NotNull] OracleManagedDbFactory factory, [NotNull] OracleGenerator generator, [NotNull] ILogger <OracleManagedProcessor> logger, [NotNull] IOptionsSnapshot <ProcessorOptions> options, [NotNull] IConnectionStringAccessor connectionStringAccessor) : base("OracleManaged", factory, generator, logger, options, connectionStringAccessor) { }
public SqlServer2000Processor( [NotNull] ILogger <SqlServer2000Processor> logger, [NotNull] SqlServer2000Generator generator, [NotNull] IOptionsSnapshot <ProcessorOptions> options, [NotNull] IConnectionStringAccessor connectionStringAccessor, [NotNull] IServiceProvider serviceProvider) : this(SqlClientFactory.Instance, logger, generator, options, connectionStringAccessor, serviceProvider) { }
protected MySqlProcessor( [NotNull] MySqlDbFactory factory, [NotNull] IMigrationGenerator generator, [NotNull] ILogger <MySqlProcessor> logger, [NotNull] IOptionsSnapshot <ProcessorOptions> options, [NotNull] IConnectionStringAccessor connectionStringAccessor) : base(() => factory.Factory, generator, logger, options.Value, connectionStringAccessor) { }
/// <summary> /// Initializes a new instance of the <see cref="SqlServer2005Processor"/> class. /// </summary> /// <param name="logger">The logger.</param> /// <param name="quoter">The quoter.</param> /// <param name="generator">The migration generator.</param> /// <param name="options">The processor options.</param> /// <param name="connectionStringAccessor">The connection string accessor.</param> /// <param name="batchParserFactory"></param> public SqlServer2005Processor( [NotNull] ILogger <SqlServer2005Processor> logger, [NotNull] SqlServer2005Quoter quoter, [NotNull] SqlServer2005Generator generator, [NotNull] IOptionsSnapshot <ProcessorOptions> options, [NotNull] IConnectionStringAccessor connectionStringAccessor, [NotNull] SqlServerBatchParserFactory batchParserFactory) : base(new[] { "SqlServer2005", "SqlServer" }, SqlClientFactory.Instance, generator, quoter, logger, options, connectionStringAccessor, batchParserFactory) { }
public Postgres92Processor( [NotNull] PostgresDbFactory factory, [NotNull] Postgres92Generator generator, [NotNull] ILogger <PostgresProcessor> logger, [NotNull] IOptionsSnapshot <ProcessorOptions> options, [NotNull] IConnectionStringAccessor connectionStringAccessor, [NotNull] PostgresOptions pgOptions) : base(factory, generator, logger, options, connectionStringAccessor, pgOptions) { }
public SqlServer2005Processor( [NotNull] ILogger <SqlServer2005Processor> logger, [NotNull] SqlServer2005Quoter quoter, [NotNull] SqlServer2005Generator generator, [NotNull] IOptionsSnapshot <ProcessorOptions> options, [NotNull] IConnectionStringAccessor connectionStringAccessor, [NotNull] IServiceProvider serviceProvider) : base(new[] { "SqlServer2005", "SqlServer" }, generator, quoter, logger, options, connectionStringAccessor, serviceProvider) { }
protected SqlServerProcessor( [NotNull, ItemNotNull] IEnumerable <string> databaseTypes, [NotNull] IMigrationGenerator generator, [NotNull] IQuoter quoter, [NotNull] ILogger logger, [NotNull] IOptionsSnapshot <ProcessorOptions> options, [NotNull] IConnectionStringAccessor connectionStringAccessor, [NotNull] IServiceProvider serviceProvider) : this(databaseTypes, SqlClientFactory.Instance, generator, quoter, logger, options, connectionStringAccessor, serviceProvider) { }
public ExtendedOracleProcessorBase( IDbConfig dbConfig, OracleBaseDbFactory factory, IMigrationGenerator generator, ILogger logger, IOptionsSnapshot <ProcessorOptions> options, IConnectionStringAccessor connectionStringAccessor, IExtendedMigrationGenerator <ExtendedOracleMigrationGenerator> extendedGenerator) : base(dbConfig.DbType.GetProcessorId(), factory, generator, logger, options, connectionStringAccessor) { ExtendedGenerator = extendedGenerator; }
public Db2Processor( [NotNull] Db2DbFactory factory, [NotNull] Db2Generator generator, [NotNull] Db2Quoter quoter, [NotNull] ILogger <Db2Processor> logger, [NotNull] IOptionsSnapshot <ProcessorOptions> options, [NotNull] IConnectionStringAccessor connectionStringAccessor) : base(() => factory.Factory, generator, logger, options.Value, connectionStringAccessor) { Quoter = quoter; }
public SQLiteProcessor( [NotNull] SQLiteDbFactory factory, [NotNull] SQLiteGenerator generator, [NotNull] ILogger <SQLiteProcessor> logger, [NotNull] IOptionsSnapshot <ProcessorOptions> options, [NotNull] IConnectionStringAccessor connectionStringAccessor, [NotNull] IServiceProvider serviceProvider) : base(() => factory.Factory, generator, logger, options.Value, connectionStringAccessor) { _serviceProvider = serviceProvider; }
/// <summary> /// Initializes a new instance of the <see cref="SQLiteProcessor"/> class. /// </summary> /// <param name="factory">The SQLite DB factory.</param> /// <param name="generator">The migration generator.</param> /// <param name="logger">The logger.</param> /// <param name="options">The options.</param> /// <param name="connectionStringAccessor">The connection string accessor.</param> /// <param name="batchParserFactory">The batch parser factory.</param> public SQLiteProcessor( [NotNull] SQLiteDbFactory factory, [NotNull] SQLiteGenerator generator, [NotNull] ILogger <SQLiteProcessor> logger, [NotNull] IOptionsSnapshot <ProcessorOptions> options, [NotNull] IConnectionStringAccessor connectionStringAccessor, [NotNull] SQLiteBatchParserFactory batchParserFactory) : base(() => factory.Factory, generator, logger, options.Value, connectionStringAccessor) { _batchParserFactory = batchParserFactory; }
protected SqlServer2000Processor( DbProviderFactory factory, [NotNull] ILogger logger, [NotNull] SqlServer2000Generator generator, [NotNull] IOptionsSnapshot <ProcessorOptions> options, [NotNull] IConnectionStringAccessor connectionStringAccessor, [NotNull] IServiceProvider serviceProvider) : base(() => factory, generator, logger, options.Value, connectionStringAccessor) { _serviceProvider = serviceProvider; }
protected OracleProcessorBase( [NotNull] string databaseType, [NotNull] OracleBaseDbFactory factory, [NotNull] IMigrationGenerator generator, [NotNull] ILogger logger, [NotNull] IOptionsSnapshot <ProcessorOptions> options, [NotNull] IConnectionStringAccessor connectionStringAccessor) : base(() => factory.Factory, generator, logger, options.Value, connectionStringAccessor) { DatabaseType = databaseType; }
/// <summary> /// Initializes a new instance of the <see cref="SqlServer2000Processor"/> class. /// </summary> /// <param name="factory">The DB provider factory.</param> /// <param name="logger">The logger.</param> /// <param name="generator">The migration generator.</param> /// <param name="options">The processor options.</param> /// <param name="connectionStringAccessor">The connection string accessor.</param> /// <param name="sqlBatchParserFactory">The factory for the SQL batch parser.</param> protected SqlServer2000Processor( [NotNull] DbProviderFactory factory, [NotNull] ILogger logger, [NotNull] SqlServer2000Generator generator, [NotNull] IOptionsSnapshot <ProcessorOptions> options, [NotNull] IConnectionStringAccessor connectionStringAccessor, [NotNull] ISqlBatchParserFactory sqlBatchParserFactory) : base(() => factory, generator, logger, options.Value, connectionStringAccessor) { _sqlBatchParserFactory = sqlBatchParserFactory; }
public ExtendedOracleManagedProcessor( OracleManagedDbFactory factory, OracleGenerator generator, ILogger <ExtendedOracleManagedProcessor> logger, IOptionsSnapshot <ProcessorOptions> options, IConnectionStringAccessor connectionStringAccessor, IExtendedMigrationProcessor <ExtendedOracleProcessorBase> extendedMigrationProcessor ) : base(factory, generator, logger, options, connectionStringAccessor) { ExtendedMigrationProcessor = extendedMigrationProcessor; }
public SQLiteProcessor( [NotNull] SQLiteDbFactory factory, [NotNull] SQLiteGenerator generator, [NotNull] ILogger <SQLiteProcessor> logger, [NotNull] IOptionsSnapshot <ProcessorOptions> options, [NotNull] IConnectionStringAccessor connectionStringAccessor, [NotNull] IServiceProvider serviceProvider) : base(() => factory.Factory, generator, logger, options.Value, connectionStringAccessor) { _batchParserFactory = serviceProvider.GetService <SQLiteBatchParserFactory>() ?? new SQLiteBatchParserFactory(serviceProvider); }
/// <summary> /// /// </summary> /// <param name="logger"></param> /// <param name="generator"></param> /// <param name="options"></param> /// <param name="connectionStringAccessor"></param> /// <param name="factory"></param> /// <param name="quoter"></param> /// <param name="serviceProvider"></param> public SybaseAseProcessor( [NotNull] ILogger <SybaseAseProcessor> logger, [NotNull] SybaseAse2000Generator generator, [NotNull] IOptionsSnapshot <ProcessorOptions> options, [NotNull] IConnectionStringAccessor connectionStringAccessor, [NotNull] SybaseAseDbFactory factory, [NotNull] IQuoter quoter, [NotNull] IServiceProvider serviceProvider) : base(() => factory.Factory, generator, logger, options?.Value, connectionStringAccessor) { _serviceProvider = serviceProvider; Quoter = quoter; }
protected SqlAnywhereProcessor( [NotNull] string databaseType, [NotNull] Func <DbProviderFactory> factoryAccessor, [NotNull] IMigrationGenerator generator, [NotNull] ILogger logger, [NotNull] IOptionsSnapshot <ProcessorOptions> options, [NotNull] IConnectionStringAccessor connectionStringAccessor, [NotNull] IServiceProvider serviceProvider) : base(factoryAccessor, generator, logger, options.Value, connectionStringAccessor) { _serviceProvider = serviceProvider; DatabaseType = databaseType; }
/// <inheritdoc /> public MySql4Processor( [NotNull] MySqlDbFactory factory, [NotNull] MySql4Generator generator, [NotNull] ILogger <MySql4Processor> logger, [NotNull] IOptionsSnapshot <ProcessorOptions> options, [NotNull] IConnectionStringAccessor connectionStringAccessor) : base( factory, generator, logger, options, connectionStringAccessor) { }
public PostgresProcessor( [NotNull] PostgresDbFactory factory, [NotNull] PostgresGenerator generator, [NotNull] ILogger <PostgresProcessor> logger, [NotNull] IOptionsSnapshot <ProcessorOptions> options, [NotNull] IConnectionStringAccessor connectionStringAccessor, [NotNull] PostgresOptions pgOptions) : base(() => factory.Factory, generator, logger, options.Value, connectionStringAccessor) { if (pgOptions == null) { throw new ArgumentNullException(nameof(pgOptions)); } _quoter = new PostgresQuoter(pgOptions); }