Type Alias sql_schema_describer::walkers::ViewDefaultValueWalker
source · 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>
impl<'a> ViewDefaultValueWalker<'a>
sourcepub fn coarsen(self) -> DefaultValueWalker<'a>
pub fn coarsen(self) -> DefaultValueWalker<'a>
Coarsen the walker into a generic column default version.
sourcepub fn column(self) -> ViewColumnWalker<'a>
pub fn column(self) -> ViewColumnWalker<'a>
The column where the default value is located.
sourcepub fn as_value(self) -> Option<&'a PrismaValue>
pub fn as_value(self) -> Option<&'a PrismaValue>
Return a value if a constant.
sourcepub fn as_sequence(self) -> Option<&'a str>
pub fn as_sequence(self) -> Option<&'a str>
If the value is a squence, return it
sourcepub fn is_sequence(&self) -> bool
pub fn is_sequence(&self) -> bool
True if referencing a sequence
sourcepub fn is_db_generated(&self) -> bool
pub fn is_db_generated(&self) -> bool
True if value generation is handled in the database
sourcepub fn kind(self) -> &'a DefaultKind
pub fn kind(self) -> &'a DefaultKind
The value kind enumerator
sourcepub fn constraint_name(self) -> Option<&'a str>
pub fn constraint_name(self) -> Option<&'a str>
The name of the default value constraint.