Struct pg_query::protobuf::Query

source ·
pub struct Query {
Show 41 fields pub command_type: i32, pub query_source: i32, pub can_set_tag: bool, pub utility_stmt: Option<Box<Node>>, pub result_relation: i32, pub has_aggs: bool, pub has_window_funcs: bool, pub has_target_srfs: bool, pub has_sub_links: bool, pub has_distinct_on: bool, pub has_recursive: bool, pub has_modifying_cte: bool, pub has_for_update: bool, pub has_row_security: bool, pub is_return: bool, pub cte_list: Vec<Node>, pub rtable: Vec<Node>, pub rteperminfos: Vec<Node>, pub jointree: Option<Box<FromExpr>>, pub merge_action_list: Vec<Node>, pub merge_use_outer_join: bool, pub target_list: Vec<Node>, pub override: i32, pub on_conflict: Option<Box<OnConflictExpr>>, pub returning_list: Vec<Node>, pub group_clause: Vec<Node>, pub group_distinct: bool, pub grouping_sets: Vec<Node>, pub having_qual: Option<Box<Node>>, pub window_clause: Vec<Node>, pub distinct_clause: Vec<Node>, pub sort_clause: Vec<Node>, pub limit_offset: Option<Box<Node>>, pub limit_count: Option<Box<Node>>, pub limit_option: i32, pub row_marks: Vec<Node>, pub set_operations: Option<Box<Node>>, pub constraint_deps: Vec<Node>, pub with_check_options: Vec<Node>, pub stmt_location: i32, pub stmt_len: i32,
}

Fields§

§command_type: i32§query_source: i32§can_set_tag: bool§utility_stmt: Option<Box<Node>>§result_relation: i32§has_aggs: bool§has_window_funcs: bool§has_target_srfs: bool§has_sub_links: bool§has_distinct_on: bool§has_recursive: bool§has_modifying_cte: bool§has_for_update: bool§has_row_security: bool§is_return: bool§cte_list: Vec<Node>§rtable: Vec<Node>§rteperminfos: Vec<Node>§jointree: Option<Box<FromExpr>>§merge_action_list: Vec<Node>§merge_use_outer_join: bool§target_list: Vec<Node>§override: i32§on_conflict: Option<Box<OnConflictExpr>>§returning_list: Vec<Node>§group_clause: Vec<Node>§group_distinct: bool§grouping_sets: Vec<Node>§having_qual: Option<Box<Node>>§window_clause: Vec<Node>§distinct_clause: Vec<Node>§sort_clause: Vec<Node>§limit_offset: Option<Box<Node>>§limit_count: Option<Box<Node>>§limit_option: i32§row_marks: Vec<Node>§set_operations: Option<Box<Node>>§constraint_deps: Vec<Node>§with_check_options: Vec<Node>§stmt_location: i32§stmt_len: i32

Implementations§

source§

impl Query

source

pub fn to_ref(&self) -> NodeRef<'_>

source

pub fn to_mut(&mut self) -> NodeMut

source§

impl Query

source

pub fn command_type(&self) -> CmdType

Returns the enum value of command_type, or the default if the field is set to an invalid enum value.

source

pub fn set_command_type(&mut self, value: CmdType)

Sets command_type to the provided enum value.

source

pub fn query_source(&self) -> QuerySource

Returns the enum value of query_source, or the default if the field is set to an invalid enum value.

source

pub fn set_query_source(&mut self, value: QuerySource)

Sets query_source to the provided enum value.

source

pub fn override(&self) -> OverridingKind

Returns the enum value of override, or the default if the field is set to an invalid enum value.

source

pub fn set_override(&mut self, value: OverridingKind)

Sets override to the provided enum value.

source

pub fn limit_option(&self) -> LimitOption

Returns the enum value of limit_option, or the default if the field is set to an invalid enum value.

source

pub fn set_limit_option(&mut self, value: LimitOption)

Sets limit_option to the provided enum value.

Trait Implementations§

source§

impl Clone for Query

source§

fn clone(&self) -> Query

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for Query

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for Query

source§

fn default() -> Self

Returns the “default value” for a type. Read more
source§

impl Message for Query

source§

fn encoded_len(&self) -> usize

Returns the encoded length of the message without a length delimiter.
source§

fn clear(&mut self)

Clears the message, resetting all fields to their default.
source§

fn encode<B>(&self, buf: &mut B) -> Result<(), EncodeError>
where B: BufMut, Self: Sized,

Encodes the message to a buffer. Read more
source§

fn encode_to_vec(&self) -> Vec<u8>
where Self: Sized,

Encodes the message to a newly allocated buffer.
source§

fn encode_length_delimited<B>(&self, buf: &mut B) -> Result<(), EncodeError>
where B: BufMut, Self: Sized,

Encodes the message with a length-delimiter to a buffer. Read more
source§

fn encode_length_delimited_to_vec(&self) -> Vec<u8>
where Self: Sized,

Encodes the message with a length-delimiter to a newly allocated buffer.
source§

fn decode<B>(buf: B) -> Result<Self, DecodeError>
where B: Buf, Self: Default,

Decodes an instance of the message from a buffer. Read more
source§

fn decode_length_delimited<B>(buf: B) -> Result<Self, DecodeError>
where B: Buf, Self: Default,

Decodes a length-delimited instance of the message from the buffer.
source§

fn merge<B>(&mut self, buf: B) -> Result<(), DecodeError>
where B: Buf, Self: Sized,

Decodes an instance of the message from a buffer, and merges it into self. Read more
source§

fn merge_length_delimited<B>(&mut self, buf: B) -> Result<(), DecodeError>
where B: Buf, Self: Sized,

Decodes a length-delimited instance of the message from buffer, and merges it into self.
source§

impl PartialEq for Query

source§

fn eq(&self, other: &Query) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl StructuralPartialEq for Query

Auto Trait Implementations§

§

impl RefUnwindSafe for Query

§

impl Send for Query

§

impl Sync for Query

§

impl Unpin for Query

§

impl UnwindSafe for Query

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

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

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.