Skip to content

Use static code analysis to ensure database portability #62087

Description

@DerDreschner

Tip

Help move this idea forward

  • Use the 👍 reaction to show support for this feature.
  • Avoid commenting unless you have relevant information to add; unnecessary comments create noise for subscribers.
  • Subscribe to receive notifications about status changes and new comments.

Is your feature request related to a problem? Please describe.
When developing for Nextcloud, there are several limitations for database queries to ensure portability against several database backends. Keeping all those limitations in mind is pretty challaging and even our own full-time developers fail to do so sometimes. Since those limitations raise on runtime only, we should think about ways to ensure portability before merging any code.

Describe the solution you'd like
I like some kind of rector rule-set to check against all code and check for violations. A good starting point for "what limitations to check for" are the comments in the several exceptions we have there: https://github.com/nextcloud/server/tree/3d9c47f5788b5138773122c02b94140faba334b5/lib/private/DB/QueryBuilder

Describe alternatives you've considered
I've checked if there are any rule-sets we could simply apply (like officially supported by doctrine). But I didn't found one.

Metadata

Metadata

Assignees

Fields

No fields configured for Enhancement.

Projects

Status
No status
Status
Triaged

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions