Java users can use Parameters.nullParameter.
Converts the given value
into a Parameter at runtime.
Converts the given value
into a Parameter at runtime.
Scala users may use the implicit conversions if they prefer.
import com.twitter.finagle.mysql.Parameter val p: Parameter = Parameter.of("a string")
Any unknown types are treated as a SQL NULL.
Parameters.of for Java users.
Synonym for of.
Generally used via implicits.
Generally used via implicits.
import com.twitter.finagle.mysql.Parameter import com.twitter.finagle.mysql.Parameter._ val p: Parameter = "this will get implicitly converted to a Parameter"
Java users can use Parameters.of.
Generally used via implicits.
Generally used via implicits.
Input of None
is treated as a NULL
.
import com.twitter.finagle.mysql.Parameter import com.twitter.finagle.mysql.Parameter._ val p: Parameter = Some("this will get implicitly converted to a Parameter")
Java users can use Parameters.of.
For Scala users, the typical usage is by importing the implicit conversions and then letting the compiler do the conversions for you. Explicit runtime conversions are also available via Parameter.of.
Java users should generally be using Parameters.of to do explicit conversions.
A Scala example with implicits:
A Scala example without implicits:
A Java example:
Parameters for a Java-friendly API.