Added a couple of SQL helpers