Esempio n. 1
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 NpgsqlSequenceValueGeneratorFactory(
            [NotNull] IRawSqlCommandBuilder rawSqlCommandBuilder,
            [NotNull] NpgsqlUpdateSqlGenerator 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 NpgsqlSequenceHiLoValueGenerator(
            [NotNull] IRawSqlCommandBuilder rawSqlCommandBuilder,
            [NotNull] NpgsqlUpdateSqlGenerator sqlGenerator,
            [NotNull] NpgsqlSequenceValueGeneratorState generatorState,
            [NotNull] NpgsqlRelationalConnection 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;
        }
Esempio n. 3
0
        public NpgsqlHistoryRepository(
            [NotNull] NpgsqlDatabaseConnection connection,
            [NotNull] IRelationalDatabaseCreator creator,
            [NotNull] DbContext context,
            [NotNull] NpgsqlUpdateSqlGenerator 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;
        }
Esempio n. 4
0
 public NpgsqlMigrationSqlGenerator([NotNull] NpgsqlUpdateSqlGenerator sqlGenerator)
     : base(Check.NotNull(sqlGenerator, nameof(sqlGenerator)))
 {
     _sql = sqlGenerator;
 }