Struct query_structure::ValueGenerator
source · pub struct ValueGenerator { /* private fields */ }
Implementations§
source§impl ValueGenerator
impl ValueGenerator
pub fn new( name: String, args: Vec<(Option<String>, PrismaValue)> ) -> Result<Self, String>
pub fn new_autoincrement() -> Self
pub fn new_sequence(args: Vec<(Option<String>, PrismaValue)>) -> Self
pub fn new_dbgenerated(description: String) -> Self
pub fn new_auto() -> Self
pub fn new_now() -> Self
pub fn new_cuid() -> Self
pub fn new_uuid() -> Self
pub fn new_nanoid(length: Option<u8>) -> Self
pub fn name(&self) -> &str
pub fn args(&self) -> &[(Option<String>, PrismaValue)]
pub fn generator(&self) -> ValueGeneratorFn
pub fn as_dbgenerated(&self) -> Option<&str>
pub fn generate(&self) -> Option<PrismaValue>
pub fn is_dbgenerated(&self) -> bool
pub fn is_autoincrement(&self) -> bool
Trait Implementations§
source§impl Clone for ValueGenerator
impl Clone for ValueGenerator
source§fn clone(&self) -> ValueGenerator
fn clone(&self) -> ValueGenerator
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 moreAuto Trait Implementations§
impl RefUnwindSafe for ValueGenerator
impl Send for ValueGenerator
impl Sync for ValueGenerator
impl Unpin for ValueGenerator
impl UnwindSafe for ValueGenerator
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