Packages

c

slick.lifted

CaseClassShape

class CaseClassShape[P <: Product, LiftedTuple, LiftedCaseClass <: P, PlainTuple, PlainCaseClass <: P] extends MappedScalaProductShape[FlatShapeLevel, P, LiftedCaseClass, PlainCaseClass, LiftedCaseClass]

A generic case class shape that can be used to lift a case class of plain Scala types to a case class of lifted types. This allows the type to be used as a record type (like tuples and HLists) in the Lifted Embedding.

Example:

case class C(a: Int, b: Option[String])
case class LiftedC(a: Column[Int], b: Column[Option[String]])
implicit object cShape extends CaseClassShape(LiftedC.tupled, C.tupled)
Source
Shape.scala
Linear Supertypes
MappedScalaProductShape[FlatShapeLevel, P, LiftedCaseClass, PlainCaseClass, LiftedCaseClass], MappedProductShape[FlatShapeLevel, P, LiftedCaseClass, PlainCaseClass, LiftedCaseClass], ProductNodeShape[FlatShapeLevel, P, LiftedCaseClass, PlainCaseClass, LiftedCaseClass], Shape[FlatShapeLevel, LiftedCaseClass, PlainCaseClass, LiftedCaseClass], AnyRef, Any
Type Hierarchy
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. CaseClassShape
  2. MappedScalaProductShape
  3. MappedProductShape
  4. ProductNodeShape
  5. Shape
  6. AnyRef
  7. Any
Implicitly
  1. by StringFormat
  2. by Ensuring
  3. by ArrowAssoc
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Instance Constructors

  1. new CaseClassShape(mapLifted: (LiftedTuple) => LiftedCaseClass, mapPlain: (PlainTuple) => PlainCaseClass)(implicit columnShapes: Shape[FlatShapeLevel, LiftedTuple, PlainTuple, LiftedTuple], classTag: ClassTag[PlainCaseClass])

Type Members

  1. type Mixed = LiftedCaseClass
    Definition Classes
    Shape
  2. type Packed = LiftedCaseClass
    Definition Classes
    Shape
  3. type Unpacked = PlainCaseClass
    Definition Classes
    Shape

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. def ->[B](y: B): (CaseClassShape[P, LiftedTuple, LiftedCaseClass, PlainTuple, PlainCaseClass], B)
    Implicit
    This member is added by an implicit conversion from CaseClassShape[P, LiftedTuple, LiftedCaseClass, PlainTuple, PlainCaseClass] toArrowAssoc[CaseClassShape[P, LiftedTuple, LiftedCaseClass, PlainTuple, PlainCaseClass]] performed by method ArrowAssoc in scala.Predef.
    Definition Classes
    ArrowAssoc
    Annotations
    @inline()
  4. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  5. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  6. def buildParams(extract: (Any) => Unpacked): Packed

    Build a packed representation containing QueryParameters that can extract data from the unpacked representation later.

    Build a packed representation containing QueryParameters that can extract data from the unpacked representation later. This method is not available for shapes where Mixed and Unpacked are different types.

    Definition Classes
    ProductNodeShapeShape
  7. def buildValue(elems: IndexedSeq[Any]): LiftedCaseClass

    Build a record value represented by this Shape from its element values.

    Build a record value represented by this Shape from its element values.

    Definition Classes
    CaseClassShapeProductNodeShape
  8. implicit val classTag: ClassTag[PlainCaseClass]
  9. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native() @HotSpotIntrinsicCandidate()
  10. def copy(s: Seq[Shape[_ <: ShapeLevel, _, _, _]]): CaseClassShape[P, LiftedTuple, LiftedCaseClass, PlainTuple, PlainCaseClass]

    Create a copy of this Shape with new element Shapes.

    Create a copy of this Shape with new element Shapes. This is used for packing Shapes recursively.

    Definition Classes
    CaseClassShapeProductNodeShape
  11. def encodeRef(value: Mixed, path: Node): Any

    Encode a reference into a value of this Shape.

    Encode a reference into a value of this Shape. This method may not be available for shapes where Mixed and Packed are different types.

    Definition Classes
    ProductNodeShapeShape
  12. def ensuring(cond: (CaseClassShape[P, LiftedTuple, LiftedCaseClass, PlainTuple, PlainCaseClass]) => Boolean, msg: => Any): CaseClassShape[P, LiftedTuple, LiftedCaseClass, PlainTuple, PlainCaseClass]
    Implicit
    This member is added by an implicit conversion from CaseClassShape[P, LiftedTuple, LiftedCaseClass, PlainTuple, PlainCaseClass] toEnsuring[CaseClassShape[P, LiftedTuple, LiftedCaseClass, PlainTuple, PlainCaseClass]] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  13. def ensuring(cond: (CaseClassShape[P, LiftedTuple, LiftedCaseClass, PlainTuple, PlainCaseClass]) => Boolean): CaseClassShape[P, LiftedTuple, LiftedCaseClass, PlainTuple, PlainCaseClass]
    Implicit
    This member is added by an implicit conversion from CaseClassShape[P, LiftedTuple, LiftedCaseClass, PlainTuple, PlainCaseClass] toEnsuring[CaseClassShape[P, LiftedTuple, LiftedCaseClass, PlainTuple, PlainCaseClass]] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  14. def ensuring(cond: Boolean, msg: => Any): CaseClassShape[P, LiftedTuple, LiftedCaseClass, PlainTuple, PlainCaseClass]
    Implicit
    This member is added by an implicit conversion from CaseClassShape[P, LiftedTuple, LiftedCaseClass, PlainTuple, PlainCaseClass] toEnsuring[CaseClassShape[P, LiftedTuple, LiftedCaseClass, PlainTuple, PlainCaseClass]] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  15. def ensuring(cond: Boolean): CaseClassShape[P, LiftedTuple, LiftedCaseClass, PlainTuple, PlainCaseClass]
    Implicit
    This member is added by an implicit conversion from CaseClassShape[P, LiftedTuple, LiftedCaseClass, PlainTuple, PlainCaseClass] toEnsuring[CaseClassShape[P, LiftedTuple, LiftedCaseClass, PlainTuple, PlainCaseClass]] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  16. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  17. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  18. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  19. def getElement(value: P, idx: Int): Any

    Get the element value from a record value at the specified index.

    Get the element value from a record value at the specified index.

    Definition Classes
    MappedScalaProductShapeProductNodeShape
  20. def getIterator(value: P): Iterator[Any]

    Get an Iterator of a record value's element values.

    Get an Iterator of a record value's element values. The default implementation repeatedly calls getElement.

    Definition Classes
    MappedScalaProductShapeProductNodeShape
  21. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  22. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  23. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  24. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  25. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  26. def pack(value: Mixed): Packed

    Convert a value of this Shape's (mixed) type to the fully packed type

    Convert a value of this Shape's (mixed) type to the fully packed type

    Definition Classes
    ProductNodeShapeShape
  27. def packedShape: Shape[FlatShapeLevel, Packed, Unpacked, Packed]

    Return the fully packed Shape

    Return the fully packed Shape

    Definition Classes
    ProductNodeShapeShape
  28. val shapes: Seq[Shape[_ <: ShapeLevel, _, _, _]]

    The Shapes for the product elements.

    The Shapes for the product elements.

    Definition Classes
    CaseClassShapeProductNodeShape
  29. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  30. def toBase(v: Any): ProductWrapper
    Definition Classes
    MappedProductShape
  31. def toMapped(v: Any): PlainCaseClass
    Definition Classes
    CaseClassShapeMappedProductShape
  32. def toNode(value: Mixed): TypeMapping

    Return an AST Node representing a mixed value.

    Return an AST Node representing a mixed value.

    Definition Classes
    MappedProductShapeProductNodeShapeShape
  33. def toString(): String
    Definition Classes
    AnyRef → Any
  34. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  35. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  36. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])

