D1
Reference doc for the `sst.cloudflare.D1` component.
The D1
component lets you add a Cloudflare D1 database to
your app.
Minimal example
Link to a worker
You can link the db to a worker.
Once linked, you can use the SDK to interact with the db.
Constructor
Parameters
-
name
string
-
args?
D1Args
-
opts?
ComponentResourceOptions
D1Args
transform?
transform.database?
Type D1DatabaseArgs
|
(
args
:
D1DatabaseArgs
=>
void
)
Transform the D1 resource.
Properties
id
Type Output
<
string
>
The generated id of the D1 database.
nodes
nodes.database
Type D1Database
The Cloudflare D1 database.