sealed trait PGJson extends AnyRef
Linear Supertypes
Ordering
- Alphabetic
- By Inheritance
Inherited
- PGJson
- AnyRef
- Any
- Hide All
- Show All
Visibility
- Public
- All
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
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()
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
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)
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
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)
-
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)
-
implicit
def
jsValueToStatement[J <: JsValue]: ToStatement[J]
Allows to pass a
JsValue
as parameter to be stored asPGobject
. -
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()
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
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
- @native() @throws( ... )
- implicit object JsObjectParameterMetaData extends ParameterMetaData[JsObject]
- implicit object JsValueParameterMetaData extends ParameterMetaData[JsValue]