Added the SQL methods for Repository and removed the Arel methods