From 0cf4ccce863379ecd0f5ad62ff9386a9fa3c26d6 Mon Sep 17 00:00:00 2001 From: Mike Coutermarsh Date: Wed, 2 Aug 2023 09:56:39 -0400 Subject: [PATCH] Update README.md --- README.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index bb3dd37..6ca6b37 100644 --- a/README.md +++ b/README.md @@ -86,16 +86,17 @@ To enable PlanetScale Boost, run `SET @@boost_cached_queries = true` once. All s 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') -// Disable boost for the connection +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.