Namespace Npgsql.TypeHandling
Classes
NpgsqlSafeReadException
Can be thrown by readers to indicate that interpreting the value failed, but the value was read wholly and it is safe to continue reading. Any other exception is assumed to leave the buffer in an unknown position, losing protocol sync and therefore setting the connector to state Broken. Note that an inner exception is mandatory, and will get thrown to the user instead of the NpgsqlSafeReadException.
NpgsqlSimpleTypeHandler<TDefault>
Base class for all simple type handlers, which read and write short, non-arbitrary lengthed values to PostgreSQL. Provides a simpler API to implement when compared to NpgsqlTypeHandler - Npgsql takes care of all I/O before calling into this type, so no I/O needs to be performed by it.
NpgsqlSimpleTypeHandlerWithPsv<TDefault, TPsv>
A simple type handler that supports a provider-specific value in addition to its default value.
This is necessary mainly in cases where the CLR type cannot represent the full range of the
PostgreSQL type, and a custom CLR type is needed (e.g. System.DateTime and
NpgsqlDateTime). The provider-specific type TPsv
will be returned
from calls to System.Data.Common.DbDataReader.GetProviderSpecificValue(System.Int32).
NpgsqlTypeHandler
Base class for all type handlers, which read and write CLR types into their PostgreSQL binary representation. Type handler writers shouldn't inherit from this class, inherit NpgsqlTypeHandler or NpgsqlSimpleTypeHandler<TDefault> instead.
NpgsqlTypeHandler<TDefault>
Base class for all type handlers, which read and write CLR types into their PostgreSQL binary representation. Unless your type is arbitrary-length, consider inheriting from NpgsqlSimpleTypeHandler<TDefault> instead.
NpgsqlTypeHandlerFactory
Base class for all type handler factories, which construct type handlers that know how to read and write CLR types from/to PostgreSQL types.
NpgsqlTypeHandlerFactory<TDefault>
Base class for all type handler factories, which construct type handlers that know how to read and write CLR types from/to PostgreSQL types. Type handler factories are set up via NpgsqlTypeMapping in either the global or connection-specific type mapper.
Interfaces
INpgsqlSimpleTypeHandler<T>
Type handlers that wish to support reading other types in additional to the main one can implement this interface for all those types.
INpgsqlTypeHandler<T>
Type handlers that wish to support reading other types in additional to the main one can implement this interface for all those types.