object Session
- Source
- Session.scala
- Grouped
- Alphabetic
- By Inheritance
- Session
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Type Members
- implicit class SessionSyntax[F[_]] extends AnyRef
- implicit class SignalOps[F[_], A] extends AnyRef
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
- val DefaultConnectionParameters: Map[String, String]
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable])
- def fromProtocol[F[_]](proto: Protocol[F], namer: Namer[F], strategy: util.Typer.Strategy)(implicit ev: MonadCancel[F, Throwable]): F[Session[F]]
Construct a
Session
by wrapping an existingProtocol
, which we assume has already been started up. - def fromSocketGroup[F[_]](socketGroup: SocketGroup[F], host: String, port: Int = 5432, user: String, database: String, password: Option[String] = none, debug: Boolean = false, strategy: util.Typer.Strategy = Typer.Strategy.BuiltinsOnly, sslOptions: Option[Options[F]], parameters: Map[String, String])(implicit arg0: Concurrent[F], arg1: Trace[F], arg2: Console[F]): Resource[F, Session[F]]
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- 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()
- def pooled[F[_]](host: String, port: Int = 5432, user: String, database: String, password: Option[String] = none, max: Int, debug: Boolean = false, strategy: util.Typer.Strategy = Typer.Strategy.BuiltinsOnly, ssl: SSL = SSL.None, parameters: Map[String, String] = Session.DefaultConnectionParameters)(implicit arg0: Concurrent[F], arg1: Trace[F], arg2: Network[F], arg3: Console[F]): Resource[F, Resource[F, Session[F]]]
Resource yielding a
SessionPool
managing up tomax
concurrentSession
s.Resource yielding a
SessionPool
managing up tomax
concurrentSession
s. Typically you willuse
this resource once on application startup and pass the resultingResource[F, Session[F]]
to the rest of your program.Note that calling
.flatten
on the nestedResource
returned by this method may seem reasonable, but it will result in a resource that allocates a new pool for each session, which is probably not what you want.- host
Postgres server host
- port
Postgres port, default 5432
- user
Postgres user
- database
Postgres database
- max
Maximum concurrent sessions
- def single[F[_]](host: String, port: Int = 5432, user: String, database: String, password: Option[String] = none, debug: Boolean = false, strategy: util.Typer.Strategy = Typer.Strategy.BuiltinsOnly, ssl: SSL = SSL.None, parameters: Map[String, String] = Session.DefaultConnectionParameters)(implicit arg0: Concurrent[F], arg1: Trace[F], arg2: Network[F], arg3: Console[F]): Resource[F, Session[F]]
Resource yielding logically unpooled sessions.
Resource yielding logically unpooled sessions. This can be convenient for demonstrations and programs that only need a single session. In reality each session is managed by its own single-session pool. This method is shorthand for
Session.pooled(..., max = 1, ...).flatten
.- See also
pooled
- 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(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- object Recyclers