Show / Hide Table of Contents

Class PathHandler

A type handler for the PostgreSQL path data type.

Inheritance
System.Object
NpgsqlTypeHandler
NpgsqlTypeHandler<NpgsqlPath>
PathHandler
Implements
INpgsqlTypeHandler<NpgsqlPath>
Inherited Members
NpgsqlTypeHandler<NpgsqlPath>.Read<TAny>(NpgsqlReadBuffer, Int32, Boolean, FieldDescription)
NpgsqlTypeHandler<NpgsqlPath>.Read<TAny>(NpgsqlReadBuffer, Int32, FieldDescription)
NpgsqlTypeHandler<NpgsqlPath>.ValidateAndGetLength<TAny>(TAny, NpgsqlLengthCache, NpgsqlParameter)
NpgsqlTypeHandler<NpgsqlPath>.WriteWithLength<TAny>(TAny, NpgsqlWriteBuffer, NpgsqlLengthCache, NpgsqlParameter, Boolean)
NpgsqlTypeHandler<NpgsqlPath>.ValidateObjectAndGetLength(Object, NpgsqlLengthCache, NpgsqlParameter)
NpgsqlTypeHandler<NpgsqlPath>.WriteObjectWithLength(Object, NpgsqlWriteBuffer, NpgsqlLengthCache, NpgsqlParameter, Boolean)
NpgsqlTypeHandler<NpgsqlPath>.CreateArrayHandler(PostgresArrayType)
NpgsqlTypeHandler<NpgsqlPath>.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.GeometricHandlers
Assembly: Npgsql.dll
Syntax
public class PathHandler : NpgsqlTypeHandler<NpgsqlPath>, INpgsqlTypeHandler<NpgsqlPath>
Remarks

See http://www.postgresql.org/docs/current/static/datatype-geometric.html.

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

PathHandler(PostgresType)

Declaration
public PathHandler(PostgresType postgresType)
Parameters
Type Name Description
PostgresType postgresType

Methods

Read(NpgsqlReadBuffer, Int32, Boolean, FieldDescription)

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

Declaration
public override ValueTask<NpgsqlPath> Read(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<NpgsqlPath>

The fully-read value.

Overrides
Npgsql.TypeHandling.NpgsqlTypeHandler<NpgsqlTypes.NpgsqlPath>.Read(Npgsql.NpgsqlReadBuffer, System.Int32, System.Boolean, Npgsql.BackendMessages.FieldDescription)

ValidateAndGetLength(NpgsqlPath, ref NpgsqlLengthCache, NpgsqlParameter)

Called to validate and get the length of a value of a generic NpgsqlParameter<T>.

Declaration
public override int ValidateAndGetLength(NpgsqlPath value, ref NpgsqlLengthCache lengthCache, NpgsqlParameter parameter)
Parameters
Type Name Description
NpgsqlPath value
NpgsqlLengthCache lengthCache
NpgsqlParameter parameter
Returns
Type Description
System.Int32
Overrides
Npgsql.TypeHandling.NpgsqlTypeHandler<NpgsqlTypes.NpgsqlPath>.ValidateAndGetLength(NpgsqlTypes.NpgsqlPath, Npgsql.NpgsqlLengthCache, Npgsql.NpgsqlParameter)

Write(NpgsqlPath, NpgsqlWriteBuffer, NpgsqlLengthCache, NpgsqlParameter, Boolean)

Called to write the value of a generic NpgsqlParameter<T>.

Declaration
public override Task Write(NpgsqlPath value, NpgsqlWriteBuffer buf, NpgsqlLengthCache lengthCache, NpgsqlParameter parameter, bool async)
Parameters
Type Name Description
NpgsqlPath value
NpgsqlWriteBuffer buf
NpgsqlLengthCache lengthCache
NpgsqlParameter parameter
System.Boolean async
Returns
Type Description
System.Threading.Tasks.Task
Overrides
Npgsql.TypeHandling.NpgsqlTypeHandler<NpgsqlTypes.NpgsqlPath>.Write(NpgsqlTypes.NpgsqlPath, Npgsql.NpgsqlWriteBuffer, Npgsql.NpgsqlLengthCache, Npgsql.NpgsqlParameter, System.Boolean)

Implements

INpgsqlTypeHandler<T>
In This Article
Back to top Generated by DocFX