MCPcopy Create free account
hub / github.com/BohemiaInteractive/CWR / bind_sql

Method bind_sql

mserver/MasterService/src/repository.rs:178–180  ·  view source on GitHub ↗

Adapt a query body written with SQLite-style `?` placeholders to the active dialect. SQLite keeps `?`; Postgres needs `$1..$N`. The sqlx `Any` driver does not translate placeholders, so a `?` reaches Postgres verbatim and is rejected ("syntax error at end of input").

(&self, query: &'a str)

Source from the content-addressed store, hash-verified

176 .await
177 .context("adding servers.token_hash")?;
178 }
179 Ok(())
180 }
181
182 async fn create_post_migration_indexes(&self) -> Result<()> {
183 sqlx::raw_sql(

Callers 13

registerMethod · 0.80
observeMethod · 0.80
set_token_hashMethod · 0.80
server_token_hashMethod · 0.80
getMethod · 0.80
unregisterMethod · 0.80
prune_staleMethod · 0.80
clear_samplesMethod · 0.80
clear_sessionsMethod · 0.80
insert_sampleMethod · 0.80
insert_sessionMethod · 0.80
historyMethod · 0.80

Calls 1

rewrite_placeholdersFunction · 0.85

Tested by

no test coverage detected