Skip to content

Commit

Permalink
Add Enhance instructions
Browse files Browse the repository at this point in the history
Signed-off-by: macdonst <[email protected]>
  • Loading branch information
macdonst committed May 21, 2024
1 parent 818aaa5 commit 137dbb1
Showing 1 changed file with 22 additions and 1 deletion.
23 changes: 22 additions & 1 deletion readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,27 @@ Resources:
> Note: projects not based on [Architect](https://arc.codes) will need a `BEGIN_DATA_TABLE_NAME` environment variable. You can also use this env var to override and name the table anything you want. This also allows for multiple apps to share a single table.

## Usage alongside Enhance

The plugin `@enhance/arc-plugin-enhance` includes `@begin/data` by default so if you are converting an Architect project to an Enhance project you can remove the tables pragma from your app.arc file.

Example `app.arc`:

```
@app
myapp
@plugins
enhance/arc-plugin-enhance
# The following lines are safe to delete
# @tables
# data
# scopeID *String
# dataID **String
# ttl TTL
```

### API

```javascript
Expand Down Expand Up @@ -152,7 +173,7 @@ In this case use the `for await` syntax with a limit set to get paginated data.

```javascript
let pages = data.page({ table:'ppl', limit:25 })
let count = 0
let count = 0
for await (let page of pages) {
console.log(page)
count++
Expand Down

0 comments on commit 137dbb1

Please sign in to comment.