Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Enhance instructions #128

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading