Skip to content

Commit 8bf038d

Browse files
committed
Moving foreign keys and query json into SQL API.
1 parent d2e10d8 commit 8bf038d

File tree

6 files changed

+9
-9
lines changed

6 files changed

+9
-9
lines changed

public/_redirects

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -267,12 +267,12 @@
267267
/d1/build-with-d1/remote-development/ /d1/best-practices/remote-development/ 301
268268
/d1/build-with-d1/local-development/ /d1/best-practices/local-development/ 301
269269
/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
270+
/d1/build-with-d1/query-json/ /d1/sql-api/query-json/ 301
271271
/d1/build-with-d1/use-d1-from-pages/ /d1/best-practices/use-d1-from-pages/ 301
272272
/d1/learning/using-d1-from-pages/ /pages/functions/bindings/#d1-databases 301
273273
/d1/learning/debug-d1/ /d1/observability/debug-d1/ 301
274274
/d1/learning/using-indexes/ /d1/best-practices/use-indexes/ 301
275-
/d1/learning/querying-json/ /d1/best-practices/query-json/ 301
275+
/d1/learning/querying-json/ /d1/sql-api/query-json/ 301
276276
/d1/learning/importing-data/ /d1/best-practices/import-export-data/ 301
277277
/d1/learning/generated-columns/ /d1/reference/generated-columns/ 301
278278
/d1/learning/local-development/ /d1/best-practices/local-development/ 301
@@ -293,15 +293,15 @@
293293
/d1/how-to/ /d1/best-practices/ 301
294294
/d1/how-to/query-databases/ /d1/best-practices/query-d1/ 301
295295
/d1/how-to/using-indexes/ /d1/best-practices/use-indexes/ 301
296-
/d1/how-to/querying-json/ /d1/best-practices/query-json/ 301
296+
/d1/how-to/querying-json/ /d1/sql-api/query-json/ 301
297297
/d1/how-to/importing-data/ /d1/best-practices/import-export-data/ 301
298298
/d1/how-to/generated-columns/ /d1/reference/generated-columns/ 301
299299
/d1/build-databases/ /d1/best-practices/ 301
300300
/d1/build-databases/query-databases/ /d1/best-practices/query-d1/ 301
301301
/d1/build-databases/use-indexes/ /d1/best-practices/use-indexes/ 301
302302
/d1/build-databases/import-data/ /d1/best-practices/import-export-data/ 301
303303
/d1/build-databases/client-api/ /d1/worker-api/ 301
304-
/d1/reference/query-json/ /d1/best-practices/query-json/ 301
304+
/d1/reference/query-json/ /d1/sql-api/query-json/ 301
305305
/d1/configuration/local-development/ /d1/best-practices/local-development/ 301
306306
/d1/configuration/remote-development/ /d1/best-practices/remote-development/ 301
307307
/d1/reference/database-commands/ /d1/reference/sql-statements/ 301

src/content/changelogs/d1.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -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/best-practices/query-json/) or use the output of other
198+
data from [JSON objects](/d1/sql-api/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/best-practices/query-json/) has been published
226+
"[New documentation](/d1/sql-api/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/reference/generated-columns.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ sidebar:
66

77
---
88

9-
D1 allows you to define generated columns based on the values of one or more other columns, SQL functions, or even [extracted JSON values](/d1/best-practices/query-json/).
9+
D1 allows you to define generated columns based on the values of one or more other columns, SQL functions, or even [extracted JSON values](/d1/sql-api/query-json/).
1010

1111
This allows you to normalize your data as you write to it or read it from a table, making it easier to query and reducing the need for complex application logic.
1212

@@ -48,7 +48,7 @@ As a concrete example, to automatically extract the `location` value from the fo
4848
}
4949
```
5050

51-
To define a generated column with the value of `$.measurement.location`, you can use the [`json_extract`](/d1/best-practices/query-json/#extract-values) function to extract the value from the `raw_data` column each time you write to that row:
51+
To define a generated column with the value of `$.measurement.location`, you can use the [`json_extract`](/d1/sql-api/query-json/#extract-values) function to extract the value from the `raw_data` column each time you write to that row:
5252

5353
```sql
5454
CREATE TABLE sensor_readings (
File renamed without changes.
File renamed without changes.

src/content/docs/d1/sql-api/sql-statements.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,5 +74,5 @@ results: [...]
7474
## Related resources
7575

7676
- Learn [how to create indexes](/d1/best-practices/use-indexes/#list-indexes) in D1.
77-
- Use D1's [JSON functions](/d1/best-practices/query-json/) to query JSON data.
77+
- Use D1's [JSON functions](/d1/sql-api/query-json/) to query JSON data.
7878
- Use [`wrangler dev`](/workers/wrangler/commands/#dev) to run your Worker and D1 locally and debug issues before deploying.

0 commit comments

Comments
 (0)