Packages

  • package root
    Definition Classes
    root
  • package com
    Definition Classes
    root
  • package twitter

    Start with com.twitter.finagle.

    Definition Classes
    com
  • package finagle

    Finagle is an extensible RPC system.

    Finagle is an extensible RPC system.

    Services are represented by class com.twitter.finagle.Service. Clients make use of com.twitter.finagle.Service objects while servers implement them.

    Finagle contains a number of protocol implementations; each of these implement Client and/or com.twitter.finagle.Server. For example, Finagle's HTTP implementation, com.twitter.finagle.Http (in package finagle-http), exposes both.

    Thus a simple HTTP server is built like this:

    import com.twitter.finagle.{Http, Service}
    import com.twitter.finagle.http.{Request, Response}
    import com.twitter.util.{Await, Future}
    
    val service = new Service[Request, Response] {
      def apply(req: Request): Future[Response] =
        Future.value(Response())
    }
    val server = Http.server.serve(":8080", service)
    Await.ready(server)

    We first define a service to which requests are dispatched. In this case, the service returns immediately with a HTTP 200 OK response, and with no content.

    This service is then served via the Http protocol on TCP port 8080. Finally we wait for the server to stop serving.

    We can now query our web server:

    % curl -D - localhost:8080
    HTTP/1.1 200 OK

    Building an HTTP client is also simple. (Note that type annotations are added for illustration.)

    import com.twitter.finagle.{Http, Service}
    import com.twitter.finagle.http.{Request, Response}
    import com.twitter.util.{Future, Return, Throw}
    
    val client: Service[Request, Response] = Http.client.newService("localhost:8080")
    val f: Future[Response] = client(Request()).respond {
      case Return(rep) =>
        printf("Got HTTP response %s\n", rep)
      case Throw(exc) =>
        printf("Got error %s\n", exc)
    }

    Http.client.newService("localhost:8080") constructs a new com.twitter.finagle.Service instance connected to localhost TCP port 8080. We then issue a HTTP/1.1 GET request to URI "/". The service returns a com.twitter.util.Future representing the result of the operation. We listen to this future, printing an appropriate message when the response arrives.

    The Finagle homepage contains useful documentation and resources for using Finagle.

    Definition Classes
    twitter
  • package postgresql
    Definition Classes
    finagle
  • package types
    Definition Classes
    postgresql
  • Json
  • Kind
  • PgDate
  • PgNumeric
  • PgTime
  • PgType
  • ValueReads
  • ValueWrites

