[][src]Enum pg_wire::FrontendMessage

pub enum FrontendMessage {
    GssencRequest,
    SslRequest,
    Setup {
        params: Vec<(String, String)>,
    },
    Query {
        sql: String,
    },
    Parse {
        statement_name: String,
        sql: String,
        param_types: Vec<Option<PgType>>,
    },
    DescribeStatement {
        name: String,
    },
    DescribePortal {
        name: String,
    },
    Bind {
        portal_name: String,
        statement_name: String,
        param_formats: Vec<PgFormat>,
        raw_params: Vec<Option<Vec<u8>>>,
        result_formats: Vec<PgFormat>,
    },
    Execute {
        portal_name: String,
        max_rows: i32,
    },
    Flush,
    Sync,
    CloseStatement {
        name: String,
    },
    ClosePortal {
        name: String,
    },
    Terminate,
}

Frontend PostgreSQL Wire Protocol messages see Protocol Flow PostgreSQL documentation section

Variants

GssencRequest

Client requested GSSENC Request

SslRequest

Client requested SSL connection

Setup

Connection setup message

Fields of Setup

params: Vec<(String, String)>

client parameters

Query

Execute the specified SQL.

This is issued as part of the simple query flow.

Fields of Query

sql: String

The SQL to execute.

Parse

Parse the specified SQL into a prepared statement.

This starts the extended query flow.

Fields of Parse

statement_name: String

The name of the prepared statement to create. An empty string specifies the unnamed prepared statement.

sql: String

The SQL to parse.

param_types: Vec<Option<PgType>>

The number of specified parameter data types can be less than the number of parameters specified in the query.

DescribeStatement

Describe an existing prepared statement.

This command is part of the extended query flow.

Fields of DescribeStatement

name: String

The name of the prepared statement to describe.

DescribePortal

Describe an existing portal.

This command is part of the extended query flow.

Fields of DescribePortal

name: String

The name of the portal to describe.

Bind

Bind an existing prepared statement to a portal.

This command is part of the extended query flow.

Fields of Bind

portal_name: String

The destination portal. An empty string selects the unnamed portal. The portal can later be executed with the Execute command.

statement_name: String

The source prepared statement. An empty string selects the unnamed prepared statement.

param_formats: Vec<PgFormat>

The formats used to encode the parameters.

raw_params: Vec<Option<Vec<u8>>>

The value of each parameter.

result_formats: Vec<PgFormat>

The desired formats for the columns in the result set.

Execute

Execute a bound portal.

This command is part of the extended query flow.

Fields of Execute

portal_name: String

The name of the portal to execute.

max_rows: i32

The maximum number of rows to return before suspending.

0 or negative means infinite.

Flush

Flush any pending output.

This command is part of the extended query flow.

Sync

Finish an extended query.

This command is part of the extended query flow.

CloseStatement

Close the named statement.

This command is part of the extended query flow.

Fields of CloseStatement

name: String

The name of the prepared statement to close.

ClosePortal

Close the named portal.

This command is part of the extended query flow.

Fields of ClosePortal

name: String

The name of the portal to close.

Terminate

Terminate a connection.

Implementations

impl FrontendMessage[src]

pub fn decode(tag: u8, buffer: &[u8]) -> Result<Self>[src]

decodes buffer data to a frontend message

Trait Implementations

impl Debug for FrontendMessage[src]

impl PartialEq<FrontendMessage> for FrontendMessage[src]

impl StructuralPartialEq for FrontendMessage[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.