Packages

t

anorm

PGJson

sealed trait PGJson extends AnyRef

Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. PGJson
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. def asJson[T](value: T)(implicit w: Writes[T]): ParameterValue

    value

    the value to be passed as a JSON parameter

    w

    the Play writes to be used to serialized the value as JSON

    import play.api.libs.json._
    import anorm._, postgresql._
    
    case class Foo(bar: String)
    implicit val w: Writes[Foo] = Json.writes[Foo]
    
    val value = Foo("lorem")
    SQL"INSERT INTO test(id, json) VALUES(${"bar"}, ${value})".executeUpdate()
  6. def clone(): AnyRef
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @native() @throws( ... )
  7. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  8. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  9. def finalize(): Unit
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  10. def fromJson[T](implicit r: Reads[T]): Column[T]

    r

    the Play reader to be used from the selected JSONB value

    import play.api.libs.json.Reads
    import anorm.{ SQL, SqlParser }
    import anorm.postgresql._
    
    def foo(implicit r: Reads[Foo]): Foo
      SQL"SELECT json FROM test".
        as(SqlParser.scalar(fromJson[Foo]).single)
  11. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  12. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  13. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  14. implicit val jsObjectColumn: Column[JsObject]

    import play.api.libs.json.JsObject
    import anorm.{ SQL, SqlParser }
    import anorm.postgresql._
    
    SQL"SELECT json FROM test".as(SqlParser.scalar[JsObject].single)
  15. implicit val jsValueColumn: Column[JsValue]

    import play.api.libs.json.JsValue
    import anorm.{ SQL, SqlParser }
    import anorm.postgresql._
    
    SQL"SELECT json FROM test".as(SqlParser.scalar[JsValue].single)
  16. implicit def jsValueToStatement[J <: JsValue]: ToStatement[J]

    Allows to pass a JsValue as parameter to be stored as PGobject.

  17. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  18. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  19. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  20. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  21. def toString(): String
    Definition Classes
    AnyRef → Any
  22. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  23. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  24. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @throws( ... )
  25. implicit object JsObjectParameterMetaData extends ParameterMetaData[JsObject]
  26. implicit object JsValueParameterMetaData extends ParameterMetaData[JsValue]

Inherited from AnyRef

Inherited from Any

Ungrouped