Back to all reviewers

Consistent database parameters

appwrite/appwrite
Based on 2 comments
Other

Maintain consistency and clarity in database-related parameters and configuration variables. Follow these practices: 1. Use descriptive variable names that match parameter names for clarity

Database Other

Reviewer Prompt

Maintain consistency and clarity in database-related parameters and configuration variables. Follow these practices:

  1. Use descriptive variable names that match parameter names for clarity
  2. Follow established naming patterns for database configuration
  3. Use ‘enabled’/’disabled’ instead of boolean values for configuration flags
  4. Avoid unnecessary complexity in database parameter handling

Example 1 - Simplifying parameter handling:

// Instead of:
$dbService = $this->getParam('database', 'mariadb') === 'mariadb' ? 'mariadb' : 'postgresql';

// Use:
$database = $this->getParam('database', 'mariadb');

Example 2 - Consistent naming for database configuration flags:

// Instead of:
_APP_SLOW_QUERIES=true

// Use:
_APP_SLOW_QUERIES_BLOCK=enabled

These practices improve code readability, maintainability, and reduce the potential for errors in database-related code.

2
Comments Analyzed
Other
Primary Language
Database
Category

Source Discussions