MCPcopy Create free account
hub / github.com/MaterializeInc/materialize / execute_input

Function execute_input

src/testdrive/src/action/postgres/execute.rs:18–30  ·  view source on GitHub ↗
(cmd: BuiltinCommand, client: &Client)

Source from the content-addressed store, hash-verified

16use crate::util::postgres::postgres_client;
17
18async fn execute_input(cmd: BuiltinCommand, client: &Client) -> Result<(), anyhow::Error> {
19 for query in cmd.input {
20 println!(">> {}", query);
21 // `query` is raw SQL from testdrive input and may contain multiple
22 // statements; this command intentionally forwards it verbatim.
23 #[allow(clippy::disallowed_methods)]
24 client
25 .batch_execute(&query)
26 .await
27 .context("executing postgres query")?;
28 }
29 Ok(())
30}
31
32pub async fn run_execute(
33 mut cmd: BuiltinCommand,

Callers 1

run_executeFunction · 0.85

Calls 2

batch_executeMethod · 0.80
contextMethod · 0.45

Tested by

no test coverage detected