cloudflare · Cloudflare Workers Docs
Workers D1
Configures and interacts with D1 SQL databases within a Miniflare testing environment using the getD1Database method.
Derived skill
Files assembled from official documentation
Viewing SKILL.md
Workers D1
Configures and interacts with D1 SQL databases within a Miniflare testing environment using the getD1Database method.
When To Use
Use when you need to bind and access D1 database instances within a local Miniflare testing environment to simulate real-world Worker storage interactions.
Reference Files
| File | Contains | Use For |
|---|---|---|
SKILL.md | Entry point: scope, routing table, and workflow. | Start here. |
docs/workers-testing-miniflare-d1-workflow-guide.md | A guide on specifying and interacting with D1 databases within a Miniflare testing environment for Cloudflare Workers. | Questions about a guide on specifying and interacting with D1 databases within a Miniflare testing environment for Cloudflare Workers. |
examples/workers-testing-miniflare-d1-cloudflare-workers-miniflare-d1-configurati.text | A Miniflare configuration object demonstrating how to initialize a D1 database instance for local testing. | Exact payloads, commands, or snippets shown in A Miniflare configuration object demonstrating how to initialize a D1 database instance for local testing. |
examples/workers-testing-miniflare-d1-cloudflare-workers-miniflare-d1-database-us.text | A JavaScript code snippet demonstrating how to access and execute queries on a D1 database instance using Miniflare. | Exact payloads, commands, or snippets shown in A JavaScript code snippet demonstrating how to access and execute queries on a D1 database instance using Miniflare. |
What This Skill Covers
- Specify D1 Databases to add to your environment as follows:
- Main sections:
Databases,Working with D1 Databases.
Workflow
- Open the most relevant file under
docs/for the exact documented workflow and wording. - Open
schemas/files for exact structured contracts. - Open
examples/files for concrete requests, commands, snippets, and manifests. - Do not add behavior or configuration that is not present in the attached source files.
Canonical source: https://developers.cloudflare.com/workers/testing/miniflare/storage/d1/index.md
