예제 #1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="SqlServer2000Processor"/> class.
 /// </summary>
 /// <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>
 public SqlServer2000Processor(
     [NotNull] ILogger <SqlServer2000Processor> logger,
     [NotNull] SqlServer2000Generator generator,
     [NotNull] IOptionsSnapshot <ProcessorOptions> options,
     [NotNull] IConnectionStringAccessor connectionStringAccessor,
     [NotNull] ISqlBatchParserFactory sqlBatchParserFactory)
     : this(SqlClientFactory.Instance, logger, generator, options, connectionStringAccessor, sqlBatchParserFactory)
 {
 }
예제 #2
0
 /// <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 SqlServerCeProcessor(
     [NotNull] SqlServerCeDbFactory factory,
     [NotNull] SqlServerCeGenerator generator,
     [NotNull] ILogger <SqlServerCeProcessor> logger,
     [NotNull] IOptionsSnapshot <ProcessorOptions> options,
     [NotNull] IConnectionStringAccessor connectionStringAccessor,
     [NotNull] SqlServerBatchParserFactory batchParserFactory)
     : base(() => factory.Factory, generator, logger, options.Value, connectionStringAccessor)
 {
     _sqlBatchParserFactory = batchParserFactory;
 }
 public SqlServerCeProcessor(
     [NotNull] SqlServerCeDbFactory factory,
     [NotNull] SqlServerCeGenerator generator,
     [NotNull] ILogger <SqlServerCeProcessor> logger,
     [NotNull] IOptionsSnapshot <ProcessorOptions> options,
     [NotNull] IConnectionStringAccessor connectionStringAccessor,
     [NotNull] IServiceProvider serviceProvider)
     : base(() => factory.Factory, generator, logger, options.Value, connectionStringAccessor)
 {
     _sqlBatchParserFactory = serviceProvider.GetService <SqlServerBatchParserFactory>()
                              ?? new SqlServerBatchParserFactory(serviceProvider);
 }
예제 #5
0
 /// <summary>
 /// Initializes a new instance of the <see cref="SqlAnywhereProcessor"/> class.
 /// </summary>
 /// <param name="databaseType">The database type.</param>
 /// <param name="factoryAccessor">The factory accessor.</param>
 /// <param name="generator">The generator.</param>
 /// <param name="logger">The logger.</param>
 /// <param name="options">The processor options.</param>
 /// <param name="connectionStringAccessor">The connection string accessor.</param>
 /// <param name="batchParserFactory">The SQL batch parser factory.</param>
 protected SqlAnywhereProcessor(
     [NotNull] string databaseType,
     [NotNull] Func <DbProviderFactory> factoryAccessor,
     [NotNull] IMigrationGenerator generator,
     [NotNull] ILogger logger,
     [NotNull] IOptionsSnapshot <ProcessorOptions> options,
     [NotNull] IConnectionStringAccessor connectionStringAccessor,
     [NotNull] ISqlBatchParserFactory batchParserFactory)
     : base(factoryAccessor, generator, logger, options.Value, connectionStringAccessor)
 {
     _batchParserFactory = batchParserFactory;
     DatabaseType        = databaseType;
 }
예제 #6
0
        public SqlServerProcessor(
            IEnumerable <string> databaseTypes,
            IDbConnection connection,
            GenericGenerator generator,
            IAnnouncer announcer,
            [NotNull] IMigrationProcessorOptions options,
            IDbFactory factory)
            : base(connection, factory, generator, announcer, options)
        {
            var dbTypes = databaseTypes.ToList();

            DatabaseType        = dbTypes.First();
            DatabaseTypeAliases = dbTypes.Skip(1).ToList();
            Quoter = generator?.Quoter;
            _batchParserFactory = new SqlServerBatchParserFactory(null);
        }
 /// <summary>
 /// Initializes a new instance of the <see cref="SqlAnywhere16Processor"/> class.
 /// </summary>
 /// <param name="factory">The DB provider factory.</param>
 /// <param name="generator">The migration generator.</param>
 /// <param name="logger">The logger.</param>
 /// <param name="options">The processor options.</param>
 /// <param name="connectionStringAccessor">The connection string accessor.</param>
 /// <param name="batchParserFactory">The SQL batch parser factory.</param>
 public SqlAnywhere16Processor(
     [NotNull] SqlAnywhereDbFactory factory,
     [NotNull] SqlAnywhere16Generator generator,
     [NotNull] ILogger <SqlAnywhere16Processor> logger,
     [NotNull] IOptionsSnapshot <ProcessorOptions> options,
     [NotNull] IConnectionStringAccessor connectionStringAccessor,
     [NotNull] ISqlBatchParserFactory batchParserFactory)
     : base(
         "SqlAnywhere16",
         () => factory.Factory,
         generator,
         logger,
         options,
         connectionStringAccessor,
         batchParserFactory)
 {
 }
예제 #8
0
        /// <summary>
        /// Initializes a new instance of the <see cref="SqlServerProcessor"/> class.
        /// </summary>
        /// <param name="databaseTypes">The database types.</param>
        /// <param name="factory">The DB provider factory.</param>
        /// <param name="generator">The migration generator.</param>
        /// <param name="quoter">The quoter.</param>
        /// <param name="logger">The logger.</param>
        /// <param name="options">The processor options.</param>
        /// <param name="connectionStringAccessor">The connection string accessor.</param>
        /// <param name="batchParserFactory">The batch parser factory.</param>
        protected SqlServerProcessor(
            [NotNull, ItemNotNull] IEnumerable <string> databaseTypes,
            [NotNull] DbProviderFactory factory,
            [NotNull] IMigrationGenerator generator,
            [NotNull] IQuoter quoter,
            [NotNull] ILogger logger,
            [NotNull] IOptionsSnapshot <ProcessorOptions> options,
            [NotNull] IConnectionStringAccessor connectionStringAccessor,
            [NotNull] ISqlBatchParserFactory batchParserFactory)
            : base(() => factory, generator, logger, options.Value, connectionStringAccessor)
        {
            _batchParserFactory = batchParserFactory;
            var dbTypes = databaseTypes.ToList();

            DatabaseType        = dbTypes.First();
            DatabaseTypeAliases = dbTypes.Skip(1).ToList();
            Quoter = quoter;
        }
예제 #9
0
 public SqlAnywhereProcessor(string databaseType, IDbConnection connection, IMigrationGenerator generator, IAnnouncer announcer, IMigrationProcessorOptions options, IDbFactory factory)
     : base(connection, factory, generator, announcer, options)
 {
     DatabaseType        = databaseType;
     _batchParserFactory = new SqlAnywhereBatchParserFactory(null);
 }
 public SqlServerCeProcessor(IDbConnection connection, IMigrationGenerator generator, IAnnouncer announcer, IMigrationProcessorOptions options, IDbFactory factory)
     : base(connection, factory, generator, announcer, options)
 {
     _sqlBatchParserFactory = new SqlServerBatchParserFactory(null);
 }