Search Results for

    Show / Hide Table of Contents

    Class NpgsqlDatabaseInfo

    Base class for implementations which provide information about PostgreSQL and PostgreSQL-like databases (e.g. type definitions, capabilities...).

    Inheritance
    Object
    NpgsqlDatabaseInfo
    Inherited Members
    Object.Equals(Object)
    Object.Equals(Object, Object)
    Object.GetHashCode()
    Object.GetType()
    Object.MemberwiseClone()
    Object.ReferenceEquals(Object, Object)
    Object.ToString()
    Namespace: Npgsql
    Assembly: Npgsql.dll
    Syntax
    public abstract class NpgsqlDatabaseInfo

    Constructors

    | Improve this Doc

    NpgsqlDatabaseInfo(String, Int32, String, Version)

    Initializes the instance of NpgsqlDatabaseInfo.

    Declaration
    protected NpgsqlDatabaseInfo(string host, int port, string databaseName, Version version)
    Parameters
    Type Name Description
    String host
    Int32 port
    String databaseName
    Version version

    Properties

    | Improve this Doc

    HasIntegerDateTimes

    Reports whether the backend uses the newer integer timestamp representation.

    Declaration
    public virtual bool HasIntegerDateTimes { get; protected set; }
    Property Value
    Type Description
    Boolean
    | Improve this Doc

    Host

    The hostname of IP address of the database.

    Declaration
    public string Host { get; }
    Property Value
    Type Description
    String
    | Improve this Doc

    Name

    The database name.

    Declaration
    public string Name { get; }
    Property Value
    Type Description
    String
    | Improve this Doc

    Port

    The TCP port of the database.

    Declaration
    public int Port { get; }
    Property Value
    Type Description
    Int32
    | Improve this Doc

    SupportsAdvisoryLocks

    Whether the backend supports advisory locks.

    Declaration
    public virtual bool SupportsAdvisoryLocks { get; }
    Property Value
    Type Description
    Boolean
    | Improve this Doc

    SupportsCloseAll

    Whether the backend supports the CLOSE ALL statement.

    Declaration
    public virtual bool SupportsCloseAll { get; }
    Property Value
    Type Description
    Boolean
    | Improve this Doc

    SupportsDiscard

    Whether the backend supports the DISCARD statement.

    Declaration
    public virtual bool SupportsDiscard { get; }
    Property Value
    Type Description
    Boolean
    | Improve this Doc

    SupportsDiscardSequences

    Whether the backend supports the DISCARD SEQUENCES statement.

    Declaration
    public virtual bool SupportsDiscardSequences { get; }
    Property Value
    Type Description
    Boolean
    | Improve this Doc

    SupportsDiscardTemp

    Whether the backend supports the DISCARD TEMP statement.

    Declaration
    public virtual bool SupportsDiscardTemp { get; }
    Property Value
    Type Description
    Boolean
    | Improve this Doc

    SupportsEnumTypes

    Whether the backend supports enum types.

    Declaration
    public virtual bool SupportsEnumTypes { get; }
    Property Value
    Type Description
    Boolean
    | Improve this Doc

    SupportsRangeTypes

    Whether the backend supports range types.

    Declaration
    public virtual bool SupportsRangeTypes { get; }
    Property Value
    Type Description
    Boolean
    | Improve this Doc

    SupportsTransactions

    Whether the database supports transactions.

    Declaration
    public virtual bool SupportsTransactions { get; protected set; }
    Property Value
    Type Description
    Boolean
    | Improve this Doc

    SupportsUnlisten

    Whether the backend supports the UNLISTEN statement.

    Declaration
    public virtual bool SupportsUnlisten { get; }
    Property Value
    Type Description
    Boolean
    | Improve this Doc

    Version

    The version of the PostgreSQL database we're connected to, as reported in the "server_version" parameter. Exposed via PostgreSqlVersion.

    Declaration
    public Version Version { get; }
    Property Value
    Type Description
    Version

    Methods

    | Improve this Doc

    GetTypes()

    Provides all PostgreSQL types detected in this database.

    Declaration
    protected abstract IEnumerable<PostgresType> GetTypes()
    Returns
    Type Description
    IEnumerable<PostgresType>
    | Improve this Doc

    ParseServerVersion(String)

    Parses a PostgreSQL server version (e.g. 10.1, 9.6.3) and returns a CLR Version.

    Declaration
    protected static Version ParseServerVersion(string value)
    Parameters
    Type Name Description
    String value
    Returns
    Type Description
    Version
    | Improve this Doc

    RegisterFactory(INpgsqlDatabaseInfoFactory)

    Registers a new database info factory, which is used to load information about databases.

    Declaration
    public static void RegisterFactory(INpgsqlDatabaseInfoFactory factory)
    Parameters
    Type Name Description
    INpgsqlDatabaseInfoFactory factory
    • Improve this Doc
    In This Article
    Back to top © Copyright 2021 The Npgsql Development Team