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

Function delete_removes_row

nodedb/tests/engine_surface_document_strict.rs:87–106  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

85
86#[tokio::test]
87async fn delete_removes_row() {
88 let srv = TestServer::start().await;
89 srv.exec("CREATE TABLE strict_del (id TEXT PRIMARY KEY, label TEXT)")
90 .await
91 .unwrap();
92
93 srv.exec("INSERT INTO strict_del (id, label) VALUES ('d1', 'keep')")
94 .await
95 .unwrap();
96 srv.exec("INSERT INTO strict_del (id, label) VALUES ('d2', 'remove')")
97 .await
98 .unwrap();
99 srv.exec("DELETE FROM strict_del WHERE id = 'd2'")
100 .await
101 .unwrap();
102
103 let rows = srv.query_rows("SELECT id FROM strict_del").await.unwrap();
104 assert_eq!(rows.len(), 1);
105 assert_eq!(rows[0][0], "d1");
106}
107
108#[tokio::test]
109async fn count_aggregation() {

Callers

nothing calls this directly

Calls 2

query_rowsMethod · 0.80
execMethod · 0.45

Tested by

no test coverage detected