Show / Hide Table of Contents

Class BitStringArrayHandler

A special handler for arrays of bit strings. Differs from the standard array handlers in that it returns arrays of bool for BIT(1) and arrays of BitArray otherwise (just like the scalar BitStringHandler does).

Inheritance
System.Object
NpgsqlTypeHandler
ArrayHandler
ArrayHandler<System.Collections.BitArray>
BitStringArrayHandler
Inherited Members
ArrayHandler<BitArray>.Read<TRequestedArray>(NpgsqlReadBuffer, Int32, FieldDescription)
ArrayHandler<BitArray>.ReadArray<TAnyElement>(NpgsqlReadBuffer, Boolean, Int32)
ArrayHandler<BitArray>.ReadList<TAnyElement>(NpgsqlReadBuffer, Boolean)
ArrayHandler<BitArray>.ValidateAndGetLength<TAny>(TAny, NpgsqlLengthCache, NpgsqlParameter)
ArrayHandler<BitArray>.ValidateObjectAndGetLength(Object, NpgsqlLengthCache, NpgsqlParameter)
ArrayHandler<BitArray>.WriteObjectWithLength(Object, NpgsqlWriteBuffer, NpgsqlLengthCache, NpgsqlParameter, Boolean)
ArrayHandler.CreateArrayHandler(PostgresArrayType)
ArrayHandler.CreateRangeHandler(PostgresRangeType)
NpgsqlTypeHandler.CreateConversionButNoParamException(Type)
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: Npgsql.TypeHandlers
Assembly: Npgsql.dll
Syntax
public class BitStringArrayHandler : ArrayHandler<BitArray>
Remarks

The type handler API allows customizing Npgsql's behavior in powerful ways. However, although it is public, it should be considered somewhat unstable, and may change in breaking ways, including in non-major releases. Use it at your own risk.

Constructors

BitStringArrayHandler(PostgresType, BitStringHandler)

Declaration
public BitStringArrayHandler(PostgresType postgresType, BitStringHandler elementHandler)
Parameters
Type Name Description
PostgresType postgresType
BitStringHandler elementHandler

Methods

Read<TAny>(NpgsqlReadBuffer, Int32, Boolean, FieldDescription)

Reads a value of type TAny with the given length from the provided buffer, using either sync or async I/O.

Declaration
protected override ValueTask<TAny> Read<TAny>(NpgsqlReadBuffer buf, int len, bool async, FieldDescription fieldDescription = null)
Parameters
Type Name Description
NpgsqlReadBuffer buf

The buffer from which to read.

System.Int32 len

The byte length of the value. The buffer might not contain the full length, requiring I/O to be performed.

System.Boolean async

If I/O is required to read the full length of the value, whether it should be performed synchronously or asynchronously.

FieldDescription fieldDescription

Additional PostgreSQL information about the type, such as the length in varchar(30).

Returns
Type Description
ValueTask<TAny>

The fully-read value.

Type Parameters
Name Description
TAny
Overrides
Npgsql.TypeHandlers.ArrayHandler<System.Collections.BitArray>.Read<TAny>(Npgsql.NpgsqlReadBuffer, System.Int32, System.Boolean, Npgsql.BackendMessages.FieldDescription)
In This Article
Back to top Generated by DocFX