pub struct DefaultKeyGenerator { /* private fields */ }Implementations§
Source§impl DefaultKeyGenerator
impl DefaultKeyGenerator
pub fn new(context: GeneratorContext) -> Self
Sourcepub fn with_nonclustered_primary_key(self, value: bool) -> Self
pub fn with_nonclustered_primary_key(self, value: bool) -> Self
When set, primary key constraints render primary key nonclustered (...) instead of
primary key (...) - matches SQL Server’s legacy codegen convention.
pub fn context(&self) -> &GeneratorContext
Source§impl DefaultKeyGenerator
impl DefaultKeyGenerator
Sourcepub fn key_constraints_filtered(
&self,
table: &Table,
skip_primary_key: bool,
) -> Vec<String>
pub fn key_constraints_filtered( &self, table: &Table, skip_primary_key: bool, ) -> Vec<String>
Same as key_constraints, but when skip_primary_key is true the primary key
constraint is left out entirely - for dialects (SQLite) that declare the primary key
inline on the column instead of as a separate table constraint.
Trait Implementations§
Source§impl KeyGenerator for DefaultKeyGenerator
impl KeyGenerator for DefaultKeyGenerator
Auto Trait Implementations§
impl !RefUnwindSafe for DefaultKeyGenerator
impl !Send for DefaultKeyGenerator
impl !Sync for DefaultKeyGenerator
impl !UnwindSafe for DefaultKeyGenerator
impl Freeze for DefaultKeyGenerator
impl Unpin for DefaultKeyGenerator
impl UnsafeUnpin for DefaultKeyGenerator
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