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

Function run_native_prepared_update_tests

xtask/src/main.rs:3070–3106  ·  view source on GitHub ↗
(
    postgres_bin: &Path,
    initdb_bin: &Path,
    numeric_updates: &[(i32, i32)],
    text_updates: &[(i32, String)],
    execution: PreparedExecution,
)

Source from the content-addressed store, hash-verified

3068}
3069
3070fn run_native_prepared_update_tests(
3071 postgres_bin: &Path,
3072 initdb_bin: &Path,
3073 numeric_updates: &[(i32, i32)],
3074 text_updates: &[(i32, String)],
3075 execution: PreparedExecution,
3076) -> Result<Vec<PreparedUpdateTest>> {
3077 let runtime = tokio::runtime::Builder::new_current_thread()
3078 .enable_all()
3079 .build()
3080 .context("create native prepared-update Tokio runtime")?;
3081
3082 Ok(vec![
3083 run_native_prepared_update_case(
3084 &runtime,
3085 postgres_bin,
3086 initdb_bin,
3087 "numeric_indexed",
3088 "Parameterized numeric UPDATEs with indexes on lookup and updated columns",
3089 "UPDATE t2 SET b=$1 WHERE a=$2",
3090 numeric_updates,
3091 None,
3092 execution,
3093 )?,
3094 run_native_prepared_update_case(
3095 &runtime,
3096 postgres_bin,
3097 initdb_bin,
3098 "text_indexed",
3099 "Parameterized text UPDATEs with indexes on lookup and numeric column",
3100 "UPDATE t2 SET c=$1 WHERE a=$2",
3101 &[],
3102 Some(text_updates),
3103 execution,
3104 )?,
3105 ])
3106}
3107
3108#[allow(clippy::too_many_arguments)]
3109fn run_native_prepared_update_case(

Callers 1

perf_prepared_updatesFunction · 0.85

Calls 1

buildMethod · 0.80

Tested by

no test coverage detected