pub struct ExecuteOptions {
pub included_fields: i32,
pub client_found_rows: bool,
pub workload: i32,
pub sql_select_limit: i64,
pub transaction_isolation: i32,
pub skip_query_plan_cache: bool,
pub planner_version: i32,
pub has_created_temp_tables: bool,
pub consolidator: i32,
pub transaction_access_mode: Vec<i32>,
pub workload_name: String,
pub priority: String,
}Expand description
ExecuteOptions is passed around for all Execute calls.
Fields§
§included_fields: i32Controls what fields are returned in Field message responses from mysql, i.e. field name, table name, etc. This is an optimization for high-QPS queries where the client knows what it’s getting
client_found_rows: boolclient_rows_found specifies if rows_affected should return rows found instead of rows affected. Behavior is defined by MySQL’s CLIENT_FOUND_ROWS flag.
workload: i32workload specifies the type of workload: OLTP: DMLs allowed, results have row count limit, and query timeouts are shorter. OLAP: DMLS not allowed, no limit on row count, timeouts can be as high as desired. DBA: no limit on rowcount or timeout, all queries allowed but intended for long DMLs and DDLs.
sql_select_limit: i64sql_select_limit sets an implicit limit on all select statements. Since vitess also sets a rowcount limit on queries, the smallest value wins.
transaction_isolation: i32§skip_query_plan_cache: boolskip_query_plan_cache specifies if the query plan should be cached by vitess. By default all query plans are cached.
planner_version: i32PlannerVersion specifies which planner to use. If DEFAULT is chosen, whatever vtgate was started with will be used
has_created_temp_tables: boolhas_created_temp_tables signals whether plans created in this session should be cached or not if the user has created temp tables, Vitess will not reuse plans created for this session in other sessions. The current session can still use other sessions cached plans.
consolidator: i32§transaction_access_mode: Vec<i32>TransactionAccessMode specifies the access modes to be used while starting the transaction i.e. READ WRITE/READ ONLY/WITH CONSISTENT SNAPSHOT If not specified, the transaction will be started with the default access mode on the connection.
workload_name: StringWorkloadName specifies the name of the workload as indicated in query directives. This is used for instrumentation in metrics and tracing spans.
priority: Stringpriority specifies the priority of the query, between 0 and 100. This is leveraged by the transaction throttler to determine whether, under resource contention, a query should or should not be throttled.
Implementations§
Source§impl ExecuteOptions
impl ExecuteOptions
Sourcepub fn included_fields(&self) -> IncludedFields
pub fn included_fields(&self) -> IncludedFields
Returns the enum value of included_fields, or the default if the field is set to an invalid enum value.
Sourcepub fn set_included_fields(&mut self, value: IncludedFields)
pub fn set_included_fields(&mut self, value: IncludedFields)
Sets included_fields to the provided enum value.
Sourcepub fn workload(&self) -> Workload
pub fn workload(&self) -> Workload
Returns the enum value of workload, or the default if the field is set to an invalid enum value.
Sourcepub fn set_workload(&mut self, value: Workload)
pub fn set_workload(&mut self, value: Workload)
Sets workload to the provided enum value.
Sourcepub fn transaction_isolation(&self) -> TransactionIsolation
pub fn transaction_isolation(&self) -> TransactionIsolation
Returns the enum value of transaction_isolation, or the default if the field is set to an invalid enum value.
Sourcepub fn set_transaction_isolation(&mut self, value: TransactionIsolation)
pub fn set_transaction_isolation(&mut self, value: TransactionIsolation)
Sets transaction_isolation to the provided enum value.
Sourcepub fn planner_version(&self) -> PlannerVersion
pub fn planner_version(&self) -> PlannerVersion
Returns the enum value of planner_version, or the default if the field is set to an invalid enum value.
Sourcepub fn set_planner_version(&mut self, value: PlannerVersion)
pub fn set_planner_version(&mut self, value: PlannerVersion)
Sets planner_version to the provided enum value.
Sourcepub fn consolidator(&self) -> Consolidator
pub fn consolidator(&self) -> Consolidator
Returns the enum value of consolidator, or the default if the field is set to an invalid enum value.
Sourcepub fn set_consolidator(&mut self, value: Consolidator)
pub fn set_consolidator(&mut self, value: Consolidator)
Sets consolidator to the provided enum value.
Sourcepub fn transaction_access_mode(
&self,
) -> FilterMap<Cloned<Iter<'_, i32>>, fn(i32) -> Option<TransactionAccessMode>>
pub fn transaction_access_mode( &self, ) -> FilterMap<Cloned<Iter<'_, i32>>, fn(i32) -> Option<TransactionAccessMode>>
Returns an iterator which yields the valid enum values contained in transaction_access_mode.
Sourcepub fn push_transaction_access_mode(&mut self, value: TransactionAccessMode)
pub fn push_transaction_access_mode(&mut self, value: TransactionAccessMode)
Appends the provided enum value to transaction_access_mode.
Trait Implementations§
Source§impl Clone for ExecuteOptions
impl Clone for ExecuteOptions
Source§fn clone(&self) -> ExecuteOptions
fn clone(&self) -> ExecuteOptions
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ExecuteOptions
impl Debug for ExecuteOptions
Source§impl Default for ExecuteOptions
impl Default for ExecuteOptions
Source§impl Message for ExecuteOptions
impl Message for ExecuteOptions
Source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Source§fn encode<B>(&self, buf: &mut B) -> Result<(), EncodeError>
fn encode<B>(&self, buf: &mut B) -> Result<(), EncodeError>
Source§fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn encode_length_delimited<B>(&self, buf: &mut B) -> Result<(), EncodeError>
fn encode_length_delimited<B>(&self, buf: &mut B) -> Result<(), EncodeError>
Source§fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn decode<B>(buf: B) -> Result<Self, DecodeError>
fn decode<B>(buf: B) -> Result<Self, DecodeError>
Source§fn decode_length_delimited<B>(buf: B) -> Result<Self, DecodeError>
fn decode_length_delimited<B>(buf: B) -> Result<Self, DecodeError>
Source§fn merge<B>(&mut self, buf: B) -> Result<(), DecodeError>
fn merge<B>(&mut self, buf: B) -> Result<(), DecodeError>
self. Read moreSource§fn merge_length_delimited<B>(&mut self, buf: B) -> Result<(), DecodeError>
fn merge_length_delimited<B>(&mut self, buf: B) -> Result<(), DecodeError>
self.Source§impl PartialEq for ExecuteOptions
impl PartialEq for ExecuteOptions
impl StructuralPartialEq for ExecuteOptions
Auto Trait Implementations§
impl Freeze for ExecuteOptions
impl RefUnwindSafe for ExecuteOptions
impl Send for ExecuteOptions
impl Sync for ExecuteOptions
impl Unpin for ExecuteOptions
impl UnwindSafe for ExecuteOptions
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request