/// <summary>
        ///     This API supports the Entity Framework Core infrastructure and is not intended to be used
        ///     directly from your code. This API may change or be removed in future releases.
        /// </summary>
        public SqlServerSequenceValueGeneratorFactory(
            [NotNull] ISqlServerUpdateSqlGenerator sqlGenerator)
        {
            Check.NotNull(sqlGenerator, nameof(sqlGenerator));

            _sqlGenerator = sqlGenerator;
        }
Ejemplo n.º 2
0
 public SqlServerMigrationsSqlGenerator(
     [NotNull] ISqlServerUpdateSqlGenerator sql,
     [NotNull] SqlServerTypeMapper typeMapper,
     [NotNull] SqlServerMetadataExtensionProvider annotations)
     : base(sql, typeMapper, annotations)
 {
 }
Ejemplo n.º 3
0
 public WithChangeTracingContextSqlServerModificationCommandBatchFactory(IRelationalCommandBuilderFactory commandBuilderFactory, ISqlGenerationHelper sqlGenerationHelper, ISqlServerUpdateSqlGenerator updateSqlGenerator, IRelationalValueBufferFactoryFactory valueBufferFactoryFactory, IDbContextOptions options)
     : base(commandBuilderFactory, sqlGenerationHelper, updateSqlGenerator, valueBufferFactoryFactory, options)
 {
     _commandBuilderFactory     = commandBuilderFactory;
     _sqlGenerationHelper       = sqlGenerationHelper;
     _updateSqlGenerator        = updateSqlGenerator;
     _valueBufferFactoryFactory = valueBufferFactoryFactory;
     _options = options;
 }
Ejemplo n.º 4
0
        public SqlServerSequenceValueGeneratorFactory(
            [NotNull] ISqlStatementExecutor executor,
            [NotNull] ISqlServerUpdateSqlGenerator sqlGenerator)
        {
            Check.NotNull(executor, nameof(executor));
            Check.NotNull(sqlGenerator, nameof(sqlGenerator));

            _executor     = executor;
            _sqlGenerator = sqlGenerator;
        }
        public SqlServerSequenceValueGeneratorFactory(
            [NotNull] ISqlStatementExecutor executor,
            [NotNull] ISqlServerUpdateSqlGenerator sqlGenerator)
        {
            Check.NotNull(executor, nameof(executor));
            Check.NotNull(sqlGenerator, nameof(sqlGenerator));

            _executor = executor;
            _sqlGenerator = sqlGenerator;
        }
        public SqlServerSequenceValueGeneratorFactory(
            [NotNull] IRawSqlCommandBuilder rawSqlCommandBuilder,
            [NotNull] ISqlServerUpdateSqlGenerator sqlGenerator)
        {
            Check.NotNull(rawSqlCommandBuilder, nameof(rawSqlCommandBuilder));
            Check.NotNull(sqlGenerator, nameof(sqlGenerator));

            _rawSqlCommandBuilder = rawSqlCommandBuilder;
            _sqlGenerator         = sqlGenerator;
        }
        /// <summary>
        ///     This API supports the Entity Framework Core infrastructure and is not intended to be used
        ///     directly from your code. This API may change or be removed in future releases.
        /// </summary>
        public SqlServerSequenceValueGeneratorFactory(
            [NotNull] IRawSqlCommandBuilder rawSqlCommandBuilder,
            [NotNull] ISqlServerUpdateSqlGenerator sqlGenerator)
        {
            Check.NotNull(rawSqlCommandBuilder, nameof(rawSqlCommandBuilder));
            Check.NotNull(sqlGenerator, nameof(sqlGenerator));

            _rawSqlCommandBuilder = rawSqlCommandBuilder;
            _sqlGenerator = sqlGenerator;
        }
Ejemplo n.º 8
0
        public SqlServerModificationCommandBatch(
            [NotNull] ISqlServerUpdateSqlGenerator sqlGenerator,
            [CanBeNull] int?maxBatchSize)
            : base(sqlGenerator)
        {
            if (maxBatchSize.HasValue &&
                maxBatchSize.Value <= 0)
            {
                throw new ArgumentOutOfRangeException(nameof(maxBatchSize), RelationalStrings.InvalidMaxBatchSize);
            }

            _maxBatchSize = Math.Min(maxBatchSize ?? Int32.MaxValue, MaxRowCount);
        }
