Skip to content

Commit

Permalink
docs - use 4 spaces instead of 2 for sub-lists
Browse files Browse the repository at this point in the history
  • Loading branch information
LLCampos authored and Daenyth committed Oct 20, 2020
1 parent 5ae20d6 commit 45dc54b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions modules/docs/src/main/mdoc/docs/04-Selecting.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,10 @@ Let's break this down a bit.

- `sql"select name from country".query[String]` defines a `Query0[String]`, which is a one-column query that maps each returned row to a `String`. We will get to more interesting row types soon.
- `.to[List]` is a convenience method that accumulates rows into a `List`, in this case yielding a `ConnectionIO[List[String]]`. It works with any collection type that has a `CanBuildFrom`. Similar methods are:
- `.unique` which returns a single value, raising an exception if there is not exactly one row returned.
- `.option` which returns an `Option`, raising an exception if there is more than one row returned.
- `.nel` which returns an `NonEmptyList`, raising an exception if there are no rows returned.
- See the Scaladoc for `Query0` for more information on these and other methods.
- `.unique` which returns a single value, raising an exception if there is not exactly one row returned.
- `.option` which returns an `Option`, raising an exception if there is more than one row returned.
- `.nel` which returns an `NonEmptyList`, raising an exception if there are no rows returned.
- See the Scaladoc for `Query0` for more information on these and other methods.
- The rest is familar; `transact(xa)` yields a `IO[List[String]]` which we run, giving us a normal Scala `List[String]` that we print out.

### Internal Streaming
Expand Down
4 changes: 2 additions & 2 deletions modules/docs/src/main/mdoc/docs/14-Managing-Connections.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ A `Transactor[M]` consists of the following bits of information:
Given this information a `Transactor[M]` can provide the following transformations:

- `trans: ConnectionIO ~> M` A natural transformation of a program in `ConnectionIO` to the target monad `M` that uses the given `Strategy` to wrap the given program with additional setup, error-handling and cleanup operations. This yields an independent program in `M`. This is the most common way to run a doobie program.
- e.g., `xa.trans.apply(program1)`
- you can also use the syntax `program1.transact(xa)`, which runs `xa.trans` under the hood
- e.g., `xa.trans.apply(program1)`
- you can also use the syntax `program1.transact(xa)`, which runs `xa.trans` under the hood
- `rawTrans` natural transformation equivalent to `trans` but one that does not use the provided `Strategy` to wrap the given program with additional operations. This can be useful in cases where transactional handling is unsupported or undesired.
- `rawTransP: Stream[ConnectionIO, ?] ~> Stream[M, ?]` equivalent to `rawTrans` but expressed using `Stream`.
- `transP: Stream[ConnectionIO, ?] ~> Stream[M, ?]` equivalent to `trans` but expressed using `Stream`.
Expand Down

0 comments on commit 45dc54b

Please sign in to comment.