Class NpgsqlConnector
Represents a connection to a PostgreSQL backend. Unlike NpgsqlConnection objects, which are exposed to users, connectors are internal to Npgsql and are recycled by the connection pool.
Implements
Inherited Members
Namespace: Npgsql.Internal
Assembly: Npgsql.dll
Syntax
public sealed class NpgsqlConnector : IDisposable
Properties
DatabaseInfo
Information about PostgreSQL and PostgreSQL-like databases (e.g. type definitions, capabilities...).
Declaration
public NpgsqlDatabaseInfo DatabaseInfo { get; }
Property Value
Type | Description |
---|---|
NpgsqlDatabaseInfo |
Settings
The parsed connection string.
Declaration
public NpgsqlConnectionStringBuilder Settings { get; }
Property Value
Type | Description |
---|---|
NpgsqlConnectionStringBuilder |
TextEncoding
Declaration
public Encoding TextEncoding { get; }
Property Value
Type | Description |
---|---|
Encoding |
Methods
CreateCommand(String)
Creates and returns a NpgsqlCommand object associated with the NpgsqlConnector.
Declaration
public NpgsqlCommand CreateCommand(string cmdText = null)
Parameters
Type | Name | Description |
---|---|---|
String | cmdText | The text of the query. |
Returns
Type | Description |
---|---|
NpgsqlCommand | A NpgsqlCommand object. |
Dispose()
Declaration
public void Dispose()