Open vlanse opened 6 years ago
I think they should work in same way as stored procedure work: https://github.com/aio-libs/aiomysql/blob/274cfc067c827fa3837af39d475181cdaeae1fbc/examples/example_callproc.py#L5-L22
@jettify sorry, just a little more context. I meant especially sqlalchemy case (e.g. when using sa connection)
right now the execute
code always substitutes values on client side
Does sqlalchemy support prepared statements?
Well, looks like it's not about sqlalchemy which is responsible for building the queries. The sa compiled statement itself could be handled by connector in a special way - like "prepared" statement.
considering that this library is based on PyMySQL this should be implemented in PyMySQL first and only then ported to aiomysql.
https://dev.mysql.com/doc/refman/5.6/en/sql-syntax-prepared-statements.html
Do you have any plans to support this? Could be useful to utilise MySQL server more efficient, e.g. do not parse SQL on server any time the same query with different parameters appears.