Added new implementation of callback for sql