-
Notifications
You must be signed in to change notification settings - Fork 13.8k
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
feat: prisma lesson #28230
feat: prisma lesson #28230
Conversation
Co-authored-by: Asartea <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added some suggestions, but overall looks good!
|
||
There's a bunch of new stuff up here. Prisma schema files are written in Prisma Schema Language. You can see how not only there are column definitions for the table, but also a relation to another table defined within the `Message` model. You'll learn more about this in the assignment readings. | ||
|
||
This schema file lives in your codebase and is tracked by version control. You can guess by now how useful this is. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it might be good to mention what the schema file is (that it has a specific naming convention) and that there can be multiple schema files in Prisma. e.g. from the docs:
It is typically a single file called schema.prisma (or multiple files with .prisma file extension) that is stored in a defined but customizable location.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I purposefully kept out this information, since learners will only ever need one schema file for the projects they tackle in the curriculum. They do learn about the naming convention and the multiple files stuff in the linked documentation in the assignment section.
Co-authored-by: Christian Medina <[email protected]>
Co-authored-by: Christian Medina <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! Great job!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I love this 🔥 Not much else to say regarding the lesson content itself, more just some format/nits etc.
Co-authored-by: MaoShizhong <[email protected]>
Co-authored-by: MaoShizhong <[email protected]>
Co-authored-by: MaoShizhong <[email protected]>
Co-authored-by: MaoShizhong <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Few more little bits but otherwise I think I'm happy with the lesson contents 🚀
Co-authored-by: MaoShizhong <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like this.
🚀
|
||
#### So much more code | ||
|
||
You need a `SELECT` statement? Cool, write a query. Need a `SELECT` statement for a different table? Write another query. Or if your programmer senses are tingling, you could create a utility function for `SELECT`. But now you need a `SELECT` statement for specific columns? You'll have to modify the utility function. What about filters and sorting? You get the point. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: sorry I missed this one earlier
You need a `SELECT` statement? Cool, write a query. Need a `SELECT` statement for a different table? Write another query. Or if your programmer senses are tingling, you could create a utility function for `SELECT`. But now you need a `SELECT` statement for specific columns? You'll have to modify the utility function. What about filters and sorting? You get the point. | |
Do you need a `SELECT` statement? Cool, write a query. Need a `SELECT` statement for a different table? Write another query. Or if your programmer senses are tingling, you could create a utility function for `SELECT`. But now you need a `SELECT` statement for specific columns? You'll have to modify the utility function. What about filters and sorting? You get the point. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I feel "You need a SELECT
statement?" reads better than creating a question-ish tone. I'll reserve this change unless we get anyone else's objection.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Both are fine. The first has a more casual tone but is otherwise still fine
Co-authored-by: Asartea <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚀
Because
#27925
This PR
#27925
Issue
Closes #27925
Additional Information
Pull Request Requirements
location of change: brief description of change
format, e.g.Intro to HTML and CSS lesson: Fix link text
Because
section summarizes the reason for this PRThis PR
section has a bullet point list describing the changes in this PRIssue
section