Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Fixed format and typos #36

Merged
merged 1 commit into from
Dec 3, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions src/main/scala/doobie/ConnectingToDatabaseSection.scala
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ import org.scalatest._
* import cats.implicits._
* }}}
*
* n the doobie high level API the most common types we will deal with have the form `ConnectionIO[A]`,
* In the doobie high level API the most common types we will deal with have the form `ConnectionIO[A]`,
* specifying computations that take place in a context where a `java.sql.Connection` is available,
* ultimately producing a value of type `A`.
*
Expand All @@ -59,12 +59,12 @@ import org.scalatest._
* This is a perfectly respectable doobie program, but we can’t run it as-is; we need a `Connection`
* first. There are several ways to do this, but here let’s use a `Transactor`.
*
* > Note: DriverManagerTransactors have the advantage of no connection pooling and configuration, so
* > are perfect for testing. The main disadvantage is that it is slower than pooling connection managers,
* > no provides upper bound for concurrent connections and executes blocking operations in an unbounded
* > pool of threads. The `doobie-hikari` add-on provides a `Transactor` implementation backed by a HikariCP
* > connection pool. The connection pool is a lifetime-managed object that must be shut down cleanly, so
* > it is managed as a Resource.
* '''Note''': DriverManagerTransactors have the advantage of no connection pooling and configuration, so
* are perfect for testing. The main disadvantage is that it is slower than pooling connection managers,
* no provides upper bound for concurrent connections and executes blocking operations in an unbounded
* pool of threads. The `doobie-hikari` add-on provides a `Transactor` implementation backed by a HikariCP
* connection pool. The connection pool is a lifetime-managed object that must be shut down cleanly, so
* it is managed as a Resource.
*
* {{{
* import doobie.hikari._
Expand Down
9 changes: 5 additions & 4 deletions src/main/scala/doobie/ErrorHandlingSection.scala
Original file line number Diff line number Diff line change
Expand Up @@ -25,17 +25,18 @@ import org.scalatest.{FlatSpec, Matchers}
*
* There are three main types of exceptions that are likely to arise:
*
* 1. Various types of `IOException` can happen with any kind of I/O, and these exceptions tend to be unrecoverable.
* '''1.''' Various types of `IOException` can happen with any kind of I/O, and these exceptions tend to be
* unrecoverable.
*
* 2. Database exceptions, typically as a generic `SQLException` with a vendor-specific `SQLState` identifying the
* '''2.''' Database exceptions, typically as a generic `SQLException` with a vendor-specific `SQLState` identifying the
* specific error, are raised for common situations such as key violations. Some vendors (PostgreSQL for instance)
* publish a table of error codes, and in these cases doobie can provide a matching set of exception-handling
* combinators. However in most cases the error codes must be passed down as folklore or discovered by
* experimentation. There exist the XOPEN and SQL:2003 standards, but it seems that no vendor adheres closely to
* these specifications. Some of these errors are recoverable and others aren’t.
*
* 3. doobie will raise an `InvariantViolation` in response to invalid type mappings, unknown JDBC constants returned
* by drivers, observed `NULL` values, and other violations of invariants that doobie assumes. These exceptions
* '''3.''' doobie will raise an `InvariantViolation` in response to invalid type mappings, unknown JDBC constants
* returned by drivers, observed `NULL` values, and other violations of invariants that doobie assumes. These exceptions
* indicate programmer error or driver non-compliance and are generally unrecoverable.
*
* ==MonadError and Derived Combinators==
Expand Down