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

Function results_to_json

xtask/src/main.rs:3798–3820  ·  view source on GitHub ↗
(results: Vec<pglite_oxide::Results>)

Source from the content-addressed store, hash-verified

3796}
3797
3798fn results_to_json(results: Vec<pglite_oxide::Results>) -> serde_json::Value {
3799 serde_json::Value::Array(
3800 results
3801 .into_iter()
3802 .map(|result| {
3803 serde_json::json!({
3804 "fields": result
3805 .fields
3806 .into_iter()
3807 .map(|field| {
3808 serde_json::json!({
3809 "name": field.name,
3810 "dataTypeId": field.data_type_id,
3811 })
3812 })
3813 .collect::<Vec<_>>(),
3814 "rows": result.rows,
3815 "affectedRows": result.affected_rows,
3816 })
3817 })
3818 .collect(),
3819 )
3820}
3821
3822fn run_speed_hotspot_diagnostic_case(
3823 cases: &[SpeedCase],

Callers 2

exec_rows_jsonFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected