Struct ql2::Query[][src]

pub struct Query {
    pub type: Option<i32>,
    pub query: Option<Term>,
    pub token: Option<i64>,
    pub obsolete_noreply: Option<bool>,
    pub accepts_r_json: Option<bool>,
    pub global_optargs: Vec<AssocPair>,
}

You send one of:

  • A [START] query with a Term to evaluate and a unique-per-connection token.
  • A [CONTINUE] query with the same token as a [START] query that returned [SUCCESS_PARTIAL] in its Response.
  • A [STOP] query with the same token as a [START] query that you want to stop.
  • A [NOREPLY_WAIT] query with a unique per-connection token. The server answers with a [WAIT_COMPLETE] Response.
  • A [SERVER_INFO] query. The server answers with a [SERVER_INFO] Response.

Fields

type: Option<i32>query: Option<Term>

A Term is how we represent the operations we want a query to perform.

only present when [type] = [START]

token: Option<i64>obsolete_noreply: Option<bool>

This flag is ignored on the server. noreply should be added to global_optargs instead (the key “noreply” should map to either true or false).

accepts_r_json: Option<bool>

If this is set to true, then Datum values will sometimes be of [DatumType] [R_JSON] (see below). This can provide enormous speedups in languages with poor protobuf libraries.

global_optargs: Vec<AssocPair>

Implementations

impl Query[src]

pub fn type(&self) -> QueryType[src]

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

pub fn set_type(&mut self, value: QueryType)[src]

Sets type to the provided enum value.

pub fn token(&self) -> i64[src]

Returns the value of token, or the default value if token is unset.

pub fn obsolete_noreply(&self) -> bool[src]

Returns the value of obsolete_noreply, or the default value if obsolete_noreply is unset.

pub fn accepts_r_json(&self) -> bool[src]

Returns the value of accepts_r_json, or the default value if accepts_r_json is unset.

Trait Implementations

impl Clone for Query[src]

impl Debug for Query[src]

impl Default for Query[src]

impl<'de> Deserialize<'de> for Query[src]

impl Message for Query[src]

impl PartialEq<Query> for Query[src]

impl Serialize for Query[src]

impl StructuralPartialEq for Query[src]

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

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> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

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

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

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

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.