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

Function upsert_int_and_text_params

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

Source from the content-addressed store, hash-verified

132
133 #[test]
134 fn upsert_int_and_text_params() {
135 let bound = bind_dsl(
136 "UPSERT INTO t (id, n) VALUES ($1, $2)",
137 &[ParamValue::Text("alice".into()), ParamValue::Int64(42)],
138 )
139 .unwrap();
140 assert!(
141 bound.as_str().contains("'alice'"),
142 "text param not substituted: {}",
143 bound.as_str()
144 );
145 assert!(
146 bound.as_str().contains("42"),
147 "int param not substituted: {}",
148 bound.as_str()
149 );
150 assert!(
151 !bound.as_str().contains('$'),
152 "placeholder survived: {}",
153 bound.as_str()
154 );
155 }
156
157 #[test]
158 fn search_top_k_param() {

Callers

nothing calls this directly

Calls 1

bind_dslFunction · 0.85

Tested by

no test coverage detected