Class ReplicationValue
Represents a column value in a logical replication session.
Inherited Members
Namespace: Npgsql.Replication.PgOutput
Assembly: Npgsql.dll
Syntax
public class ReplicationValue
Properties
IsDBNull
Gets a value that indicates whether the column contains nonexistent or missing values.
Declaration
public bool IsDBNull { get; }
Property Value
Type | Description |
---|---|
Boolean | true if the specified column is equivalent to DBNull; otherwise false. |
IsUnchangedToastedValue
Gets a value that indicates whether the column contains an unchanged TOASTed value (the actual value is not sent).
Declaration
public bool IsUnchangedToastedValue { get; }
Property Value
Type | Description |
---|---|
Boolean | Whether the specified column is an unchanged TOASTed value. |
Kind
The kind of data transmitted for a tuple in a Logical Replication Protocol message.
Declaration
public TupleDataKind Kind { get; }
Property Value
Type | Description |
---|---|
TupleDataKind |
Length
The length of the value in bytes.
Declaration
public int Length { get; }
Property Value
Type | Description |
---|---|
Int32 |
Methods
Get(CancellationToken)
Gets the value of the specified column as an instance of Object.
Declaration
public ValueTask<object> Get(CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
CancellationToken | cancellationToken | An optional token to cancel the asynchronous operation. The default value is None. |
Returns
Type | Description |
---|---|
ValueTask<Object> |
Get<T>(CancellationToken)
Gets the value of the specified column as a type.
Declaration
public ValueTask<T> Get<T>(CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
CancellationToken | cancellationToken | An optional token to cancel the asynchronous operation. The default value is None. |
Returns
Type | Description |
---|---|
ValueTask<T> |
Type Parameters
Name | Description |
---|---|
T | The type of the value to be returned. |
GetDataTypeName()
Gets the data type information for the specified field. This is be the PostgreSQL type name (e.g. double precision), not the .NET type (see GetFieldType() for that).
Declaration
public string GetDataTypeName()
Returns
Type | Description |
---|---|
String |
GetFieldType()
Gets the data type of the specified column.
Declaration
public Type GetFieldType()
Returns
Type | Description |
---|---|
Type | The data type of the specified column. |
GetPostgresType()
Gets a representation of the PostgreSQL data type for the specified field. The returned representation can be used to access various information about the field.
Declaration
public PostgresType GetPostgresType()
Returns
Type | Description |
---|---|
PostgresType |
GetStream()
Retrieves data as a Stream.
Declaration
public Stream GetStream()
Returns
Type | Description |
---|---|
Stream |
GetTextReader()
Retrieves data as a TextReader.
Declaration
public TextReader GetTextReader()
Returns
Type | Description |
---|---|
TextReader |