Search Results for

    Show / Hide Table of Contents

    Class AdbNpgsqlTypeService

    Gets and sets types and values on database parameters for a Npgsql provider, such as AdbNpgsqlProvider, for a PostgreSQL® data source.

    This class is immutable. This avoids threading issues, since an instance is often accessed by multiple threads. Any user custom provider services should also be immutable for the same reason.

    Inheritance
    Object
    AdbNpgsqlTypeService
    Implements
    IAdbTypeService
    Namespace: actionETL.Adb.NpgsqlExternal
    Assembly: actionETL.dll
    Syntax
    public sealed class AdbNpgsqlTypeService : IAdbTypeService

    Methods

    Get()

    Gets a singleton instance of AdbNpgsqlTypeService, which is used when instantiating a new AdbProvider for accessing a PostgreSQL® data source.

    Declaration
    public static IAdbTypeService Get()
    Returns
    Type Description
    IAdbTypeService

    GetProviderType(DbParameter)

    Gets the provider-specific NpgsqlParameter.NpgsqlDbType enumeration value.

    Declaration
    public object GetProviderType(DbParameter dbParameter)
    Parameters
    Type Name Description
    DbParameter dbParameter

    The database parameter, which must be of type NpgsqlParameter.

    Returns
    Type Description
    Object

    NpgsqlDbType enumeration value, as an object.

    Exceptions
    Type Condition
    ArgumentException

    dbParameter is not a NpgsqlParameter.

    ArgumentNullException

    dbParameter

    GetProviderValue(DbParameter)

    Gets the provider-specific NpgsqlParameter.Value value.

    Declaration
    public object GetProviderValue(DbParameter dbParameter)
    Parameters
    Type Name Description
    DbParameter dbParameter

    The database parameter, which must be of type NpgsqlParameter.

    Returns
    Type Description
    Object

    NpgsqlParameter.Value value, as an object.

    Exceptions
    Type Condition
    ArgumentException

    dbParameter is not a NpgsqlParameter.

    ArgumentNullException

    dbParameter

    SetProviderType(DbParameter, Object)

    Sets the provider-specific NpgsqlParameter.NpgsqlDbType enumeration value.

    Declaration
    public void SetProviderType(DbParameter dbParameter, object providerTypeEnum)
    Parameters
    Type Name Description
    DbParameter dbParameter

    The database parameter, which must be of type NpgsqlParameter.

    Object providerTypeEnum

    NpgsqlParameter.NpgsqlDbType enumeration value, as an object.

    Exceptions
    Type Condition
    ArgumentException
    • dbParameter is not a NpgsqlParameter.
    • providerTypeEnum is not a NpgsqlDbType.
    ArgumentNullException
    • dbParameter
    • providerTypeEnum

    SetProviderValue(DbParameter, Object)

    Sets the provider-specific NpgsqlParameter.Value value.

    Declaration
    public void SetProviderValue(DbParameter dbParameter, object value)
    Parameters
    Type Name Description
    DbParameter dbParameter

    The database parameter, which must be of type NpgsqlParameter.

    Object value

    NpgsqlParameter.Value value, as an object.

    Exceptions
    Type Condition
    ArgumentException

    dbParameter is not a NpgsqlParameter.

    ArgumentNullException

    dbParameter

    Implements

    IAdbTypeService

    See Also

    IAdbTypeService
    AdbNpgsqlProvider
    In This Article
    Back to top Copyright © 2023 Envobi Ltd