Class NpgsqlTypeMappingBuilder
Builds instances of NpgsqlTypeMapping for addition into INpgsqlTypeMapper.
Inheritance
Inherited Members
Namespace: Npgsql.TypeMapping
Assembly: Npgsql.dll
Syntax
public class 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.
Declaration
public Type[] ClrTypes { get; set; }
Property Value
Type | Description |
---|---|
System.Type[] |
DbTypes
A set of System.Data.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.
Declaration
public DbType[] DbTypes { get; set; }
Property Value
Type | Description |
---|---|
System.Data.DbType[] |
InferredDbType
Determines what is returned from DbType when this mapping is used.
Declaration
public DbType? InferredDbType { get; set; }
Property Value
Type | Description |
---|---|
System.Nullable<System.Data.DbType> |
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.
Declaration
public NpgsqlDbType? NpgsqlDbType { get; set; }
Property Value
Type | Description |
---|---|
System.Nullable<NpgsqlDbType> |
PgTypeName
The name of the PostgreSQL type name, as it appears in the pg_type catalog.
Declaration
public string PgTypeName { get; set; }
Property Value
Type | Description |
---|---|
System.String |
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.
Declaration
public NpgsqlTypeHandlerFactory TypeHandlerFactory { get; set; }
Property Value
Type | Description |
---|---|
NpgsqlTypeHandlerFactory |
Methods
Build()
Builds an NpgsqlTypeMapping that can be added to an INpgsqlTypeMapper.
Declaration
public NpgsqlTypeMapping Build()
Returns
Type | Description |
---|---|
NpgsqlTypeMapping |