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

Function bind_array_elements

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

Source from the content-addressed store, hash-verified

193
194 #[test]
195 fn bind_array_elements() {
196 let result = bind_and_format(
197 "SELECT ARRAY[$1, $2, $3]",
198 &[
199 ParamValue::Int64(1),
200 ParamValue::Int64(2),
201 ParamValue::Int64(3),
202 ],
203 );
204 assert!(
205 !result.contains("$1"),
206 "array placeholder survived: {result}"
207 );
208 assert!(
209 result.contains('1') && result.contains('2') && result.contains('3'),
210 "got: {result}"
211 );
212 }
213
214 #[test]
215 fn bind_any_op_rhs() {

Callers

nothing calls this directly

Calls 1

bind_and_formatFunction · 0.85

Tested by

no test coverage detected