-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Description
I have found these related issues/pull requests
maybe relates to #3640 ?
Description
I'm using sqlx with amazon aurora dsql, which is a subset of postgres.
When trying to use the query_as! macro, as well as preparing for offline mode with cargo sqlx prepare, I encounter the error error returned from database: unsupported statement: Execute for even simple queries such as sqlx::query_as!(MyEntity, "SELECT * FROM mytable WHERE id=$1", id) .
After investigating for a few hours (and I'm new to sqlx so please lmk if I'm entirely off the mark), think I pinpointed the problem into the describe logic on sqlx-postgres , which uses EXPLAIN ... EXECUTE ... if EXPLAIN is supported by the db: dsql supports EXPLAIN but not with EXECUTE.
Prefered solution
I don't think I understand enough of what could be an appropriate way to add support in this case, but perhaps this could fall into a case similar to cockroachdb and others, which I see in the same file are detected as not supporting explain and use alternative logic?
would be great to be able to use compile-time checked queries in dsql too! 🙏 thank you
Is this a breaking change? Why or why not?
I wouldn't think so - but as per above, I don't have enough in-depth knowledge of sqlx to understand whether an appropriate solution needs more complex changes.