Struct query_structure::DefaultValue
source · pub struct DefaultValue {
pub kind: DefaultKind,
pub db_name: Option<String>,
}
Expand description
Represents a default specified on a field.
Fields§
§kind: DefaultKind
§db_name: Option<String>
Implementations§
source§impl DefaultValue
impl DefaultValue
pub fn as_expression(&self) -> Option<&ValueGenerator>
pub fn as_single(&self) -> Option<&PrismaValue>
sourcepub fn is_autoincrement(&self) -> bool
pub fn is_autoincrement(&self) -> bool
Does this match @default(autoincrement())?
sourcepub fn is_dbgenerated(&self) -> bool
pub fn is_dbgenerated(&self) -> bool
Does this match @default(dbgenerated(_))?
pub fn new_expression(generator: ValueGenerator) -> Self
pub fn new_single(value: PrismaValue) -> Self
pub fn set_db_name(&mut self, name: impl ToString)
Trait Implementations§
source§impl Clone for DefaultValue
impl Clone for DefaultValue
source§fn clone(&self) -> DefaultValue
fn clone(&self) -> DefaultValue
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for DefaultValue
impl Debug for DefaultValue
source§impl PartialEq for DefaultValue
impl PartialEq for DefaultValue
source§fn eq(&self, other: &DefaultValue) -> bool
fn eq(&self, other: &DefaultValue) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl StructuralPartialEq for DefaultValue
Auto Trait Implementations§
impl RefUnwindSafe for DefaultValue
impl Send for DefaultValue
impl Sync for DefaultValue
impl Unpin for DefaultValue
impl UnwindSafe for DefaultValue
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more