async fn run_namespace_prelude(
db: &GreptimeDB,
namespace: &str,
query_ctx: &QueryContext,
) -> Result<(), String>Expand description
Execute the namespace prelude (CREATE DATABASE IF NOT EXISTS + USE) for a case. This is NOT written into verify.result.
The prelude is protocol-aware:
CREATE DATABASEis always sent via gRPC so it works regardless of statement-level protocol directives.- For Postgres-protocol statements,
SET search_pathselects the case namespace instead of runningUSE(which is not valid PG SQL). - For MySQL and default/gRPC statements,
USE <ns>runs through the statement’s effective context.