Deprecated Value Members

  1. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable]) @Deprecated
    Deprecated
  2. def formatted(fmtstr: String): String
    Implicit
    This member is added by an implicit conversion from CaseClassShape[P, LiftedTuple, LiftedCaseClass, PlainTuple, PlainCaseClass] toStringFormat[CaseClassShape[P, LiftedTuple, LiftedCaseClass, PlainTuple, PlainCaseClass]] performed by method StringFormat in scala.Predef.
    Definition Classes
    StringFormat
    Annotations
    @deprecated @inline()
    Deprecated

    (Since version 2.12.16) Use formatString.format(value) instead of value.formatted(formatString), or use the f"" string interpolator. In Java 15 and later, formatted resolves to the new method in String which has reversed parameters.

  3. def [B](y: B): (CaseClassShape[P, LiftedTuple, LiftedCaseClass, PlainTuple, PlainCaseClass], B)
    Implicit
    This member is added by an implicit conversion from CaseClassShape[P, LiftedTuple, LiftedCaseClass, PlainTuple, PlainCaseClass] toArrowAssoc[CaseClassShape[P, LiftedTuple, LiftedCaseClass, PlainTuple, PlainCaseClass]] performed by method ArrowAssoc in scala.Predef.
    Definition Classes
    ArrowAssoc
    Annotations
    @deprecated
    Deprecated

    (Since version 2.13.0) Use -> instead. If you still wish to display it as one character, consider using a font with programming ligatures such as Fira Code.

Inherited from MappedScalaProductShape[FlatShapeLevel, P, LiftedCaseClass, PlainCaseClass, LiftedCaseClass]

Inherited from MappedProductShape[FlatShapeLevel, P, LiftedCaseClass, PlainCaseClass, LiftedCaseClass]

Inherited from ProductNodeShape[FlatShapeLevel, P, LiftedCaseClass, PlainCaseClass, LiftedCaseClass]

Inherited from Shape[FlatShapeLevel, LiftedCaseClass, PlainCaseClass, LiftedCaseClass]

Inherited from AnyRef

Inherited from Any

Inherited by implicit conversion StringFormat fromCaseClassShape[P, LiftedTuple, LiftedCaseClass, PlainTuple, PlainCaseClass] to StringFormat[CaseClassShape[P, LiftedTuple, LiftedCaseClass, PlainTuple, PlainCaseClass]]

Inherited by implicit conversion Ensuring fromCaseClassShape[P, LiftedTuple, LiftedCaseClass, PlainTuple, PlainCaseClass] to Ensuring[CaseClassShape[P, LiftedTuple, LiftedCaseClass, PlainTuple, PlainCaseClass]]

Inherited by implicit conversion ArrowAssoc fromCaseClassShape[P, LiftedTuple, LiftedCaseClass, PlainTuple, PlainCaseClass] to ArrowAssoc[CaseClassShape[P, LiftedTuple, LiftedCaseClass, PlainTuple, PlainCaseClass]]

Ungrouped