MCPcopy Create free account
hub / github.com/NodeDB-Lab/nodedb / add_bitemporal_fk

Method add_bitemporal_fk

nodedb-crdt/src/constraint.rs:109–126  ·  view source on GitHub ↗

Add a BITEMPORAL FOREIGN KEY constraint.

(
        &mut self,
        name: &str,
        collection: &str,
        field: &str,
        ref_collection: &str,
        ref_key: &str,
    )

Source from the content-addressed store, hash-verified

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) {

Callers 1

Calls 2

to_stringMethod · 0.80
addMethod · 0.45

Tested by 1