pub type ViewDefaultValueWalker<'a> = Walker<'a, ViewDefaultValueId>;
Expand description

Traverse a view column’s default value.

Aliased Type§

struct ViewDefaultValueWalker<'a> {
    pub id: ViewDefaultValueId,
    pub schema: &'a SqlSchema,
}

Fields§

§id: ViewDefaultValueId

The identifier.

§schema: &'a SqlSchema

The schema for which the identifier is valid.

Implementations§

source§

impl<'a> ViewDefaultValueWalker<'a>

source

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

Coarsen the walker into a generic column default version.

source

pub fn column(self) -> ViewColumnWalker<'a>

The column where the default value is located.

source

pub fn as_value(self) -> Option<&'a PrismaValue>

Return a value if a constant.

source

pub fn as_sequence(self) -> Option<&'a str>

If the value is a squence, return it

source

pub fn is_value(&self) -> bool

True if a constant value

source

pub fn is_now(&self) -> bool

True if now()

source

pub fn is_sequence(&self) -> bool

True if referencing a sequence

source

pub fn is_db_generated(&self) -> bool

True if value generation is handled in the database

source

pub fn kind(self) -> &'a DefaultKind

The value kind enumerator

source

pub fn constraint_name(self) -> Option<&'a str>

The name of the default value constraint.