MCPcopy Create free account
hub / github.com/NodeDB-Lab/nodedb / zero_placeholder_errors

Function zero_placeholder_errors

nodedb-sql/src/dsl_bind.rs:215–224  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

213
214 #[test]
215 fn zero_placeholder_errors() {
216 // `$0` is not a valid pgwire parameter reference — must error,
217 // not silently pass through to the engine.
218 let err = bind_dsl(
219 "UPSERT INTO t (id) VALUES ($0)",
220 &[ParamValue::Text("x".into())],
221 )
222 .unwrap_err();
223 assert!(format!("{err:?}").contains("$0"));
224 }
225
226 #[test]
227 fn empty_params_is_noop() {

Callers

nothing calls this directly

Calls 1

bind_dslFunction · 0.85

Tested by

no test coverage detected