Skip to content

Commit e6c7acc

Browse files
committed
Refine Live Queries docs
1 parent 3081e3e commit e6c7acc

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

site/capabilities/live-queries.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,6 @@ You get back a *live view* of your query — in realtime.
1313
Live queries are a first-class concept in LinkedQL.
1414
They happen over the same `client.query()` API.
1515

16-
The `client.query()` method simply additionally supports an `options.live` parameter for `SELECT` queries:
17-
1816
```js
1917
const result = await client.query(`SELECT * FROM posts`, { live: true });
2018
```
@@ -28,7 +26,7 @@ console.table(result.rows);
2826
console.log(result.rows.length); // 4
2927
```
3028

31-
…but live:
29+
…but live and in sync with the underlying database tables:
3230

3331
```sql
3432
INSERT INTO posts (title) VALUES ('Post A');
@@ -39,7 +37,7 @@ console.table(result.rows);
3937
console.log(result.rows.length); // 5
4038
```
4139

42-
`result.rows` will grow, shrink, and mutate to reflect the latest truth of the query as changes happen to the underlying database. This applies to any SQL query — joins, aggregates, subqueries, even derived tables.
40+
`result.rows` will grow, shrink, and mutate to reflect the latest truth of the query as changes happen to the underlying database. This holds even with joins, aggregates, subqueries, derived tables, etc.
4341

4442
Live mode can be stopped explicitly:
4543

0 commit comments

Comments
 (0)