Returns a Play JDBC context, able to apply function Database => A
.
Returns a Play JDBC context, able to apply function Database => A
.
The handler
is used to delegates query execution,
as soon as the statement is matching withQueryDetection
.
import acolyte.jdbc.QueryExecution import acolyte.jdbc.AcolyteDSL.handleStatement handleStatement withPlayDBHandler { e: QueryExecution => aQueryResult } // With pattern matching ... import acolyte.jdbc.ParameterVal val runner = handleStatement withPlayDB { _ match { case QueryExecution("SELECT * FROM Test WHERE id = ?", ParameterVal(1) :: Nil) => aQueryResult case _ => otherResult } } runner { db => // Any code using Play Database }
Returns a Play JDBC context, able to apply function Database => A
.
Returns a Play JDBC context, able to apply function Database => A
.
The result
is given to any query.
import acolyte.jdbc.PlayJdbcDSL.withQueryResult val str: String = withPlayDBResult(queryRes) { con => "str" }
Acolyte DSL for JDBC.