-
Notifications
You must be signed in to change notification settings - Fork 78
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
Get SQL 'RAISE EXCEPTION' functionality from DB to Crystal #200
Comments
There's |
Ah, would you demonstrate how it can be used? |
That's how I use it in specs to just print the notice to STDOUT: db.connection.on_notice do |notice|
puts
print "NOTICE from PG: "
puts notice
end |
I see! |
@ArtLinkov Would you be able to open a PR for the readme? There is a related part here https://github.com/will/crystal-pg#listennotify where it could go. Since you most recently knew what you were looking for, you'd be in the best spot to write it in such a way that would be easy for the next person having the same issue. |
@will PR sent |
I think this is closed by #201 |
It is possible to write exceptions and notices in SQL functions (like in any programming language), for example:
I did not find any method of querying that also captures such exceptions and returns them to crystal.
Does this functionality exist or is it a missing feature?
The text was updated successfully, but these errors were encountered: