pub type TableDefaultValueWalker<'a> = Walker<'a, TableDefaultValueId>;
Expand description

Traverse a table column’s default value.

Aliased Type§

struct TableDefaultValueWalker<'a> {
    pub id: TableDefaultValueId,
    pub schema: &'a SqlSchema,
}

Fields§

§id: TableDefaultValueId

The identifier.

§schema: &'a SqlSchema

The schema for which the identifier is valid.

Implementations§

source§

impl<'a> TableDefaultValueWalker<'a>

source

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

Coarsen the walker into a generic column default version.

source

pub fn column(self) -> TableColumnWalker<'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.

source

pub fn inner(self) -> &'a DefaultValue

The actual value struct