Skip to content

Commit b7db15e

Browse files
committed
chore: Move doc from README to Getting Started guide
1 parent 484cc24 commit b7db15e

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

guides/introduction/Getting Started.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ To use EctoWatch, you need to add it to your supervision tree and specify watche
2020

2121
This will setup:
2222

23-
* triggers in PostgreSQL during application startup
24-
* an Elixir process for each watcher which listens for notifications and broadcasts them via `Phoenix.PubSub`
23+
* triggers in PostgreSQL during application startup
24+
* an Elixir process for each watcher which listens for notifications and broadcasts them via `Phoenix.PubSub`
2525

2626
Then any process (e.g. a GenServer, a LiveView, a Phoenix channel, etc...) can subscribe to messages like so:
2727

@@ -43,6 +43,8 @@ You can also subscribe to individual records:
4343
EctoWatch.subscribe({User, :deleted}, user.id)
4444
```
4545

46+
**NOTE:** you can't subscribe to the `:inserted` event for specific objects because the primary key's value which you would use to subscribe doesn't exist until the insert happens.
47+
4648
... OR you can subscribe to records by an association column (but the given column must be in the `extra_columns` list for the watcher! See below for more info on the `extra_columns` option):
4749

4850
```elixir
@@ -73,4 +75,3 @@ Once subscribed, messages can be handled like so (LiveView example are given her
7375
{:noreply, socket}
7476
end
7577
```
76-

0 commit comments

Comments
 (0)