Could default PrepareStatment be disabled? #1590
-
I'm dealing with a custom SQL database, which support part of MySQL connection protocols. However, It doesn't support server-side prepare statments. But I found SQLx place PrepareStatment as default feature and try to prepare each time SQL is executed. Is there any way to disable it? or could SQLx execute PrepareStatment at client side? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
If you call any method of let mut conn = PgConnection::connect("<database URL>").await?;
let row: PgRow = conn.fetch_one("SELECT 1, 'foo'").await?; Note that you cannot use bind parameters as that requires prepared statements to function. |
Beta Was this translation helpful? Give feedback.
If you call any method of
Executor
(except of course.prepare()
and.prepare_with()
) with a string slice, it will execute the query directly instead of preparing a statement:Note that you cannot use bind parameters as that requires prepared statements to function.