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.
public sealed class NpgsqlConnector
- Inheritance
-
NpgsqlConnector
- Inherited Members
Properties
DatabaseInfo
Information about PostgreSQL and PostgreSQL-like databases (e.g. type definitions, capabilities...).
public NpgsqlDatabaseInfo DatabaseInfo { get; }
Property Value
Settings
The parsed connection string.
public NpgsqlConnectionStringBuilder Settings { get; }
Property Value
TextEncoding
public Encoding TextEncoding { get; }
Property Value
Methods
CreateBatch()
Creates and returns a NpgsqlBatch object associated with the NpgsqlConnector.
public NpgsqlBatch CreateBatch()
Returns
- NpgsqlBatch
A NpgsqlBatch object.
CreateCommand(string?)
Creates and returns a NpgsqlCommand object associated with the NpgsqlConnector.
public NpgsqlCommand CreateCommand(string? cmdText = null)
Parameters
cmdText
stringThe text of the query.
Returns
- NpgsqlCommand
A NpgsqlCommand object.