1

I am running a stored procedure as plain sql in scala slick. This means that number of columns are determined at runtime based on paramters passed to stored procedure. Since the schema is not known before hand, I cant map to a class.

Is there anyway to get each of the rows as a list of strings?

Tried: sql"stored_procedure @param=value".as[List[String]]
Got Error: could not find implicit value for parameter rconv: scala.slick.jdbc.GetResult[List[String]]

I am also wondering how GetResult should be implemented with variable number of columns.
implicit val getResult = GetResult(r => CantMapToClassLikethis(r.<<, r.<<))

Any help is really appreciated

Rahul
  • 903
  • 8
  • 16

1 Answers1

1

You can use the recipe described here, but return a Seq or List instead of a Map.

Slick: query multiple tables/databases with getting column names

Community
  • 1
  • 1
cvogt
  • 11,260
  • 30
  • 46