MCPcopy Create free account
hub / github.com/f0rr0/oliphaunt / run_direct_select_one

Function run_direct_select_one

xtask/src/main.rs:4732–4746  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

4730}
4731
4732fn run_direct_select_one() -> Result<()> {
4733 let visible_started = Instant::now();
4734 let mut db = Pglite::builder().temporary().open()?;
4735 let result = db.query(
4736 "SELECT $1::int4 + 1 AS answer",
4737 &[serde_json::json!(41)],
4738 None,
4739 )?;
4740 ensure_json_int(&result.rows[0]["answer"], 42)?;
4741 record_phase_timing(
4742 "visible.direct_open_to_first_query",
4743 visible_started.elapsed(),
4744 );
4745 measure_phase("operation.close", || db.close())
4746}
4747
4748fn run_direct_vector_query() -> Result<()> {
4749 let visible_started = Instant::now();

Callers

nothing calls this directly

Calls 8

ensure_json_intFunction · 0.85
record_phase_timingFunction · 0.85
measure_phaseFunction · 0.85
elapsedMethod · 0.80
openMethod · 0.45
temporaryMethod · 0.45
queryMethod · 0.45
closeMethod · 0.45

Tested by

no test coverage detected