pub struct DeclaredOnly {
pub keyword: &'static str,
pub note: &'static str,
}Expand description
What a declaring-but-not-enforcing engine says about its own constraints.
Fields§
§keyword: &'static strThe engine’s own words, appended to every key constraint it renders
— BigQuery’s " NOT ENFORCED", leading space included, because the
suffix is concatenated onto the constraint text.
"" where the engine has no such keyword. That is not a lesser answer:
it is the honest one for Redshift, and it is what routes the fact into
ConstraintEnforcement::ddl_note instead.
note: &'static strOne sentence saying what this engine does with a declared constraint, written for whoever is reading the rendered DDL.
Say what is and is not guaranteed, and where the guarantee has to come from instead — a reader who learns only “not enforced” still does not know whether their data is safe. It is rendered inside a SQL comment, so keep it to prose and never spell a statement.
Required even when keyword is non-empty: the docs read it in both
cases, and only the DDL note is skipped where the keyword already
speaks.
Trait Implementations§
Source§impl Clone for DeclaredOnly
impl Clone for DeclaredOnly
Source§fn clone(&self) -> DeclaredOnly
fn clone(&self) -> DeclaredOnly
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more