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

Method add_not_null

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

Add a NOT NULL constraint.

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

Source from the content-addressed store, hash-verified

127
128 /// Add a NOT NULL constraint.
129 pub fn add_not_null(&mut self, name: &str, collection: &str, field: &str) {
130 self.add(Constraint {
131 name: name.to_string(),
132 collection: collection.to_string(),
133 field: field.to_string(),
134 kind: ConstraintKind::NotNull,
135 });
136 }
137
138 /// Get all constraints for a given collection.
139 pub fn for_collection(&self, collection: &str) -> Vec<&Constraint> {

Callers 7

setupFunction · 0.80
user_schemaFunction · 0.80
schemaFunction · 0.80
test_constraintsFunction · 0.80

Calls 2

to_stringMethod · 0.80
addMethod · 0.45

Tested by 7

setupFunction · 0.64
user_schemaFunction · 0.64
schemaFunction · 0.64
test_constraintsFunction · 0.64