ankane/blazer

[idea] Raw result callback ☎️

LyzioOh opened this issue · 1 comments

We massively use blazer in our company. It's an awesome tool in order to quickly prototype complex SQL QUERY and iterate. It help a lot engineer beginnig their carrer to learn sql. But our dataset is getting bigger we start pusching the libary outside it's boundaries. 🚀

Would be awesome to get a callback to get the raw data, inside rails.
I was thinking something like this.

Blazer.configure do |config|
  config.result_callbacks = [ Proc.new {|title, result| DO_WHATEVER_YOU_WANT}]
end

The idea behind that is posting the result to slack, in the company onedrive, ect ...

Hey @LyzioOh, can you explain the use case a bit more (for instance, are you using the query title/description to determine which action to take)?