pub struct UtilityOption {
pub name: Ident,
pub arg: Option<Expr>,
}
Expand description
Represents a single PostgreSQL utility option.
A utility option is a key-value pair where the key is an identifier (IDENT) and the value can be one of the following:
- A number with an optional sign (
+
or-
). Example:+10
,-10.2
,3
- A non-keyword string. Example:
option1
,'option2'
,"option3"
- keyword:
TRUE
,FALSE
,ON
(off
is also accept). - Empty. Example:
ANALYZE
(identifier only)
Utility options are used in various PostgreSQL DDL statements, including statements such as
CLUSTER
, EXPLAIN
, VACUUM
, and REINDEX
. These statements format options as ( option [, ...] )
.
CLUSTER EXPLAIN VACUUM REINDEX
For example, the EXPLAIN
AND VACUUM
statements with options might look like this:
EXPLAIN (ANALYZE, VERBOSE TRUE, FORMAT TEXT) SELECT * FROM my_table;
VACUUM (VERBOSE, ANALYZE ON, PARALLEL 10) my_table;
Fields§
§name: Ident
§arg: Option<Expr>
Trait Implementations§
Source§impl Clone for UtilityOption
impl Clone for UtilityOption
Source§fn clone(&self) -> UtilityOption
fn clone(&self) -> UtilityOption
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for UtilityOption
impl Debug for UtilityOption
Source§impl Display for UtilityOption
impl Display for UtilityOption
Source§impl Hash for UtilityOption
impl Hash for UtilityOption
Source§impl Ord for UtilityOption
impl Ord for UtilityOption
Source§fn cmp(&self, other: &UtilityOption) -> Ordering
fn cmp(&self, other: &UtilityOption) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for UtilityOption
impl PartialEq for UtilityOption
Source§impl PartialOrd for UtilityOption
impl PartialOrd for UtilityOption
Source§impl Visit for UtilityOption
impl Visit for UtilityOption
Source§impl VisitMut for UtilityOption
impl VisitMut for UtilityOption
fn visit<V>(&mut self, visitor: &mut V) -> ControlFlow<<V as VisitorMut>::Break>where
V: VisitorMut,
impl Eq for UtilityOption
impl StructuralPartialEq for UtilityOption
Auto Trait Implementations§
impl Freeze for UtilityOption
impl RefUnwindSafe for UtilityOption
impl Send for UtilityOption
impl Sync for UtilityOption
impl Unpin for UtilityOption
impl UnwindSafe for UtilityOption
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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more