Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[D1] Creating proper API documentation #17923

Merged
merged 34 commits into from
Nov 19, 2024
Merged

[D1] Creating proper API documentation #17923

merged 34 commits into from
Nov 19, 2024

Conversation

Oxyjun
Copy link
Contributor

@Oxyjun Oxyjun commented Nov 1, 2024

Summary

  1. Adds a new "Worker Bindings API" folder on the sidebar.
  2. Adds new API chapters within "Worker API"
  3. Adds a new "SQL API" folder on the sidebar.
  4. Reshuffles the the sidebar to accommodate the new API folders.

At the moment, this is purely additive. This causes duplication in the content, between "Query D1" chapter. We will have to tackle "Build with D1" on a separate PR.

Screenshots (optional)

Before (left) and after (right)
image

Expanded new sidebar folders:

image

Documentation checklist

  • The documentation style guide has been adhered to.
  • If a larger change - such as adding a new page- an issue has been opened in relation to any incorrect or out of date information that this PR fixes.
  • Files which have changed name or location have been allocated redirects.

@Oxyjun Oxyjun self-assigned this Nov 1, 2024
@github-actions github-actions bot added the size/m label Nov 1, 2024
@github-actions github-actions bot added the product:d1 D1: https://developers.cloudflare.com/d1/ label Nov 1, 2024
Copy link
Contributor

@hyperlint-ai hyperlint-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

9 files reviewed, 4 total issue(s) found.

src/content/docs/d1/worker-api/query.mdx Outdated Show resolved Hide resolved
src/content/docs/d1/worker-api/query.mdx Outdated Show resolved Hide resolved
src/content/docs/d1/worker-api/query.mdx Outdated Show resolved Hide resolved
src/content/docs/d1/worker-api/query.mdx Outdated Show resolved Hide resolved
Copy link

cloudflare-workers-and-pages bot commented Nov 1, 2024

Deploying cloudflare-docs with  Cloudflare Pages  Cloudflare Pages

Latest commit: 236aad9
Status: ✅  Deploy successful!
Preview URL: https://1e62b0b0.cloudflare-docs-7ou.pages.dev
Branch Preview URL: https://jun-d1-api-reshuffle.cloudflare-docs-7ou.pages.dev

View logs

Copy link

github-actions bot commented Nov 1, 2024

Files with changes (up to 15)

Original Link Updated Link
https://developers.cloudflare.com/d1/worker-api/d1-database/ https://jun-d1-api-reshuffle.cloudflare-docs-7ou.pages.dev/d1/worker-api/d1-database/
https://developers.cloudflare.com/d1/worker-api/prepared-statements/ https://jun-d1-api-reshuffle.cloudflare-docs-7ou.pages.dev/d1/worker-api/prepared-statements/
https://developers.cloudflare.com/d1/worker-api/ https://jun-d1-api-reshuffle.cloudflare-docs-7ou.pages.dev/d1/worker-api/
https://developers.cloudflare.com/d1/worker-api/return-object/ https://jun-d1-api-reshuffle.cloudflare-docs-7ou.pages.dev/d1/worker-api/return-object/
https://developers.cloudflare.com/d1/sql-api/sql-statements/ https://jun-d1-api-reshuffle.cloudflare-docs-7ou.pages.dev/d1/sql-api/sql-statements/
https://developers.cloudflare.com/d1/sql-api/ https://jun-d1-api-reshuffle.cloudflare-docs-7ou.pages.dev/d1/sql-api/
https://developers.cloudflare.com/d1/get-started/ https://jun-d1-api-reshuffle.cloudflare-docs-7ou.pages.dev/d1/get-started/
https://developers.cloudflare.com/d1/build-with-d1/d1-client-api/ https://jun-d1-api-reshuffle.cloudflare-docs-7ou.pages.dev/d1/build-with-d1/d1-client-api/
https://developers.cloudflare.com/d1/configuration/ https://jun-d1-api-reshuffle.cloudflare-docs-7ou.pages.dev/d1/configuration/
https://developers.cloudflare.com/d1/d1-api/ https://jun-d1-api-reshuffle.cloudflare-docs-7ou.pages.dev/d1/d1-api/
https://developers.cloudflare.com/d1/demos/ https://jun-d1-api-reshuffle.cloudflare-docs-7ou.pages.dev/d1/demos/
https://developers.cloudflare.com/d1/examples/ https://jun-d1-api-reshuffle.cloudflare-docs-7ou.pages.dev/d1/examples/
https://developers.cloudflare.com/d1/observability/ https://jun-d1-api-reshuffle.cloudflare-docs-7ou.pages.dev/d1/observability/
https://developers.cloudflare.com/d1/platform/ https://jun-d1-api-reshuffle.cloudflare-docs-7ou.pages.dev/d1/platform/
https://developers.cloudflare.com/d1/reference/ https://jun-d1-api-reshuffle.cloudflare-docs-7ou.pages.dev/d1/reference/

Copy link

github-actions bot commented Nov 7, 2024

This PR changes current filenames or deletes current files. Make sure you have redirects set up to cover the following paths:

  • /d1/reference/sql-statements/

@github-actions github-actions bot removed the size/m label Nov 7, 2024
@vy-ton
Copy link
Contributor

vy-ton commented Nov 14, 2024

image

double "API" is busy, not sure if we can change this

