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

Function schema

nodedb-crdt/tests/constraint_resolution/common.rs:18–24  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

16}
17
18pub fn schema() -> ConstraintSet {
19 let mut cs = ConstraintSet::new();
20 cs.add_unique("users_email_unique", "users", "email");
21 cs.add_not_null("users_name_nn", "users", "name");
22 cs.add_foreign_key("posts_author_fk", "posts", "author_id", "users", "id");
23 cs
24}
25
26pub fn user_row(name: &str, email: &str) -> Vec<(String, LoroValue)> {
27 vec![

Calls 3

add_uniqueMethod · 0.80
add_not_nullMethod · 0.80
add_foreign_keyMethod · 0.80

Tested by

no test coverage detected