Ejemplo n.º 9
0
 /// <summary>
 ///     This is an internal API that supports the Entity Framework Core infrastructure and not subject to
 ///     the same compatibility standards as public APIs. It may be changed or removed without notice in
 ///     any release. You should only use it directly in your code with extreme caution and knowing that
 ///     doing so can result in application failures when updating to a new Entity Framework Core release.
 /// </summary>
 public SqlServerSequenceHiLoValueGenerator(
     [NotNull] IRawSqlCommandBuilder rawSqlCommandBuilder,
     [NotNull] ISqlServerUpdateSqlGenerator sqlGenerator,
     [NotNull] SqlServerSequenceValueGeneratorState generatorState,
     [NotNull] ISqlServerConnection connection,
     [NotNull] IDiagnosticsLogger <DbLoggerCategory.Database.Command> commandLogger)
     : base(generatorState)
 {
     _sequence             = generatorState.Sequence;
     _rawSqlCommandBuilder = rawSqlCommandBuilder;
     _sqlGenerator         = sqlGenerator;
     _connection           = connection;
     _commandLogger        = commandLogger;
 }
 /// <summary>
 ///     This is an internal API that supports the Entity Framework Core infrastructure and not subject to
 ///     the same compatibility standards as public APIs. It may be changed or removed without notice in
 ///     any release. You should only use it directly in your code with extreme caution and knowing that
 ///     doing so can result in application failures when updating to a new Entity Framework Core release.
 /// </summary>
 public SqlServerSequenceHiLoValueGenerator(
     IRawSqlCommandBuilder rawSqlCommandBuilder,
     ISqlServerUpdateSqlGenerator sqlGenerator,
     SqlServerSequenceValueGeneratorState generatorState,
     ISqlServerConnection connection,
     IRelationalCommandDiagnosticsLogger commandLogger)
     : base(generatorState)
 {
     _sequence             = generatorState.Sequence;
     _rawSqlCommandBuilder = rawSqlCommandBuilder;
     _sqlGenerator         = sqlGenerator;
     _connection           = connection;
     _commandLogger        = commandLogger;
 }
        public SqlServerModificationCommandBatchFactory(
            [NotNull] IRelationalCommandBuilderFactory commandBuilderFactory,
            [NotNull] ISqlServerUpdateSqlGenerator updateSqlGenerator,
            [NotNull] IRelationalValueBufferFactoryFactory valueBufferFactoryFactory,
            [NotNull] IDbContextOptions options)
        {
            Check.NotNull(commandBuilderFactory, nameof(commandBuilderFactory));
            Check.NotNull(updateSqlGenerator, nameof(updateSqlGenerator));
            Check.NotNull(valueBufferFactoryFactory, nameof(valueBufferFactoryFactory));
            Check.NotNull(options, nameof(options));

            _commandBuilderFactory = commandBuilderFactory;
            _updateSqlGenerator = updateSqlGenerator;
            _valueBufferFactoryFactory = valueBufferFactoryFactory;
            _options = options;
        }
        public SqlServerModificationCommandBatchFactory(
            [NotNull] IRelationalCommandBuilderFactory commandBuilderFactory,
            [NotNull] ISqlServerUpdateSqlGenerator updateSqlGenerator,
            [NotNull] IRelationalValueBufferFactoryFactory valueBufferFactoryFactory,
            [NotNull] IDbContextOptions options)
        {
            Check.NotNull(commandBuilderFactory, nameof(commandBuilderFactory));
            Check.NotNull(updateSqlGenerator, nameof(updateSqlGenerator));
            Check.NotNull(valueBufferFactoryFactory, nameof(valueBufferFactoryFactory));
            Check.NotNull(options, nameof(options));

            _commandBuilderFactory     = commandBuilderFactory;
            _updateSqlGenerator        = updateSqlGenerator;
            _valueBufferFactoryFactory = valueBufferFactoryFactory;
            _options = options;
        }
        public SqlServerHistoryRepository(
            [NotNull] ISqlServerConnection connection,
            [NotNull] IRelationalDatabaseCreator creator,
            [NotNull] DbContext context,
            [NotNull] ISqlServerUpdateSqlGenerator sqlGenerator)
        {
            Check.NotNull(connection, nameof(connection));
            Check.NotNull(creator, nameof(creator));
            Check.NotNull(context, nameof(context));
            Check.NotNull(sqlGenerator, nameof(sqlGenerator));

            _connection = connection;
            _creator = creator;
            _contextType = context.GetType();
            _sql = sqlGenerator;
        }
Ejemplo n.º 14
0
        public SqlServerHistoryRepository(
            [NotNull] ISqlServerConnection connection,
            [NotNull] IRelationalDatabaseCreator creator,
            [NotNull] DbContext context,
            [NotNull] ISqlServerUpdateSqlGenerator sqlGenerator)
        {
            Check.NotNull(connection, nameof(connection));
            Check.NotNull(creator, nameof(creator));
            Check.NotNull(context, nameof(context));
            Check.NotNull(sqlGenerator, nameof(sqlGenerator));

            _connection  = connection;
            _creator     = creator;
            _contextType = context.GetType();
            _sql         = sqlGenerator;
        }
Ejemplo n.º 15
0
        /// <summary>
        ///     This API supports the Entity Framework Core infrastructure and is not intended to be used
        ///     directly from your code. This API may change or be removed in future releases.
        /// </summary>
        public SqlServerSequenceHiLoValueGenerator(
            [NotNull] IRawSqlCommandBuilder rawSqlCommandBuilder,
            [NotNull] ISqlServerUpdateSqlGenerator sqlGenerator,
            [NotNull] SqlServerSequenceValueGeneratorState generatorState,
            [NotNull] ISqlServerConnection connection)
            : base(generatorState)
        {
            Check.NotNull(rawSqlCommandBuilder, nameof(rawSqlCommandBuilder));
            Check.NotNull(sqlGenerator, nameof(sqlGenerator));
            Check.NotNull(connection, nameof(connection));

            _sequence             = generatorState.Sequence;
            _rawSqlCommandBuilder = rawSqlCommandBuilder;
            _sqlGenerator         = sqlGenerator;
            _connection           = connection;
        }
