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

ADD RxDB Case Study #1385

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

ADD RxDB Case Study #1385

wants to merge 2 commits into from

Conversation

pubkey
Copy link
Contributor

@pubkey pubkey commented Jan 31, 2025

What kind of change does this PR introduce?

Adds the RxDB Case Study to the Blog.

Issue Number:

Related: pubkey/rxdb#6787

Screenshots/videos:

screeee

If relevant, did you update the documentation?

http://localhost:3001/blog/posts/rxdb-case-study

Summary

Does this PR introduce a breaking change?

No

@pubkey pubkey requested a review from a team as a code owner January 31, 2025 05:43
Copy link

github-actions bot commented Jan 31, 2025

built with Refined Cloudflare Pages Action

⚡ Cloudflare Pages Deployment

Name Status Preview Last Commit
website ✅ Ready (View Log) Visit Preview 7bb71b0

Copy link

codecov bot commented Jan 31, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 100.00%. Comparing base (82fb9c7) to head (7bb71b0).
Report is 19 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff            @@
##              main     #1385   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           10        10           
  Lines          373       387   +14     
  Branches        94       103    +9     
=========================================
+ Hits           373       387   +14     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@jviotti
Copy link
Member

jviotti commented Jan 31, 2025

Thanks a lot @pubkey ! @json-schema-org/tsc I did an initial review and I would love yours too 🙏🏻


To improve developer experience, RxDB offers a [built-in way](https://rxdb.info/tutorials/typescript.html) to infer the document's TypeScript type from the schema during runtime. This is helpful because you get immediate feedback in your IDE: As soon as you update the schema, TypeScript picks up the changes. You'll see type errors in your code if you attempt to use fields that are no longer valid or if you forget to include newly required fields.

Below is an example on how to interfere the TypeScript type of a document from its JSON-schema:
Copy link
Member

Choose a reason for hiding this comment

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

"interfere" here is presumably supposed to be "infer"?

},
/* ...other fields... */
},
required: ['firstName', 'lastName', 'passportId'],
Copy link
Member

Choose a reason for hiding this comment

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

It's completely irrelevant to the article but a pet peeve in database structures is having first and last name fields (rather than just a "name") field (c.f. https://www.kalzumeus.com/2010/06/17/falsehoods-programmers-believe-about-names/)

@pubkey
Copy link
Contributor Author

pubkey commented Feb 6, 2025

Thank you @Julian
I changed these things. I also replaced firstName+lastName with name+birthdate so that my article does not give bad examples.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants