Esempio n. 1
0
        public override IMigrationProcessor Create(string connectionString, IAnnouncer announcer, IMigrationProcessorOptions options)
        {
            var factory    = new FirebirdDbFactory();
            var connection = factory.CreateConnection(connectionString);

            return(new FirebirdProcessor(connection, new FirebirdGenerator(FBOptions), announcer, options, factory, FBOptions));
        }
        public override IMigrationProcessor Create(string connectionString, IAnnouncer announcer, IMigrationProcessorOptions options)
        {
            var fbOpt = ((FirebirdOptions)FbOptions.Clone())
                        .ApplyProviderSwitches(options.ProviderSwitches);
            var factory    = new FirebirdDbFactory();
            var connection = factory.CreateConnection(connectionString);

            return(new FirebirdProcessor(connection, new FirebirdGenerator(FbOptions), announcer, options, factory, fbOpt));
        }
        public FirebirdProcessor(
            [NotNull] FirebirdDbFactory factory,
            [NotNull] FirebirdGenerator generator,
            [NotNull] FirebirdQuoter quoter,
            [NotNull] ILogger <FirebirdProcessor> logger,
            [NotNull] IOptionsSnapshot <ProcessorOptions> options,
            [NotNull] IConnectionStringAccessor connectionStringAccessor,
            [NotNull] FirebirdOptions fbOptions)
            : base(() => factory.Factory, generator, logger, options.Value, connectionStringAccessor)
        {
            FBOptions            = fbOptions ?? throw new ArgumentNullException(nameof(fbOptions));
            _firebirdVersionFunc = new Lazy <Version>(GetFirebirdVersion);
            _quoter = quoter;
#pragma warning disable 618
            truncator = new FirebirdTruncator(FBOptions.TruncateLongNames, FBOptions.PackKeyNames);
#pragma warning restore 618
            ClearLocks();
            ClearDDLFollowers();
        }
 public override IMigrationProcessor Create(string connectionString, IAnnouncer announcer, IMigrationProcessorOptions options)
 {
     var factory = new FirebirdDbFactory();
     var connection = factory.CreateConnection(connectionString);
     return new FirebirdProcessor(connection, new FirebirdGenerator(FBOptions), announcer, options, factory, FBOptions);
 }