Copy link
Contributor

@vy-ton vy-ton left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thrilled we're finally get D1 API separate docs, left a few suggestions, good to merge after

src/content/docs/d1/worker-api/run-a-statement.mdx Outdated Show resolved Hide resolved
src/content/docs/d1/worker-api/run-a-statement.mdx Outdated Show resolved Hide resolved
src/content/docs/d1/worker-api/index.mdx Outdated Show resolved Hide resolved
src/content/docs/d1/worker-api/index.mdx Outdated Show resolved Hide resolved
src/content/docs/d1/worker-api/index.mdx Outdated Show resolved Hide resolved
src/content/docs/d1/worker-api/index.mdx Outdated Show resolved Hide resolved
src/content/docs/d1/worker-api/prepare-a-statement.mdx Outdated Show resolved Hide resolved
src/content/changelogs/d1.yaml Outdated Show resolved Hide resolved
@Oxyjun
Copy link
Contributor Author

Oxyjun commented Nov 15, 2024

image

double "API" is busy, not sure if we can change this

I'll look into it - it might be a case where we can't change just this single one.

src/content/docs/d1/get-started.mdx Outdated Show resolved Hide resolved
src/content/docs/d1/sql-api/sql-statements.mdx Outdated Show resolved Hide resolved
src/content/docs/d1/worker-api/index.mdx Outdated Show resolved Hide resolved
src/content/docs/d1/worker-api/index.mdx Outdated Show resolved Hide resolved
src/content/docs/d1/worker-api/index.mdx Outdated Show resolved Hide resolved
src/content/docs/d1/worker-api/prepare-a-statement.mdx Outdated Show resolved Hide resolved
src/content/docs/d1/worker-api/run-a-statement.mdx Outdated Show resolved Hide resolved
src/content/docs/d1/worker-api/run-a-statement.mdx Outdated Show resolved Hide resolved
src/content/docs/d1/worker-api/run-a-statement.mdx Outdated Show resolved Hide resolved
src/content/docs/d1/worker-api/run-a-statement.mdx Outdated Show resolved Hide resolved
src/content/docs/d1/worker-api/index.mdx Outdated Show resolved Hide resolved
src/content/docs/d1/worker-api/index.mdx Outdated Show resolved Hide resolved
src/content/docs/d1/worker-api/prepare-a-statement.mdx Outdated Show resolved Hide resolved
Copy link
Contributor

@joshthoward joshthoward left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved pending my comments. This is some substantial work. Awesome!

src/content/docs/d1/worker-api/index.mdx Show resolved Hide resolved
src/content/docs/d1/worker-api/d1-binding.mdx Outdated Show resolved Hide resolved
src/content/docs/d1/worker-api/d1-binding.mdx Outdated Show resolved Hide resolved
src/content/docs/d1/worker-api/d1-binding.mdx Outdated Show resolved Hide resolved
src/content/docs/d1/worker-api/d1-binding.mdx Outdated Show resolved Hide resolved
src/content/docs/d1/worker-api/prepared-statements.mdx Outdated Show resolved Hide resolved
src/content/docs/d1/worker-api/prepared-statements.mdx Outdated Show resolved Hide resolved
src/content/docs/d1/worker-api/prepared-statements.mdx Outdated Show resolved Hide resolved
src/content/docs/d1/worker-api/return-object.mdx Outdated Show resolved Hide resolved
@Oxyjun Oxyjun enabled auto-merge (squash) November 19, 2024 17:07
@Oxyjun Oxyjun merged commit e2f26ba into production Nov 19, 2024
10 checks passed
@Oxyjun Oxyjun deleted the jun/d1/API-reshuffle branch November 19, 2024 17:16
harshil1712 pushed a commit that referenced this pull request Dec 3, 2024
* Adding placeholder for new API section.

* Initializing await stmt API chapter.

* Reordering the sidebar. Adding intro to stmt.methods.

* Setting up Worker Bindings API chapters.

* Settling on naming convention, fleshing out .db chapter.

* Setting up the database API section.

* Fleshing out API chapters.

* Updating D1 API docs.

* Adding in more information to be complete.

* Apply suggestions from code review

Co-authored-by: Lambros Petrou <[email protected]>

* Update src/content/docs/d1/worker-api/query.mdx

* Updating the Return Object chapter. Testing more APIs.

* Fleshing out the API docs in more detail.

* Fixing broken link.

* Changing reference to mention Worker Binding APIs.

* Small rename.

* Small rename.

* Updating the chapters

* Modifying the structure to align with discussion.

* Renaming extensions header for better clarity.

* Adding changelog entry for including multiple queries in a single prepared statement.

* Updating wording in Get started to match new folders.

* Fixing broken link

* Implementing feedback.

* Removing references to multi-statement prepare().

* Fixing broken links

* Grammar fixes and deleting redundant comment block.

* Apply suggestions from code review

Co-authored-by: marciocloudflare <[email protected]>

* Minor rename of the chapter

* Cleaning up the structure by method hierarchy.

* Adding a note for those who are following the tutorial with an existing Worker.

* Actioning PR feedback.

* Turning all method names into links to the relevant header.

---------

Co-authored-by: Lambros Petrou <[email protected]>
Co-authored-by: marciocloudflare <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hyperlint-ignore product:d1 D1: https://developers.cloudflare.com/d1/ size/l
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants