cql3_parser/
alter_column.rs

1use crate::common::{DataType, Identifier};
2use std::fmt::{Display, Formatter};
3
4/// data to alter a column type.
5#[derive(PartialEq, Debug, Clone)]
6pub struct AlterColumnType {
7    /// the name of the column
8    pub name: Identifier,
9    /// the data type to set the colum to.
10    pub data_type: DataType,
11}
12
13impl Display for AlterColumnType {
14    fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
15        write!(f, "ALTER {} TYPE {}", self.name, self.data_type)
16    }
17}