scala - change data type sequence String to String -


my dal :

  def login(username: string,pass :string) =           sql"""select ad1sys.pkg_stc_login.user_login ('#$username','#$pass')from dual""".as[string]        def getempname(username: string,empname :string) =           sql"""select ad1sys.pkg_stc_login.get_empl_name ('#$username','#$empname') dual""".as[(string)] 

my service :

def login(username:string,pass:string): future[seq[(string)]] = {     db.run(dallogin.login(username, pass))   }    def getempname(username:string,empname:string): future[seq[(string)]] = {     db.run(dallogin.getempname(username, empname))   } 

my controller :

def login = action.async(bodyparsers.parse.json) { request =>    val username = (request.body \ "username").as[string]    val pass = (request.body \ "pass").as[string]    servicelogin.login(username, pass).map { data =>     servicelogin.getempname(username,data).map(result =>       ok(json.tojson(result.map( p =>             modelkodecabang(p)         ))         ))}       } 

the result service.login seq(string) "data", can't use seq(string) parameter servicelogin.getempname(username,data).. how convert seq(string) string ??


Comments

Popular posts from this blog

Load Balancing in Bluemix using custom domain and DNS SRV records -

oracle - pls-00402 alias required in select list of cursor to avoid duplicate column names -

python - Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>] error -