Class NpgsqlStatement
- Namespace
- Npgsql
- Assembly
- Npgsql.dll
Represents a single SQL statement within Npgsql.
Instances aren't constructed directly; users should construct an NpgsqlCommand object and populate its CommandText property as in standard ADO.NET. Npgsql will analyze that property and constructed instances of NpgsqlStatement internally.
Users can retrieve instances from Statements and access information about statement execution (e.g. affected rows).
public sealed class NpgsqlStatement
- Inheritance
-
NpgsqlStatement
- Inherited Members
Constructors
NpgsqlStatement()
public NpgsqlStatement()
Properties
InputParameters
The input parameters sent with this statement.
public List<NpgsqlParameter> InputParameters { get; }
Property Value
OID
For an INSERT, the object ID of the inserted row if Rows is 1 and the target table has OIDs; otherwise 0.
public uint OID { get; }
Property Value
Rows
The number of rows affected or retrieved.
public uint Rows { get; }
Property Value
Remarks
See the command tag in the CommandComplete message, http://www.postgresql.org/docs/current/static/protocol-message-formats.html
SQL
The SQL text of the statement.
public string SQL { get; set; }
Property Value
StatementType
Specifies the type of query, e.g. SELECT.
public StatementType StatementType { get; }
Property Value
Methods
ToString()
Returns the SQL text of the statement.
public override string ToString()