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

Function run_pglite_sqlx_prepared_update_tests

xtask/src/main.rs:2750–2774  ·  view source on GitHub ↗
(
    numeric_updates: &[(i32, i32)],
    text_updates: &[(i32, String)],
)

Source from the content-addressed store, hash-verified

2748}
2749
2750fn run_pglite_sqlx_prepared_update_tests(
2751 numeric_updates: &[(i32, i32)],
2752 text_updates: &[(i32, String)],
2753) -> Result<Vec<PreparedUpdateTest>> {
2754 let runtime = tokio::runtime::Builder::new_current_thread()
2755 .enable_all()
2756 .build()
2757 .context("create prepared-update SQLx Tokio runtime")?;
2758
2759 let numeric = run_pglite_sqlx_prepared_update_case(
2760 &runtime,
2761 "numeric_indexed",
2762 "Parameterized numeric UPDATEs with indexes on lookup and updated columns",
2763 "UPDATE t2 SET b=$1 WHERE a=$2",
2764 PreparedUpdateValues::Numeric(numeric_updates),
2765 )?;
2766 let text = run_pglite_sqlx_prepared_update_case(
2767 &runtime,
2768 "text_indexed",
2769 "Parameterized text UPDATEs with indexes on lookup and numeric column",
2770 "UPDATE t2 SET c=$1 WHERE a=$2",
2771 PreparedUpdateValues::Text(text_updates),
2772 )?;
2773 Ok(vec![numeric, text])
2774}
2775
2776enum PreparedUpdateValues<'a> {
2777 Numeric(&'a [(i32, i32)]),

Callers

nothing calls this directly

Calls 2

buildMethod · 0.80

Tested by

no test coverage detected