You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using prepared statements, binding the params requires passing variables by reference.
I suspect the original reason for that may have been as a rudimentary ORM-like approach, where you "bind" params to variables once and only once, and then can call execPrepared multiple times, simply changing the values of the already-bound variables between executions of the prepared statement.
I think that usage-pattern has merit, but it should be left to a higher-level interface, built on top of a pass-by-value binding system. Using references/pointers has too many downsides in modern D to be the fundamental basis of this lib's low-level interface.
The text was updated successfully, but these errors were encountered:
When using prepared statements, binding the params requires passing variables by reference.
I suspect the original reason for that may have been as a rudimentary ORM-like approach, where you "bind" params to variables once and only once, and then can call execPrepared multiple times, simply changing the values of the already-bound variables between executions of the prepared statement.
I think that usage-pattern has merit, but it should be left to a higher-level interface, built on top of a pass-by-value binding system. Using references/pointers has too many downsides in modern D to be the fundamental basis of this lib's low-level interface.
The text was updated successfully, but these errors were encountered: