Trait

anorm

PGJson

Related Doc: package anorm

Permalink

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

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. implicit object JsObjectParameterMetaData extends ParameterMetaData[JsObject]

    Permalink
  5. implicit object JsValueParameterMetaData extends ParameterMetaData[JsValue]

    Permalink
  6. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  7. def asJson[T](value: T)(implicit w: Writes[T]): ParameterValue

    Permalink

    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()
  8. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  9. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  10. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  11. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  12. def fromJson[T](implicit r: Reads[T]): Column[T]

    Permalink

    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)
  13. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  14. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  15. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  16. implicit val jsObjectColumn: Column[JsObject]

    Permalink

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

    Permalink

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

    Permalink

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

  19. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  20. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  21. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  22. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  23. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  24. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  25. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  26. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from AnyRef

Inherited from Any

Ungrouped