Table of Contents

Class NpgsqlDatabaseInfo

Namespace
Npgsql
Assembly
Npgsql.dll

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

public abstract class NpgsqlDatabaseInfo
Inheritance
NpgsqlDatabaseInfo
Inherited Members

Constructors

NpgsqlDatabaseInfo()

protected NpgsqlDatabaseInfo()

Properties

HasIntegerDateTimes

Reports whether the backend uses the newer integer timestamp representation.

public virtual bool HasIntegerDateTimes { get; protected set; }

Property Value

bool

Host

The hostname of IP address of the database.

public string Host { get; protected set; }

Property Value

string

Name

The database name.

public string Name { get; protected set; }

Property Value

string

Port

The TCP port of the database.

public int Port { get; protected set; }

Property Value

int

SupportsAdvisoryLocks

Whether the backend supports advisory locks.

public virtual bool SupportsAdvisoryLocks { get; }

Property Value

bool

SupportsCloseAll

Whether the backend supports the CLOSE ALL statement.

public virtual bool SupportsCloseAll { get; }

Property Value

bool

SupportsDiscard

Whether the backend supports the DISCARD statement.

public virtual bool SupportsDiscard { get; }

Property Value

bool

SupportsDiscardSequences

Whether the backend supports the DISCARD SEQUENCES statement.

public virtual bool SupportsDiscardSequences { get; }

Property Value

bool

SupportsDiscardTemp

Whether the backend supports the DISCARD TEMP statement.

public virtual bool SupportsDiscardTemp { get; }

Property Value

bool

SupportsEnumTypes

Whether the backend supports enum types.

public virtual bool SupportsEnumTypes { get; }

Property Value

bool

SupportsRangeTypes

Whether the backend supports range types.

public virtual bool SupportsRangeTypes { get; }

Property Value

bool

SupportsTransactions

Whether the database supports transactions.

public virtual bool SupportsTransactions { get; protected set; }

Property Value

bool

SupportsUnlisten

Whether the backend supports the UNLISTEN statement.

public virtual bool SupportsUnlisten { get; }

Property Value

bool

Version

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

public Version Version { get; protected set; }

Property Value

Version

Methods

GetTypes()

Provides all PostgreSQL types detected in this database.

protected abstract IEnumerable<PostgresType> GetTypes()

Returns

IEnumerable<PostgresType>

ParseServerVersion(string)

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

protected static Version ParseServerVersion(string value)

Parameters

value string

Returns

Version

RegisterFactory(INpgsqlDatabaseInfoFactory)

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

public static void RegisterFactory(INpgsqlDatabaseInfoFactory factory)

Parameters

factory INpgsqlDatabaseInfoFactory