Skip to content

Commit caf3890

Browse files
Apply suggestions from code review
Co-authored-by: marciocloudflare <[email protected]>
1 parent 9efd9e9 commit caf3890

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ D1 is compatible with most SQLite's SQL convention since it leverages SQLite's q
1111

1212
You can execute any of these statements via the D1 console in the Cloudflare dashboard, [`wrangler d1 execute`](/workers/wrangler/commands/#d1), or with the [D1 Worker Bindings API](/d1/worker-api/prepare-a-statement).
1313

14-
## Supported SQLite Extensions
14+
## Supported SQLite extensions
1515

1616
D1 supports a subset of SQLite extensions for added functionality, including:
1717

src/content/docs/d1/worker-api/index.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ You can execute SQL queries on your D1 database from a Worker using the Worker B
1515

1616
Refer to the relevant sections for the API documentation.
1717

18-
## Typescript support
18+
## TypeScript support
1919

2020
D1 Worker Bindings API is fully-typed via the [`@cloudflare/workers-types`](/workers/languages/typescript/#typescript) package, and also supports [generic types](https://www.typescriptlang.org/docs/handbook/2/generics.html#generic-types) as part of its TypeScript API. A generic type allows you to provide an optional `type parameter` so that a function understands the type of the data it is handling.
2121

@@ -51,7 +51,7 @@ Complete the [Get started](/d1/get-started/#write-queries-within-your-worker) tu
5151

5252
### 2. Modify the content of `index.js`
5353

54-
Replace the contents of your `index.js` file with the below to view the effect of each API.
54+
Replace the contents of your `index.js` file with the code below to view the effect of each API.
5555

5656
<Details header="index.js" open={false}>
5757
```js

src/content/docs/d1/worker-api/prepare-a-statement.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ const stmt = env.DB.prepare("SELECT * FROM Customers WHERE CompanyName = ?").bin
3636
| Syntax | Type | Description |
3737
| ------ | --------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
3838
| `?NNN` | Ordered | A question mark followed by a number `NNN` holds a spot for the `NNN`-th parameter. `NNN` must be between `1` and `SQLITE_MAX_VARIABLE_NUMBER` |
39-
| `?` | Anonymous | A question mark that is not followed by a number creates a parameter with a number one greater than the largest parameter number already assigned. If this means the parameter number is greater than SQLITE_MAX_VARIABLE_NUMBER, it is an error. This parameter format is provided for compatibility with other database engines. But because it is easy to miscount the question marks, the use of this parameter format is discouraged. Programmers are encouraged to use one of the symbolic formats below or the `?NNN` format above instead |
39+
| `?` | Anonymous | A question mark that is not followed by a number creates a parameter with a number one greater than the largest parameter number already assigned. If this means the parameter number is greater than `SQLITE_MAX_VARIABLE_NUMBER`, it is an error. This parameter format is provided for compatibility with other database engines. But because it is easy to miscount the question marks, the use of this parameter format is discouraged. Programmers are encouraged to use one of the symbolic formats below or the `?NNN` format above instead. |
4040

4141
To bind a parameter, use the `stmt.bind()` method.
4242

src/content/docs/d1/worker-api/run-a-statement.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ return Response.json(returnValue);
6969

7070
#### Guidance
7171

72-
- `results` is empty for write operations such as UPDATE, DELETE, or INSERT.
72+
- `results` is empty for write operations such as `UPDATE`, `DELETE`, or `INSERT`.
7373
- When using TypeScript, you can pass a [type parameter](/d1/build-with-d1/d1-client-api/#typescript-support) to `run()` to return a typed result object.
7474
- `stmt.run()` is functionally equivalent to `stmt.all()`, and can be treated as an alias.
7575
- You can choose to extract only the results you expect from the statement by simply returning the `results` property of the return object.

0 commit comments

Comments
 (0)