Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

docs - use 4 spaces instead of 2 for sub-lists #1293

Merged
merged 1 commit into from
Oct 20, 2020
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
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