pub struct Savepoint {
pub operation: ValueOrGlob<TransactionOperation>,
pub savepoint_name: ValueOrGlob<String>,
}Expand description
Selector for SAVEPOINT, RELEASE, and ROLLBACK TO operations on
named savepoints.
§String syntax examples
Savepoint– any savepoint operation.Savepoint(RELEASE)– onlyRELEASEoperations.Savepoint(RELEASE.sp1)–RELEASEon savepointsp1.
Fields§
§operation: ValueOrGlob<TransactionOperation>The savepoint operation, or * for any.
savepoint_name: ValueOrGlob<String>The savepoint name, or * for any.
Implementations§
Source§impl Savepoint
impl Savepoint
Sourcepub fn new(
operation: impl Into<ValueOrGlob<TransactionOperation>>,
savepoint_name: impl Into<ValueOrGlob<String>>,
) -> Self
pub fn new( operation: impl Into<ValueOrGlob<TransactionOperation>>, savepoint_name: impl Into<ValueOrGlob<String>>, ) -> Self
Creates a new Savepoint with the provided field values.
Each argument accepts any type that implements Into<ValueOrGlob<T>>, so callers can pass a raw value, a ValueOrGlob, or an Option<T>.
Sourcepub fn with_operation(
self,
value: impl Into<ValueOrGlob<TransactionOperation>>,
) -> Self
pub fn with_operation( self, value: impl Into<ValueOrGlob<TransactionOperation>>, ) -> Self
Sets Savepoint::operation and returns self for method chaining.
The savepoint operation, or * for any.
Sourcepub fn with_savepoint_name(self, value: impl Into<ValueOrGlob<String>>) -> Self
pub fn with_savepoint_name(self, value: impl Into<ValueOrGlob<String>>) -> Self
Sets Savepoint::savepoint_name and returns self for method chaining.
The savepoint name, or * for any.
Sourcepub const fn is_all_glob(&self) -> bool
pub const fn is_all_glob(&self) -> bool
Sourcepub const fn is_all_value(&self) -> bool
pub const fn is_all_value(&self) -> bool
Sourcepub const fn is_any_glob(&self) -> bool
pub const fn is_any_glob(&self) -> bool
Sourcepub const fn is_any_value(&self) -> bool
pub const fn is_any_value(&self) -> bool
Sourcepub const fn specificity(&self) -> usize
pub const fn specificity(&self) -> usize
Trait Implementations§
Source§impl Default for Savepoint
Defaults to Savepoint::empty, producing a selector where every field is a glob.
impl Default for Savepoint
Defaults to Savepoint::empty, producing a selector where every field is a glob.
Source§impl Display for Savepoint
Formats this Savepoint using the CLI selector syntax. When all fields are globs, renders the bare identifier Savepoint; otherwise renders the identifier with parenthesized dot-separated fields.
impl Display for Savepoint
Formats this Savepoint using the CLI selector syntax. When all fields are globs, renders the bare identifier Savepoint; otherwise renders the identifier with parenthesized dot-separated fields.
Source§impl From<Savepoint> for AccessControlSelector
Converts a Savepoint into its corresponding AccessControlSelector variant.
impl From<Savepoint> for AccessControlSelector
Converts a Savepoint into its corresponding AccessControlSelector variant.
Source§impl FromStr for Savepoint
Parses a selector string into a Savepoint. Accepts the syntax Savepoint or Savepoint(field1.field2).
impl FromStr for Savepoint
Parses a selector string into a Savepoint. Accepts the syntax Savepoint or Savepoint(field1.field2).