Skip to content

Commit d126e0e

Browse files
committed
more redirects fixes
1 parent 4649fa1 commit d126e0e

File tree

6 files changed

+24
-33
lines changed

6 files changed

+24
-33
lines changed

public/__redirects

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1563,7 +1563,7 @@
15631563
# hyperdrive
15641564

15651565
/hyperdrive/learning/how-hyperdrive-works/ /hyperdrive/configuration/how-hyperdrive-works/ 301
1566-
/hyperdrive/learning/connect-to-postgres/ /hyperdrive/configuration/connect-to-postgres/ 301
1566+
/hyperdrive/learning/connect-to-postgres/ /hyperdrive/examples/connect-to-postgres/ 301
15671567
/hyperdrive/learning/query-caching/ /hyperdrive/configuration/query-caching/ 301
15681568
/hyperdrive/learning/troubleshooting/ /hyperdrive/reference/troubleshooting/ 301
15691569
/hyperdrive/changelog/ /hyperdrive/platform/release-notes/ 301

src/content/docs/hyperdrive/configuration/connect-to-private-database.mdx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ If your organization also uses [Super Bot Fight Mode](/bots/get-started/pro/), k
3333

3434
## Prerequisites
3535

36-
- A database in your private network, [configured to use TLS/SSL](/hyperdrive/configuration/connect-to-postgres/#supported-tls-ssl-modes).
36+
- A database in your private network, [configured to use TLS/SSL](/hyperdrive/examples/connect-to-postgres/#supported-tls-ssl-modes).
3737
- A hostname on your Cloudflare account, which will be used to route requests to your database.
3838

3939
## 1. Create a tunnel in your private network
@@ -224,7 +224,6 @@ npx wrangler deploy
224224

225225
If you successfully receive the list of tables from your database when you access your deployed Worker, your Hyperdrive has now been configured to securely connect to a private database using [Cloudflare Tunnel](/cloudflare-one/connections/connect-networks/) and [Cloudflare Access](/cloudflare-one/policies/access/).
226226

227-
228227
</TabItem>
229228
</Tabs>
230229

src/content/docs/hyperdrive/configuration/query-caching.mdx

Lines changed: 11 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -18,24 +18,14 @@ Besides determining the difference between a `SELECT` and an `INSERT`, Hyperdriv
1818
For example, a read query that populates the front page of a news site would be cached:
1919

2020
<Tabs>
21-
<TabItem label="PostgreSQL">
22-
```sql
23-
-- Cacheable
24-
SELECT * FROM articles
25-
WHERE DATE(published_time) = CURRENT_DATE()
26-
ORDER BY published_time DESC
27-
LIMIT 50
28-
```
29-
</TabItem>
30-
<TabItem label="MySQL">
31-
```sql
32-
-- Cacheable
33-
SELECT * FROM articles
34-
WHERE DATE(published_time) = CURDATE()
35-
ORDER BY published_time DESC
36-
LIMIT 50
37-
```
38-
</TabItem>
21+
<TabItem label="PostgreSQL">
22+
```sql -- Cacheable SELECT * FROM articles WHERE DATE(published_time) =
23+
CURRENT_DATE() ORDER BY published_time DESC LIMIT 50 ```
24+
</TabItem>
25+
<TabItem label="MySQL">
26+
```sql -- Cacheable SELECT * FROM articles WHERE DATE(published_time) =
27+
CURDATE() ORDER BY published_time DESC LIMIT 50 ```
28+
</TabItem>
3929
</Tabs>
4030
4131
Mutating queries (including `INSERT`, `UPSERT`, or `CREATE TABLE`) and queries that use [functions designated as `volatile` by PostgreSQL](https://www.postgresql.org/docs/current/xfunc-volatility.html) are not cached:
@@ -48,6 +38,7 @@ Mutating queries (including `INSERT`, `UPSERT`, or `CREATE TABLE`) and queries t
4838

4939
SELECT LASTVAL(), * FROM articles LIMIT 50;
5040
```
41+
5142
</TabItem>
5243
<TabItem label="MySQL">
5344
```sql
@@ -56,6 +47,7 @@ Mutating queries (including `INSERT`, `UPSERT`, or `CREATE TABLE`) and queries t
5647

5748
SELECT LAST_INSERT_ID(), * FROM articles LIMIT 50;
5849
```
50+
5951
</TabItem>
6052
</Tabs>
6153

@@ -161,5 +153,5 @@ const connectionNoCache = createConnection({
161153
## Next steps
162154

163155
- Learn more about [How Hyperdrive works](/hyperdrive/configuration/how-hyperdrive-works/).
164-
- Learn how to [Connect to PostgreSQL](/hyperdrive/configuration/connect-to-postgres/) from Hyperdrive.
156+
- Learn how to [Connect to PostgreSQL](/hyperdrive/examples/connect-to-postgres/) from Hyperdrive.
165157
- Review [Troubleshooting common issues](/hyperdrive/observability/troubleshooting/) when connecting a database to Hyperdrive.

src/content/docs/hyperdrive/reference/supported-databases-and-features.mdx

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,14 @@ Details on which database engines and/or specific database providers are support
2020

2121
The following is a non-exhaustive list of database providers:
2222

23-
| Database Engine | Supported | Known supported versions | Details |
24-
| --------------- | --------- | ------------------------ | ---------------------------------------------------------------------------------------------------- |
25-
| Neon || All | Neon currently runs Postgres 15.x |
26-
| Supabase || All | Supabase currently runs Postgres 15.x |
27-
| Timescale || All | See the [Timescale guide](/hyperdrive/examples/timescale/) to connect. |
28-
| Materialize || All | Postgres-compatible. Refer to the [Materialize guide](/hyperdrive/examples/materialize/) to connect. |
29-
| CockroachDB || All | Postgres-compatible. Refer to the [CockroachDB](/hyperdrive/examples/cockroachdb/) guide to connect. |
30-
| Planetscale || All | Planetscale currently runs MySQL 8.x |
23+
| Database Engine | Supported | Known supported versions | Details |
24+
| --------------- | --------- | ------------------------ | ------------------------------------------------------------------------------------------------------------------------ |
25+
| Neon || All | Neon currently runs Postgres 15.x |
26+
| Supabase || All | Supabase currently runs Postgres 15.x |
27+
| Timescale || All | See the [Timescale guide](/hyperdrive/examples/timescale/) to connect. |
28+
| Materialize || All | Postgres-compatible. Refer to the [Materialize guide](/hyperdrive/examples/materialize/) to connect. |
29+
| CockroachDB || All | Postgres-compatible. Refer to the [CockroachDB](/hyperdrive/examples/connect-to-postgres/cockroachdb/) guide to connect. |
30+
| Planetscale || All | Planetscale currently runs MySQL 8.x |
3131

3232
## Supported PostgreSQL authentication modes
3333

src/content/release-notes/hyperdrive.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ entries:
5252
description: |-
5353
The popular `pg` ([node-postgres](https://github.com/brianc/node-postgres) driver no longer requires the legacy `node_compat` mode, and can now be used in both Workers and Pages for connecting to Hyperdrive. This uses the new (improved) Node.js compatibility in Workers and Pages.
5454
55-
You can set [`compatibility_flags = ["nodejs_compat_v2"]`](/workers/runtime-apis/nodejs/) in your `wrangler.toml` or via the Pages dashboard to benefit from this change. Visit the [Hyperdrive documentation on supported drivers](/hyperdrive/configuration/connect-to-postgres/#supported-drivers) to learn more about the driver versions supported by Hyperdrive.
55+
You can set [`compatibility_flags = ["nodejs_compat_v2"]`](/workers/runtime-apis/nodejs/) in your `wrangler.toml` or via the Pages dashboard to benefit from this change. Visit the [Hyperdrive documentation on supported drivers](/hyperdrive/examples/connect-to-postgres/#supported-drivers) to learn more about the driver versions supported by Hyperdrive.
5656
- publish_date: "2024-08-19"
5757
title: Improved caching for Postgres.js
5858
description: |-
@@ -74,7 +74,7 @@ entries:
7474
7575
Developers who had previously set `prepare: false` can remove this configuration when establishing a new Postgres.js client instance.
7676
77-
Read the [documentation on supported drivers](/hyperdrive/configuration/connect-to-postgres/#supported-drivers) to learn more about database driver interoperability with Hyperdrive.
77+
Read the [documentation on supported drivers](/hyperdrive/examples/connect-to-postgres/#supported-drivers) to learn more about database driver interoperability with Hyperdrive.
7878
- publish_date: "2024-04-01"
7979
title: Hyperdrive is now Generally Available
8080
description: |-

src/content/release-notes/workers.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@ entries:
243243
description: |-
244244
- The [new `connect()` method](/workers/runtime-apis/tcp-sockets/) allows you to connect to any TCP-speaking services directly from your Workers. To learn more about other protocols supported on the Workers platform, visit the [new Protocols documentation](/workers/reference/protocols/).
245245
- We have added new [native database integrations](/workers/databases/native-integrations/) for popular serverless database providers, including Neon, PlanetScale, and Supabase. Native integrations automatically handle the process of creating a connection string and adding it as a Secret to your Worker.
246-
- You can now also connect directly to databases over TCP from a Worker, starting with [PostgreSQL](/hyperdrive/configuration/connect-to-postgres/). Support for PostgreSQL is based on the popular `pg` driver, and allows you to connect to any PostgreSQL instance over TLS from a Worker directly.
246+
- You can now also connect directly to databases over TCP from a Worker, starting with [PostgreSQL](/hyperdrive/examples/connect-to-postgres/). Support for PostgreSQL is based on the popular `pg` driver, and allows you to connect to any PostgreSQL instance over TLS from a Worker directly.
247247
- The [R2 Migrator](/r2/data-migration/) (Super Slurper), which automates the process of migrating from existing object storage providers to R2, is now Generally Available.
248248
- publish_date: "2023-05-15"
249249
description: |-

0 commit comments

Comments
 (0)