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.
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
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Returns the encoded length of the message without a length delimiter.
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
fn decode_length_delimited<B>(buf: B) -> Result<Self, DecodeError> where
B: Buf,
Self: Default,
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.
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
Auto Trait Implementations
impl RefUnwindSafe for Query
impl UnwindSafe for Query
Blanket Implementations
Mutably borrows from an owned value. Read more