/
dev-npgsql
/
npgsql
Обзор
Документация
Войти
/
dev-npgsql
/
npgsql
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
test-logs
src/Npgsql/Replication/PgOutput/Messages/FullUpdateMessage.cs
47 строк
1 KB
Nino Floris
Remove obsolete UTF-8 BOMs (#6542)
13 апр 2026, 17:13
Не верифицирован
13 апр 2026, 17:13
5225216
Код
Авторство
О чём код?
using System; using System.Threading; using System.Threading.Tasks; using Npgsql.Internal; using NpgsqlTypes; namespace Npgsql.Replication.PgOutput.Messages; /// <summary> /// Logical Replication Protocol update message for tables with REPLICA IDENTITY set to FULL. /// </summary> public sealed class FullUpdateMessage : UpdateMessage { readonly ReplicationTuple _oldRow; readonly SecondRowTupleEnumerable _newRow; /// <summary> /// Columns representing the old row. /// </summary> public ReplicationTuple OldRow => _oldRow; /// <summary> /// Columns representing the new row. /// </summary> public override ReplicationTuple NewRow => _newRow; internal FullUpdateMessage(NpgsqlConnector connector) { _oldRow = new(connector); _newRow = new(connector, _oldRow); } internal UpdateMessage Populate( NpgsqlLogSequenceNumber walStart, NpgsqlLogSequenceNumber walEnd, DateTime serverClock, uint? transactionXid, RelationMessage relation, ushort numColumns) { base.Populate(walStart, walEnd, serverClock, transactionXid, relation); _oldRow.Reset(numColumns, relation.RowDescription); _newRow.Reset(numColumns, relation.RowDescription); return this; } internal Task Consume(CancellationToken cancellationToken) => _newRow.Consume(cancellationToken); }