-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Should statement/execute
return result instead of statement object?
#3
Comments
statement/execute
return result from (php/-> (stmt :stmt) (execute))
?statement/execute
return result instead of statement object?
Needs some thinking as Maybe it would be better to keep current |
Thank you very much. Indeed, as a simple PDO wrapper library, it might be more appropriate for However, the Line 21 in cac6791
Therefore, we think it is impossible for the return value of Given these considerations, I would like to document that the return value of |
doc: add note about return value of `statement/execute` #3
I noted that when inserting something with
statement/execute
, I would expect to receive the insertion result (e.g.true
) coming from(php/-> (stmt :stmt) (execute))
which is now discarded with the original statement being returned inphel-pdo/src/statement.phel
Line 48 in cac6791
This leaves no other way to know if insertion was successful than looking for a
PDOException
if I got it correct. Maybe this could be considered while improving this library.Example situation where I noticed this being an issue while making function allowing to insert map into table:
The text was updated successfully, but these errors were encountered: