pub struct Detach {
pub database_name: ValueOrGlob<String>,
}Expand description
Selector for DETACH DATABASE statements, scoped to a database name.
§String syntax examples
Detach– any detachment.Detach(aux)– only theauxdatabase.
Fields§
§database_name: ValueOrGlob<String>The database name being detached, or * for any.
Implementations§
Source§impl Detach
impl Detach
Sourcepub fn new(database_name: impl Into<ValueOrGlob<String>>) -> Self
pub fn new(database_name: impl Into<ValueOrGlob<String>>) -> Self
Creates a new Detach 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_database_name(self, value: impl Into<ValueOrGlob<String>>) -> Self
pub fn with_database_name(self, value: impl Into<ValueOrGlob<String>>) -> Self
Sets Detach::database_name and returns self for method chaining.
The database name being detached, 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 Detach
Defaults to Detach::empty, producing a selector where every field is a glob.
impl Default for Detach
Defaults to Detach::empty, producing a selector where every field is a glob.
Source§impl Display for Detach
Formats this Detach using the CLI selector syntax. When all fields are globs, renders the bare identifier Detach; otherwise renders the identifier with parenthesized dot-separated fields.
impl Display for Detach
Formats this Detach using the CLI selector syntax. When all fields are globs, renders the bare identifier Detach; otherwise renders the identifier with parenthesized dot-separated fields.
Source§impl From<Detach> for AccessControlSelector
Converts a Detach into its corresponding AccessControlSelector variant.
impl From<Detach> for AccessControlSelector
Converts a Detach into its corresponding AccessControlSelector variant.
Source§impl FromStr for Detach
Parses a selector string into a Detach. Accepts the syntax Detach or Detach(field1.field2).
impl FromStr for Detach
Parses a selector string into a Detach. Accepts the syntax Detach or Detach(field1.field2).