Makes a function for executing sql assertions against a database connection