Skip to content

Commit 8ac8712

Browse files
committed
Renaming "Build with D1" to "Best practices".
1 parent ac438d2 commit 8ac8712

File tree

26 files changed

+61
-53
lines changed

26 files changed

+61
-53
lines changed

public/_redirects

Lines changed: 26 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -260,14 +260,23 @@
260260
# D1
261261
/d1/client-api/ /d1/worker-api/ 301
262262
/d1/build-with-d1/d1-client-api/ /d1/worker-api/ 301
263+
/d1/build-with-d1/import-data/ /d1/best-practices/import-export-data/ 301
264+
/d1/build-with-d1/ /d1/best-practices/ 301
265+
/d1/build-with-d1/import-export-data/ /d1/best-practices/import-export-data/ 301
266+
/d1/build-with-d1/use-indexes/ /d1/best-practices/use-indexes/ 301
267+
/d1/build-with-d1/remote-development/ /d1/best-practices/remote-development/ 301
268+
/d1/build-with-d1/local-development/ /d1/best-practices/local-development/ 301
269+
/d1/build-with-d1/foreign-keys/ /d1/best-practices/foreign-keys/ 301
270+
/d1/build-with-d1/query-json/ /d1/best-practices/query-json/ 301
271+
/d1/build-with-d1/use-d1-from-pages/ /d1/best-practices/use-d1-from-pages/ 301
263272
/d1/learning/using-d1-from-pages/ /pages/functions/bindings/#d1-databases 301
264273
/d1/learning/debug-d1/ /d1/observability/debug-d1/ 301
265-
/d1/learning/using-indexes/ /d1/build-with-d1/use-indexes/ 301
266-
/d1/learning/querying-json/ /d1/build-with-d1/query-json/ 301
267-
/d1/learning/importing-data/ /d1/build-with-d1/import-export-data/ 301
274+
/d1/learning/using-indexes/ /d1/best-practices/use-indexes/ 301
275+
/d1/learning/querying-json/ /d1/best-practices/query-json/ 301
276+
/d1/learning/importing-data/ /d1/best-practices/import-export-data/ 301
268277
/d1/learning/generated-columns/ /d1/reference/generated-columns/ 301
269-
/d1/learning/local-development/ /d1/build-with-d1/local-development/ 301
270-
/d1/learning/remote-development/ /d1/build-with-d1/remote-development/ 301
278+
/d1/learning/local-development/ /d1/best-practices/local-development/ 301
279+
/d1/learning/remote-development/ /d1/best-practices/remote-development/ 301
271280
/d1/learning/data-location/ /d1/configuration/data-location/ 301
272281
/d1/migrations/ /d1/reference/migrations/ 301
273282
/d1/platform/wrangler-commands/ /workers/wrangler/commands/#d1 301
@@ -281,21 +290,20 @@
281290
/d1/reference/environments/ /d1/configuration/environments/ 301
282291
/d1/reference/metrics-analytics/ /d1/observability/metrics-analytics/ 301
283292
/d1/reference/wrangler-commands/ / /d1/wrangler-commands/ 301
284-
/d1/how-to/ /d1/build-with-d1/ 301
285-
/d1/how-to/query-databases/ /d1/build-with-d1/query-d1/ 301
286-
/d1/how-to/using-indexes/ /d1/build-with-d1/use-indexes/ 301
287-
/d1/how-to/querying-json/ /d1/build-with-d1/query-json/ 301
288-
/d1/how-to/importing-data/ /d1/build-with-d1/import-export-data/ 301
293+
/d1/how-to/ /d1/best-practices/ 301
294+
/d1/how-to/query-databases/ /d1/best-practices/query-d1/ 301
295+
/d1/how-to/using-indexes/ /d1/best-practices/use-indexes/ 301
296+
/d1/how-to/querying-json/ /d1/best-practices/query-json/ 301
297+
/d1/how-to/importing-data/ /d1/best-practices/import-export-data/ 301
289298
/d1/how-to/generated-columns/ /d1/reference/generated-columns/ 301
290-
/d1/build-databases/ /d1/build-with-d1/ 301
291-
/d1/build-databases/query-databases/ /d1/build-with-d1/query-d1/ 301
292-
/d1/build-databases/use-indexes/ /d1/build-with-d1/use-indexes/ 301
293-
/d1/build-databases/import-data/ /d1/build-with-d1/import-export-data/ 301
299+
/d1/build-databases/ /d1/best-practices/ 301
300+
/d1/build-databases/query-databases/ /d1/best-practices/query-d1/ 301
301+
/d1/build-databases/use-indexes/ /d1/best-practices/use-indexes/ 301
302+
/d1/build-databases/import-data/ /d1/best-practices/import-export-data/ 301
294303
/d1/build-databases/client-api/ /d1/worker-api/ 301
295-
/d1/reference/query-json/ /d1/build-with-d1/query-json/ 301
296-
/d1/configuration/local-development/ /d1/build-with-d1/local-development/ 301
297-
/d1/configuration/remote-development/ /d1/build-with-d1/remote-development/ 301
298-
/d1/build-with-d1/import-data/ /d1/build-with-d1/import-export-data/ 301
304+
/d1/reference/query-json/ /d1/best-practices/query-json/ 301
305+
/d1/configuration/local-development/ /d1/best-practices/local-development/ 301
306+
/d1/configuration/remote-development/ /d1/best-practices/remote-development/ 301
299307
/d1/reference/database-commands/ /d1/reference/sql-statements/ 301
300308
/d1/reference/sql-statements/ /d1/sql-api/sql-statements/ 301
301309