Ejemplo n.º 16
0
        public SqlServerSequenceValueGenerator(
            [NotNull] ISqlStatementExecutor executor,
            [NotNull] ISqlServerUpdateSqlGenerator sqlGenerator,
            [NotNull] SqlServerSequenceValueGeneratorState generatorState,
            [NotNull] ISqlServerConnection connection)
            : base(generatorState)
        {
            Check.NotNull(executor, nameof(executor));
            Check.NotNull(sqlGenerator, nameof(sqlGenerator));
            Check.NotNull(connection, nameof(connection));

            _sequence     = generatorState.Sequence;
            _executor     = executor;
            _sqlGenerator = sqlGenerator;
            _connection   = connection;
        }
Ejemplo n.º 17
0
 public SqlServerHistoryRepository(
     [NotNull] IDatabaseCreator databaseCreator,
     [NotNull] ISqlStatementExecutor executor,
     [NotNull] ISqlServerConnection connection,
     [NotNull] IDbContextOptions options,
     [NotNull] IMigrationsModelDiffer modelDiffer,
     [NotNull] SqlServerMigrationsSqlGenerator sqlGenerator,
     [NotNull] SqlServerMetadataExtensionProvider annotations,
     [NotNull] ISqlServerUpdateSqlGenerator sql)
     : base(
         databaseCreator,
         executor,
         connection,
         options,
         modelDiffer,
         sqlGenerator,
         annotations,
         sql)
 {
 }
Ejemplo n.º 18
0
        public SqlServerModificationCommandBatch(
            [NotNull] IRelationalCommandBuilderFactory commandBuilderFactory,
            [NotNull] ISqlGenerationHelper sqlGenerationHelper,
            // ReSharper disable once SuggestBaseTypeForParameter
            [NotNull] ISqlServerUpdateSqlGenerator updateSqlGenerator,
            [NotNull] IRelationalValueBufferFactoryFactory valueBufferFactoryFactory,
            [CanBeNull] int?maxBatchSize)
            : base(
                commandBuilderFactory,
                sqlGenerationHelper,
                updateSqlGenerator,
                valueBufferFactoryFactory)
        {
            if (maxBatchSize.HasValue &&
                (maxBatchSize.Value <= 0))
            {
                throw new ArgumentOutOfRangeException(nameof(maxBatchSize), RelationalStrings.InvalidMaxBatchSize);
            }

            _maxBatchSize = Math.Min(maxBatchSize ?? int.MaxValue, MaxRowCount);
        }
 public SqlServerMigrationSqlGenerator([NotNull] ISqlServerUpdateSqlGenerator sqlGenerator)
     : base(Check.NotNull(sqlGenerator, nameof(sqlGenerator)))
 {
     _sql = sqlGenerator;
 }
Ejemplo n.º 20
0
 public SqlServerMigrationSqlGenerator([NotNull] ISqlServerUpdateSqlGenerator sqlGenerator)
     : base(Check.NotNull(sqlGenerator, nameof(sqlGenerator)))
 {
     _sql = sqlGenerator;
 }
Ejemplo n.º 21
0
 public SqlServerModificationCommandBatchFactory(
     [NotNull] ISqlServerUpdateSqlGenerator sqlGenerator)
     : base(sqlGenerator)
 {
 }
Ejemplo n.º 22
0
 public TestSqlServerModificationCommandBatch(
     ISqlServerUpdateSqlGenerator sqlGenerator,
     int?maxBatchSize)
     : base(sqlGenerator, maxBatchSize)
 {
 }
 /// <summary>
 ///     This is an internal API that supports the Entity Framework Core infrastructure and not subject to
 ///     the same compatibility standards as public APIs. It may be changed or removed without notice in
 ///     any release. You should only use it directly in your code with extreme caution and knowing that
 ///     doing so can result in application failures when updating to a new Entity Framework Core release.
 /// </summary>
 public SqlServerSequenceValueGeneratorFactory(
     [NotNull] ISqlServerUpdateSqlGenerator sqlGenerator)
 {
     _sqlGenerator = sqlGenerator;
 }
Ejemplo n.º 24
0
 public TestSqlServerModificationCommandBatchFactory(
     ISqlServerUpdateSqlGenerator sqlGenerator)
     : base(sqlGenerator)
 {
 }
Ejemplo n.º 25
0
 public WithChangeTracingContextSqlServerModificationCommandBatch(IRelationalCommandBuilderFactory commandBuilderFactory, ISqlGenerationHelper sqlGenerationHelper, ISqlServerUpdateSqlGenerator updateSqlGenerator, IRelationalValueBufferFactoryFactory valueBufferFactoryFactory, int?maxBatchSize)
     : base(commandBuilderFactory, sqlGenerationHelper, updateSqlGenerator, valueBufferFactoryFactory, maxBatchSize)
 {
     _commandBuilderFactory = commandBuilderFactory;
 }