Database resultset helper functions

Database resultset helper functions