use sqlite for static db by poundifdef · Pull Request #148 · scratchdata/scratchdata · GitHub
Skip to content

use sqlite for static db#148

Merged
poundifdef merged 2 commits intomainfrom
remove-static
Apr 4, 2024
Merged

use sqlite for static db#148
poundifdef merged 2 commits intomainfrom
remove-static

Conversation

@poundifdef
Copy link
Copy Markdown
Contributor

No description provided.

@poundifdef poundifdef requested a review from a team April 2, 2024 17:36
Comment thread pkg/storage/database/gorm/gorm.go Outdated
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I try to keep database methods less opinionated in how they operate, and defer to the caller on how this type of logic should be handled. It makes database read/writes more generally applicable.

I would have this method accept a "userId" parameter to control who the default user is.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Removed this - there's no need for a default user since users are created when logged into the dashboard.

@poundifdef poundifdef merged commit d2975be into main Apr 4, 2024
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.

2 participants