When migrating to play 2.4 I noticed the following:
1/apply is deprecated on SqlQuery - ok - I looked at the provided implementation :
def go(c: Option[Cursor], s: Stream[Row]): Stream[Row] = c match {
case Some(cursor) => go(cursor.next, s :+ cursor.row)
case _ => s
}
Isn't that appending each element to a Stream which time is proportional to the size of stream? eg doesn't that end up being n2? The previous implementation used cons I think...
2/SqlQuery("qry") used to have a way to not parse the query - That seems to have been removed
I have a use case with a query executed often (like 1000qps) and that I cannot cache once : it looks like select X,Y,Y from dbname.db - So no bindable statement for database name. For a large query it turns out the statement parser is somewhat slow - Is there a way to explicitly say: I don't need that query parsed?
3/ResultSetParser has gone totally private - I had a util function that provided:
def vector[A](p: RowParser[A]): ResultSetParser[Vector[A]] ...
because I prefer Vector - I used that with SQL("...").as Any suggestion as to how to replace? withResult maybe?