Packages

  • package root
    Definition Classes
    root
  • package skunk

    Skunk is a functional data access layer for Postgres.

    Skunk is a functional data access layer for Postgres.

    Design principles:

    • Skunk doesn't use JDBC. It speaks the Postgres wire protocol. It will not work with any other database back end.
    • Skunk is asynchronous all the way down, via cats-effect, fs2, and ultimately nio. The high-level network layers (Protocol and Session) are safe to use concurrently.
    • Serialization to and from schema types is not typeclass-based, so there are no implicit derivations. Codecs are explicit, like parser combinators.
    • I'm not sweating arity abstraction that much. Pass a ~ b ~ c for three args and Void if there are no args. This may change in the future but it's fine for now.
    • Skunk uses Resource for lifetime-managed objects, which means it takes some discipline to avoid leaks, especially when working concurrently. May or may not end up being problematic.
    • I'm trying to write good Scaladoc this time.

    A minimal example follows. We construct a Resource that yields a Session, then use it.

    package example
    
    import cats.effect._
    import skunk._
    import skunk.implicits._
    import skunk.codec.numeric._
    
    object Minimal extends IOApp {
    
      val session: Resource[IO, Session[IO]] =
        Session.single(
          host     = "localhost",
          port     = 5432,
          user     = "postgres",
          database = "world",
        )
    
      def run(args: List[String]): IO[ExitCode] =
        session.use { s =>
          for {
            n <- s.unique(sql"select 42".query(int4))
            _ <- IO(println(s"The answer is $n."))
          } yield ExitCode.Success
        }
    
    }

    Continue reading for an overview of the library. It's pretty small.

    Definition Classes
    root
  • package exception
    Definition Classes
    skunk
  • ColumnAlignmentException
  • DecodeException
  • NoDataException
  • PostgresErrorException
  • ProtocolError
  • SkunkException
  • StartupException
  • UnexpectedRowsException
  • UnknownOidException
  • UnknownTypeException
c

skunk.exception

UnknownOidException

case class UnknownOidException(query: Query[_, _], types: List[(Field, Option[Field])]) extends SkunkException with Product with Serializable

Source
UnknownOidException.scala
Linear Supertypes
Serializable, Product, Equals, SkunkException, NoStackTrace, Fields, Exception, Throwable, Serializable, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. UnknownOidException
  2. Serializable
  3. Product
  4. Equals
  5. SkunkException
  6. NoStackTrace
  7. Fields
  8. Exception
  9. Throwable
  10. Serializable
  11. AnyRef
  12. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new UnknownOidException(query: Query[_, _], types: List[(Field, Option[Field])])

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 addSuppressed(arg0: Throwable): Unit
    Definition Classes
    Throwable
  5. def args: String
    Attributes
    protected
    Definition Classes
    SkunkException
  6. val arguments: List[(Type, Option[String])]
    Definition Classes
    SkunkException
  7. val argumentsOrigin: Option[Origin]
    Definition Classes
    SkunkException
  8. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  9. val callSite: Option[CallSite]
    Definition Classes
    SkunkException
  10. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()
  11. val detail: Option[String]
    Definition Classes
    SkunkException
  12. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  13. def exchanges: String
    Attributes
    protected
    Definition Classes
    SkunkException
  14. def fields: Map[String, TraceValue]
    Definition Classes
    SkunkException → Fields
  15. def fillInStackTrace(): Throwable
    Definition Classes
    NoStackTrace → Throwable
  16. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  17. def getCause(): Throwable
    Definition Classes
    Throwable
  18. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  19. def getLocalizedMessage(): String
    Definition Classes
    Throwable
  20. def getMessage(): String
    Definition Classes
    Throwable
  21. def getStackTrace(): Array[StackTraceElement]
    Definition Classes
    Throwable
  22. final def getSuppressed(): Array[Throwable]
    Definition Classes
    Throwable
  23. def header: String
    Attributes
    protected
    Definition Classes
    SkunkException
  24. val hint: Option[String]
    Definition Classes
    SkunkException
  25. val history: List[Either[Any, Any]]
    Definition Classes
    SkunkException
  26. def initCause(arg0: Throwable): Throwable
    Definition Classes
    Throwable
  27. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  28. def labeled(label: String, s: String): String
    Definition Classes
    SkunkException
  29. val message: String
    Definition Classes
    SkunkException
  30. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  31. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  32. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  33. val position: Option[Int]
    Definition Classes
    SkunkException
  34. def printStackTrace(arg0: PrintWriter): Unit
    Definition Classes
    Throwable
  35. def printStackTrace(arg0: PrintStream): Unit
    Definition Classes
    Throwable
  36. def printStackTrace(): Unit
    Definition Classes
    Throwable
  37. val query: Query[_, _]
  38. def sections: List[String]
    Definition Classes
    UnknownOidExceptionSkunkException
  39. def setStackTrace(arg0: Array[StackTraceElement]): Unit
    Definition Classes
    Throwable
  40. val sql: Option[String]
    Definition Classes
    SkunkException
  41. val sqlOrigin: Option[Origin]
    Definition Classes
    SkunkException
  42. def statement: String
    Attributes
    protected
    Definition Classes
    SkunkException
  43. implicit def stringToText(s: String): Text
  44. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  45. def title: String
    Attributes
    protected
    Definition Classes
    SkunkException
  46. final def toString(): String
    Definition Classes
    SkunkException → Throwable → AnyRef → Any
  47. val types: List[(Field, Option[Field])]
  48. def unk(f: Field): Text
  49. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  50. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  51. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()
  52. def width: Int
    Attributes
    protected
    Definition Classes
    SkunkException

Inherited from Serializable

Inherited from Product

Inherited from Equals

Inherited from SkunkException

Inherited from NoStackTrace

Inherited from Fields

Inherited from Exception

Inherited from Throwable

Inherited from Serializable

Inherited from AnyRef

Inherited from Any

Ungrouped