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)]

Value parameters

encoder

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

sql

A SQL statement returning no rows.

Attributes

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
Show all

Members list

Grouped members

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 to[B](implicit ev: Iso[A, B]): Command[B]

Attributes

Source
Command.scala

Deprecated methods

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

Attributes

Deprecated
true
Source
Command.scala

Inherited methods

def productElementNames: Iterator[String]

Attributes

Inherited from:
Product
def productIterator: Iterator[Any]

Attributes

Inherited from:
Product