Package

com.datasift.dropwizard.scala

jdbi

Permalink

package jdbi

Global definitions and implicits for JDBI.

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. jdbi
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Type Members

  1. class HandleDaoWrapper[A] extends AnyRef

    Permalink
  2. class HandleWrapper extends AnyRef

    Permalink

    Provides idiomatic Scala enhancements to the JDBI API.

  3. class JDBITransactionWrapper extends AnyRef

    Permalink

    Provides for-comprehension support for composable transactions

  4. class JDBIWrapper extends AnyRef

    Permalink

    Provides idiomatic Scala enhancements to the JDBI API.

    Provides idiomatic Scala enhancements to the JDBI API.

    Examples -

    dbi.open[DAO] to open a handle and attach a new sql object of the specified type to that handle

    dbi.daoFor[DAO] to create a new sql object which will obtain and release connections from this dbi instance, as it needs to, and can, respectively

    When in scope, you can create transactions using for comprehension. For instance -

     for { handle <- dbi.transaction
          dao1   <- handle.attachable[Dao1]
           ...
          daoN   <- handle.attachable[DaoN] } yield {
    
          dao1.some_function()
          ...
          daoN.some_other_function()
    }
  5. class SimpleMapper[A] extends ResultSetMapper[A]

    Permalink

    A simple mapper that only depends on the result set

    A simple mapper that only depends on the result set

    Example - SimpleMapper[(String, String)](r => (r.getString("firstname"), r.getString("lastname")))

    If you used with ResultSetDSL the above example can be further simplified - SimpleMapper[(String, String)](r => (r -> "firstname", r -> "lastname"))

  6. class TransactionalWrapper[A <: Transactional[A]] extends AnyRef

    Permalink

    Provides enhancements to the Dropwizard jDBI API for transactional DAOs.

Value Members

  1. implicit final def HandleWrapper(handle: Handle): HandleWrapper

    Permalink
  2. object JDBI

    Permalink

    Factory object for org.skife.jdbi.v2.DBI instances.

  3. implicit final def JDBIWrapper(db: DBI): JDBIWrapper

    Permalink
  4. object ResultSetDSL

    Permalink

    Define some implicits to allow a more concise DSL using Tuples for extracting results from an SQL result set.

  5. implicit final def TransactionalWrapper[A <: Transactional[A]](transactional: A): TransactionalWrapper[A]

    Permalink
  6. package tweak

    Permalink

Inherited from AnyRef

Inherited from Any

Ungrouped