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

Function temp_output_path

nodedb/tests/sql_copy_to.rs:18–22  ·  view source on GitHub ↗

Create a named temp file path that will be written by COPY TO. Returns the path string; the file does not exist yet.

(suffix: &str)

Source from the content-addressed store, hash-verified

16/// Create a named temp file path that will be written by COPY TO.
17/// Returns the path string; the file does not exist yet.
18fn temp_output_path(suffix: &str) -> (tempfile::TempDir, String) {
19 let dir = tempfile::tempdir().expect("create tempdir");
20 let path = dir.path().join(format!("output{suffix}"));
21 (dir, path.to_string_lossy().into_owned())
22}
23
24/// Count rows in a collection via SELECT COUNT(*).
25async fn count_rows(srv: &TestServer, collection: &str) -> i64 {

Callers 9

copy_to_ndjson_basicFunction · 0.85
copy_to_json_array_basicFunction · 0.85
copy_to_csv_with_headerFunction · 0.85
copy_to_csv_no_headerFunction · 0.85
copy_to_query_formFunction · 0.85
copy_to_returns_copy_tagFunction · 0.85

Calls 3

joinMethod · 0.80
expectMethod · 0.45
pathMethod · 0.45

Tested by

no test coverage detected