Update astro-db.mdx#7314
Merged
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
morinokami
commented
Mar 12, 2024
| ## Installation | ||
|
|
||
| Add Astro DB to a new or existing Astro project (requires `astro@4.5` or later) with the [`@astrojs/db` integration](/en/guides/integrations-guide/db/) (`v0.8.0` or later). Astro includes a built-in `astro add` command to automate this setup process for you. | ||
| Add Astro DB to a new or existing Astro project (requires `astro@4.5` or later) with the [`@astrojs/db` integration](/en/guides/integrations-guide/db/) (`v0.8.1` or later). Astro includes a built-in `astro add` command to automate this setup process for you. |
Member
Author
There was a problem hiding this comment.
Since v0.8.0 had a problem with exported types, which has been fixed in v0.8.1, I think we should suggest that readers use v0.8.1 or later.
morinokami
commented
Mar 12, 2024
| Data in Astro DB is stored using SQL tables. Tables structure your data into rows and columns, where columns enforce the type of each row value. Astro DB supports the following column types: | ||
|
|
||
| ```ts title="db/config.ts" "column.text()" "column.number()" "column.boolean()" "column.date()" "column.json()" | ||
| import { defineTable, column } from 'astro:db'; |
Member
Author
There was a problem hiding this comment.
I thought readability could be improved by clearly indicating where defineTable and column are imported from.
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description (required)
I have reviewed astro-db.md and identified a few areas for improvement:
@astrojs/db.<label>element to a code example for a11y considerations.Related issues & labels (optional)