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

Function count_aggregation

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

Source from the content-addressed store, hash-verified

107
108#[tokio::test]
109async fn count_aggregation() {
110 let srv = TestServer::start().await;
111 srv.exec("CREATE TABLE strict_cnt (id TEXT PRIMARY KEY, v INT)")
112 .await
113 .unwrap();
114
115 for i in 0..4u32 {
116 srv.exec(&format!(
117 "INSERT INTO strict_cnt (id, v) VALUES ('c{i}', {i})"
118 ))
119 .await
120 .unwrap();
121 }
122
123 let rows = srv
124 .query_rows("SELECT COUNT(*) FROM strict_cnt")
125 .await
126 .unwrap();
127 assert_eq!(rows[0][0].parse::<u32>().unwrap(), 4);
128}
129
130#[tokio::test]
131async fn wal_restart_durability() {

Callers

nothing calls this directly

Calls 2

query_rowsMethod · 0.80
execMethod · 0.45

Tested by

no test coverage detected