Command

skunk.Command
See theCommand companion object
final case class Command[A](sql: String, origin: Origin, encoder: Encoder[A]) extends Statement[A]

SQL and parameter encoder for a statement that returns no rows. We assume that sql has the same number of placeholders of the form $1, $2, etc., as the number of slots encoded by encoder, and that the parameter types specified by encoder are consistent with the schema. The check methods on Session provide a means to verify this assumption.

You can construct a Command directly, although it is more typical to use the sql interpolator.

sql"INSERT INTO foo VALUES ($int2, $varchar)".command // Command[Short ~ String]

Attributes

encoder

An encoder for all parameters $1, $2, etc., in sql.

sql

A SQL statement returning no rows.

See also:

StringContextOps for information on the sql interpolator.

Session for information on executing a Command.

Companion:
object
Source:
Command.scala
Graph
Supertypes
trait Serializable
trait Product
trait Equals
trait Statement[A]
class Object
trait Matchable
class Any

Members list

Concise view

Transformations

def contramap[B](f: B => A): Command[B]

Command is a contravariant functor.

Command is a contravariant functor.

Attributes

Source:
Command.scala

Value members

Concrete methods

Attributes

Source:
Command.scala
def gcontramap[B](implicit ev: Aux[B, A]): Command[B]

Attributes

Source:
Command.scala

Inherited methods

Attributes

Inherited from:
Product

Attributes

Inherited from:
Product