Class NpgsqlDatabaseInfo
Base class for implementations which provide information about PostgreSQL and PostgreSQL-like databases
(e.g. type definitions, capabilities...).
Inheritance
NpgsqlDatabaseInfo
Assembly: Npgsql.dll
Syntax
public abstract class NpgsqlDatabaseInfo
Constructors
|
Improve this Doc
View Source
NpgsqlDatabaseInfo(string, int, string, Version, string)
Declaration
protected NpgsqlDatabaseInfo(string host, int port, string databaseName, Version version, string serverVersion)
Parameters
|
Improve this Doc
View Source
NpgsqlDatabaseInfo(string, int, string, Version)
Declaration
protected NpgsqlDatabaseInfo(string host, int port, string databaseName, Version version)
Parameters
Type |
Name |
Description |
string |
host |
|
int |
port |
|
string |
databaseName |
|
Version |
version |
|
Properties
|
Improve this Doc
View Source
HasIntegerDateTimes
Reports whether the backend uses the newer integer timestamp representation.
Declaration
public virtual bool HasIntegerDateTimes { get; protected set; }
Property Value
|
Improve this Doc
View Source
Host
The hostname of IP address of the database.
Declaration
public string Host { get; }
Property Value
|
Improve this Doc
View Source
Name
Declaration
public string Name { get; }
Property Value
|
Improve this Doc
View Source
Port
The TCP port of the database.
Declaration
Property Value
|
Improve this Doc
View Source
ServerVersion
The PostgreSQL version string as returned by the server_version option. Populated during loading.
Declaration
public string ServerVersion { get; }
Property Value
|
Improve this Doc
View Source
SupportsAdvisoryLocks
Whether the backend supports advisory locks.
Declaration
public virtual bool SupportsAdvisoryLocks { get; }
Property Value
|
Improve this Doc
View Source
SupportsCloseAll
Whether the backend supports the CLOSE ALL statement.
Declaration
public virtual bool SupportsCloseAll { get; }
Property Value
|
Improve this Doc
View Source
SupportsDiscard
Whether the backend supports the DISCARD statement.
Declaration
public virtual bool SupportsDiscard { get; }
Property Value
|
Improve this Doc
View Source
SupportsDiscardSequences
Whether the backend supports the DISCARD SEQUENCES statement.
Declaration
public virtual bool SupportsDiscardSequences { get; }
Property Value
|
Improve this Doc
View Source
SupportsDiscardTemp
Whether the backend supports the DISCARD TEMP statement.
Declaration
public virtual bool SupportsDiscardTemp { get; }
Property Value
|
Improve this Doc
View Source
SupportsEnumTypes
Whether the backend supports enum types.
Declaration
public virtual bool SupportsEnumTypes { get; }
Property Value
|
Improve this Doc
View Source
SupportsMultirangeTypes
Whether the backend supports multirange types.
Declaration
public virtual bool SupportsMultirangeTypes { get; }
Property Value
|
Improve this Doc
View Source
SupportsRangeTypes
Whether the backend supports range types.
Declaration
public virtual bool SupportsRangeTypes { get; }
Property Value
|
Improve this Doc
View Source
SupportsTransactions
Whether the database supports transactions.
Declaration
public virtual bool SupportsTransactions { get; protected set; }
Property Value
|
Improve this Doc
View Source
SupportsUnlisten
Whether the backend supports the UNLISTEN statement.
Declaration
public virtual bool SupportsUnlisten { get; }
Property Value
|
Improve this Doc
View Source
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
Methods
|
Improve this Doc
View Source
GetPostgresType(string)
Declaration
public PostgresType GetPostgresType(string pgName)
Parameters
Type |
Name |
Description |
string |
pgName |
|
Returns
|
Improve this Doc
View Source
GetPostgresType(uint)
Declaration
public PostgresType GetPostgresType(uint oid)
Parameters
Type |
Name |
Description |
uint |
oid |
|
Returns
|
Improve this Doc
View Source
GetTypes()
Provides all PostgreSQL types detected in this database.
Declaration
protected abstract IEnumerable<PostgresType> GetTypes()
Returns
|
Improve this Doc
View Source
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
|
Improve this Doc
View Source
RegisterFactory(INpgsqlDatabaseInfoFactory)
Registers a new database info factory, which is used to load information about databases.
Declaration
public static void RegisterFactory(INpgsqlDatabaseInfoFactory factory)
Parameters
|
Improve this Doc
View Source
TryGetPostgresTypeByName(string, out PostgresType?)
Declaration
public bool TryGetPostgresTypeByName(string pgName, out PostgresType? pgType)
Parameters
Returns