Class NpgsqlTypeMappingBuilder
- Namespace
- Npgsql.TypeMapping
- Assembly
- Npgsql.dll
Builds instances of NpgsqlTypeMapping for addition into INpgsqlTypeMapper.
public class NpgsqlTypeMappingBuilder
- Inheritance
-
NpgsqlTypeMappingBuilder
- Inherited Members
Constructors
NpgsqlTypeMappingBuilder()
public NpgsqlTypeMappingBuilder()
Properties
ClrTypes
A set of CLR types that correspond to this type. Setting an NpgsqlParameter's Value property to one of these types will make Npgsql write its value to PostgreSQL with this mapping.
public Type[] ClrTypes { get; set; }
Property Value
- Type[]
DbTypes
A set of DbTypes that correspond to this type. Setting an NpgsqlParameter's DbType property to one of these values will make Npgsql write its value to PostgreSQL with this mapping.
public DbType[] DbTypes { get; set; }
Property Value
- DbType[]
InferredDbType
Determines what is returned from DbType when this mapping is used.
public DbType? InferredDbType { get; set; }
Property Value
NpgsqlDbType
The NpgsqlDbType that corresponds to this type. Setting an NpgsqlParameter's NpgsqlDbType property to this value will make Npgsql write its value to PostgreSQL with this mapping.
public NpgsqlDbType? NpgsqlDbType { get; set; }
Property Value
PgTypeName
The name of the PostgreSQL type name, as it appears in the pg_type catalog.
public string PgTypeName { get; set; }
Property Value
Remarks
This can a a partial name (without the schema), or a fully-qualified name (schema.typename) - the latter can be used if you have two types with the same name in different schemas.
TypeHandlerFactory
A factory for a type handler that will be used to read and write values for PostgreSQL type.
public NpgsqlTypeHandlerFactory TypeHandlerFactory { get; set; }
Property Value
Methods
Build()
Builds an NpgsqlTypeMapping that can be added to an INpgsqlTypeMapper.
public NpgsqlTypeMapping Build()