pub struct AlterTable {
pub database_name: ValueOrGlob<String>,
pub table_name: ValueOrGlob<String>,
}Expand description
Selector for ALTER TABLE statements, scoped to a database and table.
§String syntax examples
AlterTable– any alter on any table.AlterTable(main.Students)–Studentsinmain.
Fields§
§database_name: ValueOrGlob<String>The database the table belongs to, or * for any.
table_name: ValueOrGlob<String>The table being altered, or * for any.
Implementations§
Source§impl AlterTable
impl AlterTable
Sourcepub fn new(
database_name: impl Into<ValueOrGlob<String>>,
table_name: impl Into<ValueOrGlob<String>>,
) -> Self
pub fn new( database_name: impl Into<ValueOrGlob<String>>, table_name: impl Into<ValueOrGlob<String>>, ) -> Self
Creates a new AlterTable 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 empty() -> Self
pub fn empty() -> Self
Creates a AlterTable where every field is a Glob, matching all possible values.
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 AlterTable::database_name and returns self for method chaining.
The database the table belongs to, or * for any.
Sourcepub fn with_table_name(self, value: impl Into<ValueOrGlob<String>>) -> Self
pub fn with_table_name(self, value: impl Into<ValueOrGlob<String>>) -> Self
Sets AlterTable::table_name and returns self for method chaining.
The table being altered, or * for any.
Sourcepub const fn is_all_glob(&self) -> bool
pub const fn is_all_glob(&self) -> bool
Returns true if every field on this AlterTable is a Glob.
Sourcepub const fn is_all_value(&self) -> bool
pub const fn is_all_value(&self) -> bool
Returns true if every field on this AlterTable is a Value.
Sourcepub const fn is_any_glob(&self) -> bool
pub const fn is_any_glob(&self) -> bool
Returns true if at least one field on this AlterTable is a Glob.
Sourcepub const fn is_any_value(&self) -> bool
pub const fn is_any_value(&self) -> bool
Returns true if at least one field on this AlterTable is a Value.
Sourcepub const fn specificity(&self) -> usize
pub const fn specificity(&self) -> usize
Returns the number of Value fields on this AlterTable, used to rank competing policy rules during resolution. A higher specificity means the rule targets a narrower set of operations.
Trait Implementations§
Source§impl Clone for AlterTable
impl Clone for AlterTable
Source§fn clone(&self) -> AlterTable
fn clone(&self) -> AlterTable
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for AlterTable
impl Debug for AlterTable
Source§impl Default for AlterTable
Defaults to AlterTable::empty, producing a selector where every field is a glob.
impl Default for AlterTable
Defaults to AlterTable::empty, producing a selector where every field is a glob.
Source§impl Display for AlterTable
Formats this AlterTable using the CLI selector syntax. When all fields are globs, renders the bare identifier AlterTable; otherwise renders the identifier with parenthesized dot-separated fields.
impl Display for AlterTable
Formats this AlterTable using the CLI selector syntax. When all fields are globs, renders the bare identifier AlterTable; otherwise renders the identifier with parenthesized dot-separated fields.
Source§impl From<AlterTable> for AccessControlSelector
Converts a AlterTable into its corresponding AccessControlSelector variant.
impl From<AlterTable> for AccessControlSelector
Converts a AlterTable into its corresponding AccessControlSelector variant.
Source§fn from(value: AlterTable) -> Self
fn from(value: AlterTable) -> Self
Source§impl From<AlterTable> for String
Converts a AlterTable into its string representation via Display.
impl From<AlterTable> for String
Converts a AlterTable into its string representation via Display.
Source§fn from(value: AlterTable) -> Self
fn from(value: AlterTable) -> Self
Source§impl FromStr for AlterTable
Parses a selector string into a AlterTable. Accepts the syntax AlterTable or AlterTable(field1.field2).
impl FromStr for AlterTable
Parses a selector string into a AlterTable. Accepts the syntax AlterTable or AlterTable(field1.field2).
Source§impl Hash for AlterTable
impl Hash for AlterTable
Source§impl Ord for AlterTable
impl Ord for AlterTable
Source§fn cmp(&self, other: &AlterTable) -> Ordering
fn cmp(&self, other: &AlterTable) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialEq for AlterTable
impl PartialEq for AlterTable
Source§impl PartialOrd for AlterTable
impl PartialOrd for AlterTable
Source§impl TryFrom<String> for AlterTable
Parses an owned String into a AlterTable by delegating to FromStr.
impl TryFrom<String> for AlterTable
Parses an owned String into a AlterTable by delegating to FromStr.