package models.services
import org.squeryl._
import org.squeryl.PrimitiveTypeMode._
import models._
case class UserManager() {
  def userList(request: play.api.mvc.Request[play.api.mvc.AnyContent]): String = {
      var userList:String = ""
      inTransaction {
        val users = PartsListDb.users.where(u => u.name like request.getQueryString("q").get + "%")
        for(user <- users) {
          userList = userList.concat(user.name)
          userList = userList.concat("\n")
         }
       }
      return userList
  }

}