pub struct TruncateTable<'a> {
pub truncate_span: Span,
pub table_span: Option<Span>,
pub table_name: QualifiedName<'a>,
}
Expand description
Represent a truncate table statement
let sql = "TRUNCATE TABLE `t1`;";
let mut issues = Issues::new(sql);
let mut stmts = parse_statements(sql, &mut issues, &options);
let truncate_table: TruncateTable = match stmts.pop() {
Some(Statement::TruncateTable(c)) => c,
_ => panic!("We should get a truncate table statement")
};
assert!(truncate_table.table_name.identifier.as_str() == "t1");
Fields§
§truncate_span: Span
Span of “TRUNCATE”
table_span: Option<Span>
Span of “TABLE” if specified
table_name: QualifiedName<'a>
Trait Implementations§
Source§impl<'a> Clone for TruncateTable<'a>
impl<'a> Clone for TruncateTable<'a>
Source§fn clone(&self) -> TruncateTable<'a>
fn clone(&self) -> TruncateTable<'a>
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<'a> Debug for TruncateTable<'a>
impl<'a> Debug for TruncateTable<'a>
Auto Trait Implementations§
impl<'a> Freeze for TruncateTable<'a>
impl<'a> RefUnwindSafe for TruncateTable<'a>
impl<'a> Send for TruncateTable<'a>
impl<'a> Sync for TruncateTable<'a>
impl<'a> Unpin for TruncateTable<'a>
impl<'a> UnwindSafe for TruncateTable<'a>
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