Add a BITEMPORAL FOREIGN KEY constraint.
(
&mut self,
name: &str,
collection: &str,
field: &str,
ref_collection: &str,
ref_key: &str,
)
| 107 | |
| 108 | /// Add a BITEMPORAL FOREIGN KEY constraint. |
| 109 | pub fn add_bitemporal_fk( |
| 110 | &mut self, |
| 111 | name: &str, |
| 112 | collection: &str, |
| 113 | field: &str, |
| 114 | ref_collection: &str, |
| 115 | ref_key: &str, |
| 116 | ) { |
| 117 | self.add(Constraint { |
| 118 | name: name.to_string(), |
| 119 | collection: collection.to_string(), |
| 120 | field: field.to_string(), |
| 121 | kind: ConstraintKind::BiTemporalFK { |
| 122 | ref_collection: ref_collection.to_string(), |
| 123 | ref_key: ref_key.to_string(), |
| 124 | }, |
| 125 | }); |
| 126 | } |
| 127 | |
| 128 | /// Add a NOT NULL constraint. |
| 129 | pub fn add_not_null(&mut self, name: &str, collection: &str, field: &str) { |