ParameterBinder

scalikejdbc.ParameterBinder
See theParameterBinder companion object

Enables customizing StatementExecutor#bindParams behavior.

val bytes = Array[Byte](1,2,3, ...)
val in = ByteArrayInputStream(bytes)
val bin = ParameterBinder(
 value = in,
 binder = (stmt, idx) => stmt.setBinaryStream(idx, in, bytes.length)
)
sql"insert into table (bin) values (${bin})".update.apply()

Attributes

Companion
object
Source
ParameterBinder.scala
Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes
Self type

Members list

Value members

Abstract methods

def apply(stmt: PreparedStatement, idx: Int): Unit

Applies parameter to PreparedStatement.

Applies parameter to PreparedStatement.

Attributes

Source
ParameterBinder.scala