Fragment

skunk.Fragment
See theFragment companion object
final case class Fragment[A](parts: List[Either[String, State[Int, String]]], encoder: Encoder[A], origin: Origin) extends A => AppliedFragment

A composable, embeddable hunk of SQL and typed parameters (common precursor to Command and Query). Although it is possible to construct a Fragment directly it is more typical to use the sql interpolator.

Attributes

Companion
object
Source
Fragment.scala
Graph
Supertypes
trait Serializable
trait Product
trait Equals
trait A => AppliedFragment
class Object
trait Matchable
class Any
Show all

Members list

Value members

Concrete methods

def <~(fb: Fragment[Void]): Fragment[A]

Attributes

Source
Fragment.scala
def apply(a: A): AppliedFragment

Attributes

Source
Fragment.scala
def command: Command[A]

Attributes

Source
Fragment.scala
def contramap[B](f: B => A): Fragment[B]

Attributes

Source
Fragment.scala
def product[B](fb: Fragment[B]): Fragment[(A, B)]

Attributes

Source
Fragment.scala
def query[B](decoder: Decoder[B]): Query[A, B]

Attributes

Source
Fragment.scala
def queryDynamic: Query[A, List[Option[String]]]

Attributes

Source
Fragment.scala

Attributes

Source
Fragment.scala
def stripMargin(marginChar: Char): Fragment[A]

Attributes

Source
Fragment.scala
override def toString: String

Returns a string representation of the object.

Returns a string representation of the object.

The default representation is platform dependent.

Attributes

Returns

a string representation of the object.

Definition Classes
Function1 -> Any
Source
Fragment.scala
def ~[B](fb: Fragment[B]): Fragment[(A, B)]

Attributes

Source
Fragment.scala
def ~>[B](fb: Fragment[B])(implicit ev: Void =:= A): Fragment[B]

Attributes

Source
Fragment.scala

Inherited methods

def andThen[A](g: AppliedFragment => A): T1 => A

Attributes

Inherited from:
Function1
def compose[A](g: A => A): A => R

Attributes

Inherited from:
Function1
def productElementNames: Iterator[String]

Attributes

Inherited from:
Product
def productIterator: Iterator[Any]

Attributes

Inherited from:
Product

Concrete fields

lazy val sql: String

Attributes

Source
Fragment.scala