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>,
}
Expand description

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

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

Sets type to the provided enum value.

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

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

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

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

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

Deserialize this value from the given Serde deserializer. Read more

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

Clears the message, resetting all fields to their default.

Encodes the message to a buffer. Read more

Encodes the message to a newly allocated buffer.

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

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

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

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

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

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

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

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

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

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

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.