Skip to content

Commit ef06a84

Browse files
committed
Correct docs
1 parent 93159b5 commit ef06a84

1 file changed

Lines changed: 5 additions & 7 deletions

File tree

README.md

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -35,15 +35,14 @@ pub fn start_application_supervisor(pool_name: process.Name(pog.Message)) {
3535
}
3636
```
3737

38-
Then in your application you can use a subject created from that name to make
39-
queries:
38+
Then in your application you can use a connection created from that name with
39+
the `pog.named_connection` to make queries:
4040

4141
```gleam
4242
import pog
4343
import gleam/dynamic/decode
44-
import gleam/erlang/process.{type Subject}
4544
46-
pub fn run(db: Subject(pog.Message)) {
45+
pub fn run(db: pog.Connection) {
4746
// An SQL statement to run. It takes one int as a parameter
4847
let sql_query = "
4948
select
@@ -94,9 +93,8 @@ import envoy
9493
import gleam/erlang/process.{type Name}
9594
import pog
9695
97-
/// Read the DATABASE_URL environment variable.
98-
/// Generate the pog.Config from that database URL.
99-
/// Finally, connect to database.
96+
/// Read the DATABASE_URL environment variable and then
97+
/// build the pog.Config from that database URL.
10098
pub fn read_connection_uri(name: Name(pog.Message)) -> Result(pog.Config, Nil) {
10199
use database_url <- result.try(envoy.get("DATABASE_URL"))
102100
pog.url_config(name, database_url)

0 commit comments

Comments
 (0)