Search Results for

    Show / Hide Table of Contents

    Class NpgsqlStatement

    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).

    Inheritance
    Object
    NpgsqlStatement
    Inherited Members
    Object.Equals(Object)
    Object.Equals(Object, Object)
    Object.GetHashCode()
    Object.GetType()
    Object.MemberwiseClone()
    Object.ReferenceEquals(Object, Object)
    Namespace: Npgsql
    Assembly: Npgsql.dll
    Syntax
    public sealed class NpgsqlStatement

    Properties

    InputParameters

    The input parameters sent with this statement.

    Declaration
    public List<NpgsqlParameter> InputParameters { get; }
    Property Value
    Type Description
    List<NpgsqlParameter>

    OID

    For an INSERT, the object ID of the inserted row if Rows is 1 and the target table has OIDs; otherwise 0.

    Declaration
    public uint OID { get; }
    Property Value
    Type Description
    UInt32

    Rows

    The number of rows affected or retrieved.

    Declaration
    public uint Rows { get; }
    Property Value
    Type Description
    UInt32
    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.

    Declaration
    public string SQL { get; set; }
    Property Value
    Type Description
    String

    StatementType

    Specifies the type of query, e.g. SELECT.

    Declaration
    public StatementType StatementType { get; }
    Property Value
    Type Description
    StatementType

    Methods

    ToString()

    Returns the SQL text of the statement.

    Declaration
    public override string ToString()
    Returns
    Type Description
    String
    Overrides
    Object.ToString()
    In This Article
    Back to top © Copyright 2022 The Npgsql Development Team