final case class Command[A](sql: String, origin: Origin, encoder: Encoder[A]) extends Statement[A] with Product with Serializable
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]
- sql
A SQL statement returning no rows.
- encoder
An encoder for all parameters
$1
,$2
, etc., insql
.
- Source
- Command.scala
- See also
StringContextOps for information on the
sql
interpolator.Session for information on executing a
Command
.
- Grouped
- Alphabetic
- By Inheritance
- Command
- Serializable
- Serializable
- Product
- Equals
- Statement
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
-
def
contramap[B](f: (B) ⇒ A): Command[B]
Command is a contravariant functor.
- val encoder: Encoder[A]
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- val origin: Origin
- val sql: String
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()