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

Function out_of_range_placeholder_errors

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

Source from the content-addressed store, hash-verified

199
200 #[test]
201 fn out_of_range_placeholder_errors() {
202 let err = bind_dsl(
203 "UPSERT INTO t (id, n) VALUES ($1, $2)",
204 &[ParamValue::Text("only-one".into())],
205 )
206 .unwrap_err();
207 let msg = format!("{err:?}");
208 assert!(
209 msg.contains("$2") && msg.to_lowercase().contains("placeholder"),
210 "error must name the unresolved placeholder: {msg}"
211 );
212 }
213
214 #[test]
215 fn zero_placeholder_errors() {

Callers

nothing calls this directly

Calls 1

bind_dslFunction · 0.85

Tested by

no test coverage detected