This is a wrapper over mysql.prepared.Prepared, provided ONLY as a
temporary aid in upgrading to mysql-native v2.0.0 and its
new connection-independent model of prepared statements. See the
migration guide
for more info.
In most cases, this layer shouldn't even be needed. But if you have many
lines of code making calls to exec/query the same prepared statement,
then this may be helpful.
To use this temporary compatability layer, change instances of:
autostmt = conn.prepare(...);
to this:
autostmt = conn.prepareBackwardCompat(...);
And then your prepared statement should work as before.
BUT DO NOT LEAVE IT LIKE THIS! Ultimately, you should update
your prepared statement code to the mysql-native v2.0.0 API, by changing
instances of:
Both of the above syntaxes can be used with a BackwardCompatPrepared
(the Connection passed directly to mysql.commands.exec/mysql.commands.query
will override the one embedded associated with your BackwardCompatPrepared).
Once all of your code is updated, you can change prepareBackwardCompat
back to prepare again, and your upgrade will be complete.
This is a wrapper over mysql.prepared.Prepared, provided ONLY as a temporary aid in upgrading to mysql-native v2.0.0 and its new connection-independent model of prepared statements. See the migration guide for more info.
In most cases, this layer shouldn't even be needed. But if you have many lines of code making calls to exec/query the same prepared statement, then this may be helpful.
To use this temporary compatability layer, change instances of:
to this:
And then your prepared statement should work as before.
BUT DO NOT LEAVE IT LIKE THIS! Ultimately, you should update your prepared statement code to the mysql-native v2.0.0 API, by changing instances of:
to this:
Both of the above syntaxes can be used with a BackwardCompatPrepared (the Connection passed directly to mysql.commands.exec/mysql.commands.query will override the one embedded associated with your BackwardCompatPrepared).
Once all of your code is updated, you can change prepareBackwardCompat back to prepare again, and your upgrade will be complete.