Modification to allow for custom dialects and to allow dialects to handle the ResultSet getObject.