Skip to content

Commit 52dfe8e

Browse files
committed
Introducing APIs in Query D1. Introducing Wrangler commands properly.
1 parent cd9e478 commit 52dfe8e

File tree

2 files changed

+24
-3
lines changed

2 files changed

+24
-3
lines changed

src/content/docs/d1/build-with-d1/query-d1.mdx

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,27 @@ There are three primary ways you can query a D1 database:
1313

1414
## Query D1 with Workers Binding API
1515

16+
Workers Binding API primarily interacts with the data plane, and allows you to query your D1 database from your Worker.
17+
18+
This requires you to:
19+
20+
1. Bind your D1 database to your Worker.
21+
2. Prepare a statement.
22+
3. Run the statement.
23+
24+
Refer to [Workers Binding API](/d1/worker-api/) for more information.
25+
1626
## Query D1 with REST API
1727

18-
## Query D1 with Wrangler commands
28+
REST API primarily interacts with the control plane, and allows you to create/manage your D1 database.
29+
30+
You can either use the REST API directly, or use Wrangler commands, which calls the REST API to perform its functions.
31+
32+
- Refer to [D1 REST API](/api/operations/cloudflare-d1-create-database) for D1 REST API documentation.
33+
- Refer to [D1 Wrangler commands](/d1/rest-api/wrangler-commands/) for the full list of D1 Wrangler commands.
34+
35+
## Query D1 with SQL API
36+
37+
D1 is compatible with most SQLite's SQL convention since it leverages SQLite's query engine.
38+
39+
- Refer to [D1 SQL API](/d1/sql-api/sql-statements/) to learn more about supported SQL queries.

src/content/docs/d1/rest-api/wrangler-commands.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
---
22
pcx_content_type: concept
3-
title: Wrangler commands
3+
title: D1 Wrangler commands
44
sidebar:
55
order: 6
66

77
---
88

99
import { Render, Type, MetaInfo } from "~/components"
1010

11-
## `d1`
11+
D1 Wrangler commands use REST APIs to interact with the control plane. This page lists the Wrangler commands for D1.
1212

1313
<Render file="wrangler-commands/d1" product="workers" />
1414

0 commit comments

Comments
 (0)