pub type ViewColumnWalker<'a> = Walker<'a, ViewColumnId>;
Expand description

Traverse a view column.

Aliased Type§

struct ViewColumnWalker<'a> {
    pub id: ViewColumnId,
    pub schema: &'a SqlSchema,
}

Fields§

§id: ViewColumnId

The identifier.

§schema: &'a SqlSchema

The schema for which the identifier is valid.

Implementations§

source§

impl<'a> ViewColumnWalker<'a>

source

pub fn coarsen(self) -> ColumnWalker<'a>

Coarsen the walker into a generic column version.

source

pub fn name(self) -> &'a str

The column name.

source

pub fn arity(self) -> ColumnArity

The nullability and arity of the column.

source

pub fn column_has_enum_default_value(self, enum_name: &str, value: &str) -> bool

Returns whether the column has the enum default value of the given enum type.

source

pub fn column_type_is_enum(self, enum_name: &str) -> bool

Returns whether the type of the column matches the provided enum name.

source

pub fn column_type_family(self) -> &'a ColumnTypeFamily

The type family.

source

pub fn column_type_family_as_enum(self) -> Option<EnumWalker<'a>>

Extract an Enum column type family, or None if the family is something else.

source

pub fn default(self) -> Option<ViewDefaultValueWalker<'a>>

the default value for the column.

source

pub fn column_type(self) -> &'a ColumnType

The full column type.

source

pub fn column_native_type<T: Any + 'static>(self) -> Option<&'a T>

The column native type.

source

pub fn is_autoincrement(self) -> bool

Is this column an auto-incrementing integer?

source

pub fn is_same_column(self, other: ViewColumnWalker<'_>) -> bool

Returns whether two columns are named the same and belong to the same table.

source

pub fn view(self) -> ViewWalker<'a>

Traverse to the column’s table.