src/content/changelogs/d1.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ entries:
5858
5959
* Developers with a Workers Paid plan now have a 10GB GB per-database limit (up from 2GB), which can be combined with existing limit of 50,000 databases per account.
6060
* Developers with a Workers Free plan retain the 500 MB per-database limit and can create up to 10 databases per account.
61-
* D1 databases can be [exported](/d1/build-with-d1/import-export-data/#export-an-existing-d1-database) as a SQL file.
61+
* D1 databases can be [exported](/d1/best-practices/import-export-data/#export-an-existing-d1-database) as a SQL file.
6262
6363
- publish_date: "2024-03-12"
6464
title: Change in `wrangler d1 execute` default
@@ -138,7 +138,7 @@ entries:
138138
- publish_date: "2023-08-19"
139139
title: Row count now returned per query
140140
description: |-
141-
D1 now returns a count of `rows_written` and `rows_read` for every query executed, allowing you to assess the cost of query for both [pricing](/d1/platform/pricing/) and [index optimization](/d1/build-with-d1/use-indexes/) purposes.
141+
D1 now returns a count of `rows_written` and `rows_read` for every query executed, allowing you to assess the cost of query for both [pricing](/d1/platform/pricing/) and [index optimization](/d1/best-practices/use-indexes/) purposes.
142142
143143
The `meta` object returned in [D1's Client API](/d1/worker-api/return-object/#d1result) contains a total count of the rows read (`rows_read`) and rows written (`rows_written`) by that query. For example, a query that performs a full table scan (for example, `SELECT * FROM users`) from a table with 5000 rows would return a `rows_read` value of `5000`:
144144
```json
@@ -195,7 +195,7 @@ entries:
195195
New documentation has been published on how to use D1's support for
196196
[generated columns](/d1/reference/generated-columns/) to define columns that are
197197
dynamically generated on write (or read). Generated columns allow you to extract
198-
data from [JSON objects](/d1/build-with-d1/query-json/) or use the output of other
198+
data from [JSON objects](/d1/best-practices/query-json/) or use the output of other
199199
SQL functions.
200200
- publish_date: "2023-06-12"
201201
title: Deprecating Error.cause
@@ -223,7 +223,7 @@ entries:
223223
- publish_date: "2023-05-17"
224224
title: Query JSON
225225
description:
226-
"[New documentation](/d1/build-with-d1/query-json/) has been published
226+
"[New documentation](/d1/best-practices/query-json/) has been published
227227
that covers D1's extensive JSON function support. JSON functions allow you to
228228
parse, query and modify JSON directly from your SQL queries, reducing the number
229229
of round trips to your database, or data queried."

src/content/docs/d1/build-with-d1/foreign-keys.mdx renamed to src/content/docs/d1/best-practices/foreign-keys.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ By default, D1 enforces that foreign key constraints are valid within all querie
1616

1717
## Defer foreign key constraints
1818

19-
When running a [query](/d1/worker-api/), [migration](/d1/reference/migrations/) or [importing data](/d1/build-with-d1/import-export-data/) against a D1 database, there may be situations in which you need to disable foreign key validation during table creation or changes to your schema.
19+
When running a [query](/d1/worker-api/), [migration](/d1/reference/migrations/) or [importing data](/d1/best-practices/import-export-data/) against a D1 database, there may be situations in which you need to disable foreign key validation during table creation or changes to your schema.
2020

2121
D1's foreign key enforcement is equivalent to SQLite's `PRAGMA foreign_keys = on` directive. Because D1 runs every query inside an implicit transaction, user queries cannot change this during a query or migration.
2222

src/content/docs/d1/build-with-d1/import-export-data.mdx renamed to src/content/docs/d1/best-practices/import-export-data.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ sidebar:
77

88
D1 allows you to import existing SQLite tables and their data directly, enabling you to migrate existing data into D1 quickly and easily. This can be useful when migrating applications to use Workers and D1, or when you want to prototype a schema locally before importing it to your D1 database(s).
99

10-
D1 also allows you to export a database. This can be useful for [local development](/d1/build-with-d1/local-development/) or testing.
10+
D1 also allows you to export a database. This can be useful for [local development](/d1/best-practices/local-development/) or testing.
1111

1212
## Import an existing database
1313

@@ -194,9 +194,9 @@ VALUES
194194

195195
## Foreign key constraints
196196

197-
When importing data, you may need to temporarily disable [foreign key constraints](/d1/build-with-d1/foreign-keys/). To do so, call `PRAGMA defer_foreign_keys = true` before making changes that would violate foreign keys.
197+
When importing data, you may need to temporarily disable [foreign key constraints](/d1/best-practices/foreign-keys/). To do so, call `PRAGMA defer_foreign_keys = true` before making changes that would violate foreign keys.
198198

199-
Refer to the [foreign key documentation](/d1/build-with-d1/foreign-keys/) to learn more about how to work with foreign keys and D1.
199+
Refer to the [foreign key documentation](/d1/best-practices/foreign-keys/) to learn more about how to work with foreign keys and D1.
200200

201201
## Next Steps
202202

src/content/docs/d1/build-with-d1/index.mdx renamed to src/content/docs/d1/best-practices/index.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
title: Build with D1
2+
title: Best practices
33
pcx_content_type: navigation
44
sidebar:
55
order: 3
File renamed without changes.
File renamed without changes.

src/content/docs/d1/build-with-d1/query-json.mdx renamed to src/content/docs/d1/best-practices/query-json.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ ERROR 9015: SQL engine error: query error: Error code 1: SQL error or missing da
7878

7979
D1's support for [generated columns](/d1/reference/generated-columns/) allows you to create dynamic columns that are generated based on the values of other columns, including extracted or calculated values of JSON data.
8080

81-
These columns can be queried like any other column, and can have [indexes](/d1/build-with-d1/use-indexes/) defined on them. If you have JSON data that you frequently query and filter over, creating a generated column and an index can dramatically improve query performance.
81+
These columns can be queried like any other column, and can have [indexes](/d1/best-practices/use-indexes/) defined on them. If you have JSON data that you frequently query and filter over, creating a generated column and an index can dramatically improve query performance.
8282

8383
For example, to define a column based on a value within a larger JSON object, use the `AS` keyword combined with a [JSON function](#supported-functions) to generate a typed column:
8484

File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)