SQL helper for Redbean