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

Forbid mutating procs for types with ro pragma. #126

Merged
merged 6 commits into from Jan 6, 2022

Conversation

moigagoo
Copy link
Owner

@moigagoo moigagoo commented Jan 4, 2022

No description provided.

@moigagoo moigagoo linked an issue Jan 4, 2022 that may be closed by this pull request
Copy link
Collaborator

@PhilippMDoerner PhilippMDoerner left a comment

Choose a reason for hiding this comment

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

This looks almost perfect!
Could the pragma have a human readable name, e.g. "readOnly", similar to how you have the tableName pragma?
I know that ro stands for read-only right now since I know the context, but I had never seen that acronym in use before so I assume I'd likely find myself confused by it in 6 months (or somebody that doesn't know the context wouldn't be certain at a glance what the ro stands for)

@moigagoo
Copy link
Owner Author

moigagoo commented Jan 5, 2022

The only reason I use ro here is because it already exists :-)

However, I'm ok to deprecate ro in favor of readOnly.

@moigagoo
Copy link
Owner Author

moigagoo commented Jan 5, 2022

Imo it's better to do the pragma renaming in a separate PR. This one is about this one feature.

@moigagoo moigagoo merged commit 52c4e09 into develop Jan 6, 2022
@moigagoo moigagoo deleted the feature/125_readonly_models branch January 6, 2022 08:16
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.

[Feature Request] Allow specifying Read-Only Models
2 participants