object PgType extends Serializable

Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. PgType
  2. Serializable
  3. AnyRef
  4. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

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. lazy val Aclitem: PgType

    access control list

  5. lazy val AclitemArray: PgType

    Array of aclitem

  6. lazy val Any: PgType

    pseudo-type representing any type

  7. lazy val AnyRange: PgType

    pseudo-type representing a range over a polymorphic base type

  8. lazy val Anyarray: PgType

    pseudo-type representing a polymorphic array type

  9. lazy val Anycompatible: PgType

    pseudo-type representing a polymorphic common type

  10. lazy val AnycompatibleRange: PgType

    pseudo-type representing a range over a polymorphic common type

  11. lazy val Anycompatiblearray: PgType

    pseudo-type representing an array of polymorphic common type elements

  12. lazy val Anycompatiblenonarray: PgType

    pseudo-type representing a polymorphic common type that is not an array

  13. lazy val Anyelement: PgType

    pseudo-type representing a polymorphic base type

  14. lazy val Anyenum: PgType

    pseudo-type representing a polymorphic base type that is an enum

  15. lazy val Anynonarray: PgType

    pseudo-type representing a polymorphic base type that is not an array

  16. lazy val Bit: PgType

    fixed-length bit string

  17. lazy val BitArray: PgType

    Array of bit

  18. lazy val Bool: PgType

    boolean, 'true'/'false'

  19. lazy val BoolArray: PgType

    Array of bool

  20. lazy val Box: PgType

    geometric box '(lower left,upper right)'

  21. lazy val BoxArray: PgType

    Array of box

  22. lazy val Bpchar: PgType

    char(length), blank-padded string, fixed storage length

  23. lazy val BpcharArray: PgType

    Array of bpchar

  24. lazy val Bytea: PgType

    variable-length string, binary values escaped

  25. lazy val ByteaArray: PgType

    Array of bytea

  26. lazy val Char: PgType

    single character

  27. lazy val CharArray: PgType

    Array of char

  28. lazy val Cid: PgType

    command identifier type, sequence in transaction id

  29. lazy val CidArray: PgType

    Array of cid

  30. lazy val Cidr: PgType

    network IP address/netmask, network address

  31. lazy val CidrArray: PgType

    Array of cidr

  32. lazy val Circle: PgType

    geometric circle '(center,radius)'

  33. lazy val CircleArray: PgType

    Array of circle

  34. lazy val Cstring: PgType

    C-style string

  35. lazy val CstringArray: PgType

    Array of cstring

  36. lazy val Date: PgType

    date

  37. lazy val DateArray: PgType

    Array of date

  38. lazy val DateRange: PgType

    range of dates

  39. lazy val DateRangeArray: PgType

    Array of daterange

  40. lazy val EventTrigger: PgType

    pseudo-type for the result of an event trigger function

  41. lazy val FdwHandler: PgType

    pseudo-type for the result of an FDW handler function

  42. lazy val Float4: PgType

    single-precision floating point number, 4-byte storage

  43. lazy val Float4Array: PgType

    Array of float4

  44. lazy val Float8: PgType

    double-precision floating point number, 8-byte storage

  45. lazy val Float8Array: PgType

    Array of float8

  46. lazy val GtsVector: PgType

    GiST index internal text representation for text search

  47. lazy val GtsVectorArray: PgType

    Array of gtsvector

  48. lazy val IndexAmHandler: PgType

    pseudo-type for the result of an index AM handler function

  49. lazy val Inet: PgType

    IP address/netmask, host address, netmask optional

  50. lazy val InetArray: PgType

    Array of inet

  51. lazy val Int2: PgType

    -32 thousand to 32 thousand, 2-byte storage

  52. lazy val Int2Array: PgType

    Array of int2

  53. lazy val Int2Vector: PgType

    array of int2, used in system tables

  54. lazy val Int2VectorArray: PgType

    Array of int2vector

  55. lazy val Int4: PgType

    -2 billion to 2 billion integer, 4-byte storage

  56. lazy val Int4Array: PgType

    Array of int4

  57. lazy val Int4Range: PgType

    range of integers

  58. lazy val Int4RangeArray: PgType

    Array of int4range

  59. lazy val Int8: PgType

    ~18 digit integer, 8-byte storage

  60. lazy val Int8Array: PgType

    Array of int8

  61. lazy val Int8Range: PgType

    range of bigints

  62. lazy val Int8RangeArray: PgType

    Array of int8range

  63. lazy val Internal: PgType

    pseudo-type representing an internal data structure

  64. lazy val Interval: PgType

    @ <number> <units>, time interval

  65. lazy val IntervalArray: PgType

    Array of interval

  66. lazy val Json: PgType

    JSON stored as text

  67. lazy val JsonArray: PgType

    Array of json

  68. lazy val Jsonb: PgType

    Binary JSON

  69. lazy val JsonbArray: PgType

    Array of jsonb

  70. lazy val Jsonpath: PgType

    JSON path

  71. lazy val JsonpathArray: PgType

    Array of jsonpath

  72. lazy val LanguageHandler: PgType

    pseudo-type for the result of a language handler function

  73. lazy val Line: PgType

    geometric line

  74. lazy val LineArray: PgType

    Array of line

  75. lazy val Lseg: PgType

    geometric line segment '(pt1,pt2)'

  76. lazy val LsegArray: PgType

    Array of lseg

  77. lazy val Macaddr: PgType

    XX:XX:XX:XX:XX:XX, MAC address

  78. lazy val Macaddr8: PgType

    XX:XX:XX:XX:XX:XX:XX:XX, MAC address

  79. lazy val Macaddr8Array: PgType

    Array of macaddr8

  80. lazy val MacaddrArray: PgType

    Array of macaddr

  81. lazy val Money: PgType

    monetary amounts, $d,ddd.cc

  82. lazy val MoneyArray: PgType

    Array of money

  83. lazy val Name: PgType

    63-byte type for storing system identifiers

  84. lazy val NameArray: PgType

    Array of name

  85. lazy val NumRange: PgType

    range of numerics

  86. lazy val NumRangeArray: PgType

    Array of numrange

  87. lazy val Numeric: PgType

    numeric(precision, decimal), arbitrary precision number

  88. lazy val NumericArray: PgType

    Array of numeric

  89. lazy val OidArray: PgType

    Array of oid

  90. lazy val OidType: PgType

    object identifier(oid), maximum 4 billion

  91. lazy val OidVector: PgType

    array of oids, used in system tables

  92. lazy val OidVectorArray: PgType

    Array of oidvector

  93. lazy val Path: PgType

    geometric path '(pt1,...)'

  94. lazy val PathArray: PgType

    Array of path

  95. lazy val PgAttribute: PgType

  96. lazy val PgAttributeArray: PgType

    Array of pg_attribute

  97. lazy val PgClass: PgType

  98. lazy val PgClassArray: PgType

    Array of pg_class

  99. lazy val PgDdlCommand: PgType

    internal type for passing CollectedCommand

  100. lazy val PgDependencies: PgType

    multivariate dependencies

  101. lazy val PgLsn: PgType

    PostgreSQL LSN datatype

  102. lazy val PgLsnArray: PgType

    Array of pg_lsn

  103. lazy val PgMcvList: PgType

    multivariate MCV list

  104. lazy val PgNdistinct: PgType

    multivariate ndistinct coefficients

  105. lazy val PgNodeTree: PgType

    string representing an internal node tree

  106. lazy val PgProc: PgType

  107. lazy val PgProcArray: PgType

    Array of pg_proc

  108. lazy val PgSnapshot: PgType

    snapshot

  109. lazy val PgSnapshotArray: PgType

    Array of pg_snapshot

  110. lazy val PgTypeArray: PgType

    Array of pg_type

  111. lazy val PgTypeType: PgType

  112. lazy val Point: PgType

    geometric point '(x, y)'

  113. lazy val PointArray: PgType

    Array of point

  114. lazy val Polygon: PgType

    geometric polygon '(pt1,...)'

  115. lazy val PolygonArray: PgType

    Array of polygon

  116. lazy val Record: PgType

    pseudo-type representing any composite type

  117. lazy val RecordArray: PgType

  118. lazy val Refcursor: PgType

    reference to cursor (portal name)

  119. lazy val RefcursorArray: PgType

    Array of refcursor

  120. lazy val Regclass: PgType

    registered class

  121. lazy val RegclassArray: PgType

    Array of regclass

  122. lazy val Regcollation: PgType

    registered collation

  123. lazy val RegcollationArray: PgType

    Array of regcollation

  124. lazy val Regconfig: PgType

    registered text search configuration

  125. lazy val RegconfigArray: PgType

    Array of regconfig

  126. lazy val Regdictionary: PgType

    registered text search dictionary

  127. lazy val RegdictionaryArray: PgType

    Array of regdictionary

  128. lazy val Regnamespace: PgType

    registered namespace

  129. lazy val RegnamespaceArray: PgType

    Array of regnamespace

  130. lazy val Regoper: PgType

    registered operator

  131. lazy val RegoperArray: PgType

    Array of regoper

  132. lazy val Regoperator: PgType

    registered operator (with args)

  133. lazy val RegoperatorArray: PgType

    Array of regoperator

  134. lazy val Regproc: PgType

    registered procedure

  135. lazy val RegprocArray: PgType

    Array of regproc

  136. lazy val Regprocedure: PgType

    registered procedure (with args)

  137. lazy val RegprocedureArray: PgType

    Array of regprocedure

  138. lazy val Regrole: PgType

    registered role

  139. lazy val RegroleArray: PgType

    Array of regrole

  140. lazy val Regtype: PgType

    registered type

  141. lazy val RegtypeArray: PgType

    Array of regtype

  142. lazy val TableAmHandler: PgType

  143. lazy val Text: PgType

    variable-length string, no limit specified

  144. lazy val TextArray: PgType

    Array of text

  145. lazy val Tid: PgType

    (block, offset), physical location of tuple

  146. lazy val TidArray: PgType

    Array of tid

  147. lazy val Time: PgType

    time of day

  148. lazy val TimeArray: PgType

    Array of time

  149. lazy val Timestamp: PgType

    date and time

  150. lazy val TimestampArray: PgType

    Array of timestamp

  151. lazy val Timestamptz: PgType

    date and time with time zone

  152. lazy val TimestamptzArray: PgType

    Array of timestamptz

  153. lazy val Timetz: PgType

    time of day with time zone

  154. lazy val TimetzArray: PgType

    Array of timetz

  155. lazy val Trigger: PgType

    pseudo-type for the result of a trigger function

  156. lazy val TsRange: PgType

    range of timestamps without time zone

  157. lazy val TsRangeArray: PgType

    Array of tsrange

  158. lazy val TsVector: PgType

    text representation for text search

  159. lazy val TsVectorArray: PgType

    Array of tsvector

  160. lazy val TsmHandler: PgType

    pseudo-type for the result of a tablesample method function

  161. lazy val Tsquery: PgType

    query representation for text search

  162. lazy val TsqueryArray: PgType

    Array of tsquery

  163. lazy val TstzRange: PgType

    range of timestamps with time zone

  164. lazy val TstzRangeArray: PgType

    Array of tstzrange

  165. lazy val TxidSnapshot: PgType

    txid snapshot

  166. lazy val TxidSnapshotArray: PgType

    Array of txid_snapshot

  167. lazy val Unknown: PgType

    pseudo-type representing an undetermined type

  168. lazy val Uuid: PgType

    UUID datatype

  169. lazy val UuidArray: PgType

    Array of uuid

  170. lazy val Varbit: PgType

    variable-length bit string

  171. lazy val VarbitArray: PgType

    Array of varbit

  172. lazy val Varchar: PgType

    varchar(length), non-blank-padded string, variable storage length

  173. lazy val VarcharArray: PgType

    Array of varchar

  174. lazy val Void: PgType

    pseudo-type for the result of a function with no real result

  175. lazy val Xid: PgType

    transaction id

  176. lazy val Xid8: PgType

    full transaction id

  177. lazy val Xid8Array: PgType

    Array of xid8

  178. lazy val XidArray: PgType

    Array of xid

  179. lazy val Xml: PgType

    XML content

  180. lazy val XmlArray: PgType

    Array of xml

  181. def arrayOf(elementType: PgType): Option[PgType]

    Find the corresponding one-dimensional array type for the specified element type.

    Find the corresponding one-dimensional array type for the specified element type.

    For example, passing PgType.Int4 to this function would return Some(PgType.Int4Vector).

    returns

    the corresponding array type, None if no such type exists.

  182. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  183. def byOid(oid: Oid): Option[PgType]

    Lookup a type by its Oid.

    Lookup a type by its Oid.

    returns

    Some if such a type exists, None otherwise.

  184. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native()
  185. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  186. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  187. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable])
  188. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  189. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  190. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  191. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  192. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  193. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  194. val pgArrayOidByElementType: Map[PgType, PgType]
  195. val pgTypeByOid: Map[Oid, PgType]
  196. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  197. def toString(): String
    Definition Classes
    AnyRef → Any
  198. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  199. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  200. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()

Inherited from Serializable

Inherited from AnyRef

Inherited from Any

Ungrouped