Skip to content

Commit

Permalink
Chore: minor edits in readme
Browse files Browse the repository at this point in the history
  • Loading branch information
mindreframer committed Nov 10, 2023
1 parent f8eb07c commit 7ea6a96
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,16 @@ Surrealix.query(pid, "SELECT * FROM type::table($table);", %{table: "person"})

```elixir
## Example with live query callbacks
Surrealix.live_query(pid, "LIVE SELECT * FROM user;", fn event, data, config ->
Surrealix.live_query(pid, "LIVE DIFF SELECT * FROM user;", fn event, data, config ->
IO.inspect({event, data, config}, label: "callback")
end)

## Example with live query with DIFF
Surrealix.live_query(pid, "LIVE SELECT DIFF FROM user;", fn event, data, config ->
IO.inspect({event, data, config}, label: "callback")
end)


# inspect currently registered live queries
Surrealix.all_live_queries(pid)
```
Expand Down Expand Up @@ -108,7 +114,6 @@ Code foundation was taken from https://github.com/joojscript/surrealdb_ex. Since
- [x] debug modus with verbose logging
- [x] integration tests
- [ ] handle disconnects gracefully
- [ ] benchmarks


## Support
Expand Down

0 comments on commit 7ea6a96

Please sign in to comment.