コード例 #1
0
        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));
        }
コード例 #2
0
        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));
        }
コード例 #3
0
 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)
 {
 }
コード例 #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)
 {
 }
コード例 #5
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);
        }
コード例 #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));
        }
コード例 #7
0
        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);
        }
コード例 #8
0
 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);
 }