Struct ql2::Query [−][src]
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]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
impl Message for Query
[src]
fn encode_raw<B>(&self, buf: &mut B) where
B: BufMut,
[src]
B: BufMut,
fn merge_field<B>(
&mut self,
tag: u32,
wire_type: WireType,
buf: &mut B,
ctx: DecodeContext
) -> Result<(), DecodeError> where
B: Buf,
[src]
&mut self,
tag: u32,
wire_type: WireType,
buf: &mut B,
ctx: DecodeContext
) -> Result<(), DecodeError> where
B: Buf,
fn encoded_len(&self) -> usize
[src]
fn clear(&mut self)
[src]
pub fn encode<B>(&self, buf: &mut B) -> Result<(), EncodeError> where
B: BufMut,
[src]
B: BufMut,
pub fn encode_length_delimited<B>(&self, buf: &mut B) -> Result<(), EncodeError> where
B: BufMut,
[src]
B: BufMut,
pub fn decode<B>(buf: B) -> Result<Self, DecodeError> where
Self: Default,
B: Buf,
[src]
Self: Default,
B: Buf,
pub fn decode_length_delimited<B>(buf: B) -> Result<Self, DecodeError> where
Self: Default,
B: Buf,
[src]
Self: Default,
B: Buf,
pub fn merge<B>(&mut self, buf: B) -> Result<(), DecodeError> where
B: Buf,
[src]
B: Buf,
pub fn merge_length_delimited<B>(&mut self, buf: B) -> Result<(), DecodeError> where
B: Buf,
[src]
B: Buf,
impl PartialEq<Query> for Query
[src]
impl Serialize for Query
[src]
fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error> where
__S: Serializer,
[src]
__S: Serializer,
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]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,