public override IMigrationProcessor Create(string connectionString, IAnnouncer announcer, IMigrationProcessorOptions options)
        {
            var factory    = new PostgresDbFactory(_serviceProvider);
            var connection = factory.CreateConnection(connectionString);

            return(new PostgresProcessor(connection, new PostgresGenerator(new PostgresQuoter()), announcer, options, factory));
        }
        public override IMigrationProcessor Create(string connectionString, IAnnouncer announcer, IMigrationProcessorOptions options)
        {
            var optionsParsed = PostgresOptions.ParseProviderSwitches(options.ProviderSwitches);
            var quoterOptions = new OptionsWrapper <QuoterOptions>(new QuoterOptions());
            var factory       = new PostgresDbFactory(_serviceProvider);
            var connection    = factory.CreateConnection(connectionString);

            return(new PostgresProcessor(connection, new PostgresGenerator(new PostgresQuoter(quoterOptions, optionsParsed)), announcer, options, factory, optionsParsed));
        }
 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)
 {
 }
Beispiel #4
0
 public Postgres10_0Processor(
     [NotNull] PostgresDbFactory factory,
     [NotNull] Postgres10_0Generator generator,
     [NotNull] ILogger <PostgresProcessor> logger,
     [NotNull] IOptionsSnapshot <ProcessorOptions> options,
     [NotNull] IConnectionStringAccessor connectionStringAccessor,
     [NotNull] PostgresOptions pgOptions)
     : base(factory, generator, logger, options, connectionStringAccessor, pgOptions)
 {
 }
        public override IMigrationProcessor Create(string connectionString, IAnnouncer announcer, IMigrationProcessorOptions options)
        {
            var factory = new PostgresDbFactory();

            var connection =
                factory.CreateConnection(connectionString.StartsWith("pgpass=", StringComparison.OrdinalIgnoreCase)
                    ? GetPgConnectionString(connectionString)
                    : connectionString);

            return new PostgresProcessor(connection,
                new PostgresGenerator(LowerCaseIdentifiers(options.ProviderSwitches)), announcer, options, factory);
        }
Beispiel #6
0
        public override IMigrationProcessor Create(string connectionString, IAnnouncer announcer, IMigrationProcessorOptions options)
        {
            var factory = new PostgresDbFactory();

            var connection =
                factory.CreateConnection(connectionString.StartsWith("pgpass=", StringComparison.OrdinalIgnoreCase)
                    ? GetPgConnectionString(connectionString)
                    : connectionString);

            return(new PostgresProcessor(connection,
                                         new PostgresGenerator(LowerCaseIdentifiers(options.ProviderSwitches)), announcer, options, factory));
        }
        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);
        }
 public override IMigrationProcessor Create(string connectionString, IAnnouncer announcer, IMigrationProcessorOptions options)
 {
     var factory = new PostgresDbFactory();
     var connection = factory.CreateConnection(connectionString);
     return new PostgresProcessor(connection, new PostgresGenerator(), announcer, options, factory);
 }