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 Basic API option for MongoDB #1752

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

Conversation

klirix
Copy link

@klirix klirix commented Nov 23, 2024

  • Adds examples of Basic session API for MongoDB
  • Lists it on the pages listing examples

With some differences in data structuring in SQL vs NoSQL, I embedded the session documents into user documents. This way we only need one operation per update and one operation for fetching both user and the session

Ideally the user and session object wouldn't be separated, as in DB they exist embedded together, but in order to conform to API's down the line that would rely on separate session and user object I splitted them up

And since the userId field in session is not used in application code, but only exists in the DB for joins, I ommited that field for unnecessary redundancy

I used sqlite as a base doc. Should be fine

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.

1 participant