Skip to content

Commit

Permalink
Merge pull request #184 from planetscale/nickvanw/boost-docs
Browse files Browse the repository at this point in the history
README: remove extra docs
  • Loading branch information
nickvanw authored Oct 29, 2024
2 parents e794dd5 + da881b8 commit f62005c
Showing 1 changed file with 0 additions and 17 deletions.
17 changes: 0 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,23 +82,6 @@ const results = await conn.transaction(async (tx) => {
console.log(results)
```

### Usage with PlanetScale Boost

To enable PlanetScale Boost, run `SET @@boost_cached_queries = true` once. All subsequent queries run on the same connection will use boost if it's enabled for the query pattern. Non-matching queries will run as normal.

To learn more, visit: [Query caching with PlanetScale Boost](https://planetscale.com/docs/concepts/query-caching-with-planetscale-boost)

```ts
const conn = client.connection()
// Enable boost for the connection
await conn.execute('SET @@boost_cached_queries = true')

const results = await conn.execute('...')

// Optionally, you may disable boost for the connection by setting to false
await conn.execute('SET @@boost_cached_queries = false')
```

### Custom fetch function

Node.js version 18 includes a built-in global `fetch` function. When using an older version of Node.js, you can provide a custom fetch function implementation. We recommend the [`undici`][1] package on which Node's built-in fetch is based.
Expand Down

0 comments on commit f62005c

Please sign in to comment.