Skip to content

Commit fabafac

Browse files
kriszypcb1kenobi
andauthored
Update docs/developers/applications/README.md
Co-authored-by: Chris Barber <[email protected]>
1 parent 5b29f88 commit fabafac

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

docs/developers/applications/README.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,13 @@ type Breed @table {
273273
}
274274
```
275275

276-
And next we will use this table in our `get()` method. We will call the new table's (static) `get()` method to retrieve a breed by id. Harper will maintain the current context, ensuring that we are accessing the data atomically, in a consistent snapshot across tables. This provides automatic tracking of most recently updated timestamps across resources for caching purposes. This allows for sharing of contextual metadata (like user who requested the data), and ensure transactional atomicity for any writes (not needed in this get operation, but important for other operations). The resource methods are automatically wrapped with a transaction (will commit/finish when the method completes), and this allows us to fully utilize multiple resources in our current transaction. With our own snapshot of the database for the Dog and Breed table we can then access data like this:
276+
We use the new table's (static) `get()` method to retrieve a breed by id. Harper will maintain the current context, ensuring that we are accessing the data atomically, in a consistent snapshot across tables. This provides:
277+
278+
1. Automatic tracking of most recently updated timestamps across resources for caching purposes
279+
2. Sharing of contextual metadata (like user who requested the data)
280+
3. Transactional atomicity for any writes (not needed in this get operation, but important for other operations)
281+
282+
The resource methods are automatically wrapped with a transaction and will automatically commit the changes when the method finishes. This allows us to fully utilize multiple resources in our current transaction. With our own snapshot of the database for the Dog and Breed table we can then access data like this:
277283

278284
```javascript
279285
//resource.js:

0 commit comments

Comments
 (0)