{"slug":"sql","title":"SQL","extensions":[".sql"],"entry_languages":["Sql"],"prompts":17,"repos":0,"sample":[],"tools":[],"headline":[],"raw_md":"https://awesomereviewers.com/raw/verify/sql.md","raw_json":"https://awesomereviewers.com/raw/verify/sql.json","url":"https://awesomereviewers.com/verify/sql/","baseline":{"slug":"every-change","title":"Any change","topics":["Code Style","Naming Conventions"],"checks":[{"kind":"formatting","title":"Formatting","method":"formatting","method_slug":"formatting","catches":"Layout drift that buries the real change in the diff.","tool":null,"alternatives":[],"note":null},{"kind":"linting","title":"Linting","method":"static_analysis","method_slug":"static-analysis","catches":"Bug-prone patterns, unused code and conventions the formatter does not cover.","tool":null,"alternatives":[],"note":null},{"kind":"type-checking","title":"Type checking","method":"static_analysis","method_slug":"static-analysis","catches":"Wrong types, unhandled null or None, call signatures broken across modules.","tool":null,"alternatives":[],"note":null},{"kind":"unit-tests","title":"Unit and integration tests","method":"testing","method_slug":"testing","catches":"Behaviour regressions on the paths the tests exercise.","tool":null,"alternatives":[],"note":null}],"prompts":[{"slug":"langfuse-consistent-database-naming","title":"Consistent database naming","description":"Maintain consistent naming patterns across all database objects. Ensure that: 1. Related object names are aligned (e.g., indexes should reference their table names)","repository":"langfuse/langfuse","domain":"observability","topic":"Naming Conventions","language":"Sql","updated":"2025-05-22","comments":3,"stars":13574,"raw":"https://awesomereviewers.com/raw/langfuse-consistent-database-naming.md"}],"prompt_count":1},"changes":[{"slug":"security","title":"Authentication, input handling, secrets, permissions","topics":["Security"],"checks":[{"kind":"security-scanning","title":"Security scanning","method":"static_analysis","method_slug":"static-analysis","catches":"Injection, unsafe APIs and tainted data reaching a sink.","tool":null,"alternatives":[],"note":null},{"kind":"secret-scanning","title":"Secret scanning","method":"static_analysis","method_slug":"static-analysis","catches":"Credentials and tokens committed to the repository.","tool":null,"alternatives":[],"note":null},{"kind":"dependency-audit","title":"Dependency audit","method":"supply_chain","method_slug":"supply-chain","catches":"Known-vulnerable or disallowed dependencies and licenses.","tool":null,"alternatives":[],"note":null}],"prompts":[{"slug":"neon-escape-sql-parameters","title":"Escape SQL parameters","description":"Always escape parameters in database connection strings to prevent SQL injection attacks. Direct string concatenation with user-provided or database-sourced values creates security vulnerabilities that can be exploited.","repository":"neondatabase/neon","domain":"data-systems","topic":"Security","language":"Sql","updated":"2025-06-11","comments":1,"stars":19015,"raw":"https://awesomereviewers.com/raw/neon-escape-sql-parameters.md"},{"slug":"helicone-least-privilege-database-grants","title":"Least-privilege database grants","description":"Enabling Row Level Security (RLS) alone is not sufficient to secure a new table—Postgres/Supabase grants default privileges to roles like `anon` and `authenticated` that can allow unintended access even with RLS enabled unless explicit policies are also defined. When creating tables for sensitive or system-level data, always explicitly revoke default...","repository":"Helicone/helicone","domain":"security","topic":"Security","language":"Sql","updated":"2025-04-10","comments":1,"stars":6248,"raw":"https://awesomereviewers.com/raw/helicone-least-privilege-database-grants.md"},{"slug":"langfuse-encrypt-sensitive-credentials","title":"Encrypt sensitive credentials","description":"Sensitive credentials such as API keys, passwords, access tokens, and secret keys should never be stored in plain text in databases or configuration files. This creates significant security risks if the database is compromised or if unauthorized access occurs.","repository":"langfuse/langfuse","domain":"observability","topic":"Security","language":"Sql","updated":"2025-03-24","comments":1,"stars":13574,"raw":"https://awesomereviewers.com/raw/langfuse-encrypt-sensitive-credentials.md"}],"prompt_count":3},{"slug":"interfaces","title":"Public APIs, signatures, error paths, nullability","topics":["API","Error Handling","Null Handling"],"checks":[{"kind":"type-checking","title":"Type checking","method":"static_analysis","method_slug":"static-analysis","catches":"Wrong types, unhandled null or None, call signatures broken across modules.","tool":null,"alternatives":[],"note":null},{"kind":"unit-tests","title":"Unit and integration tests","method":"testing","method_slug":"testing","catches":"Behaviour regressions on the paths the tests exercise.","tool":null,"alternatives":[],"note":null},{"kind":"property-tests","title":"Property-based tests","method":"testing","method_slug":"testing","catches":"Edge-case inputs nobody wrote a test for; invariants over generated data.","tool":null,"alternatives":[],"note":null}],"prompts":[],"prompt_count":0},{"slug":"services","title":"Service and framework code","topics":["Fastify","NestJS","Spring","Axum","Celery","Temporal"],"checks":[{"kind":"unit-tests","title":"Unit and integration tests","method":"testing","method_slug":"testing","catches":"Behaviour regressions on the paths the tests exercise.","tool":null,"alternatives":[],"note":null},{"kind":"version-matrix","title":"Version and platform matrix","method":"testing","method_slug":"testing","catches":"Breakage on a runtime version, OS or feature combination you did not run locally.","tool":null,"alternatives":[],"note":null}],"prompts":[],"prompt_count":0},{"slug":"algorithms","title":"Algorithms, parsers, data transforms","topics":["Algorithms"],"checks":[{"kind":"property-tests","title":"Property-based tests","method":"testing","method_slug":"testing","catches":"Edge-case inputs nobody wrote a test for; invariants over generated data.","tool":null,"alternatives":[],"note":null},{"kind":"fuzzing","title":"Fuzzing","method":"testing","method_slug":"testing","catches":"Crashes, panics and hangs on malformed input, especially in parsers and decoders.","tool":null,"alternatives":[],"note":null},{"kind":"mutation-testing","title":"Mutation testing","method":"testing","method_slug":"testing","catches":"Tests that keep passing whatever the code does.","tool":null,"alternatives":[],"note":null},{"kind":"proofs","title":"Proofs and specifications","method":"formal","method_slug":"formal","catches":"Design-level bugs in protocols and algorithms, checked against a specification.","tool":null,"alternatives":[],"note":null}],"prompts":[],"prompt_count":0},{"slug":"concurrency","title":"Threads, async code, locks, shared state","topics":["Concurrency"],"checks":[{"kind":"concurrency-model-checking","title":"Concurrency model checking","method":"formal","method_slug":"formal","catches":"Races and orderings that fail only under specific interleavings.","tool":null,"alternatives":[],"note":null},{"kind":"ub-detection","title":"Undefined-behaviour detection","method":"formal","method_slug":"formal","catches":"Memory-safety and aliasing violations in unsafe code.","tool":null,"alternatives":[],"note":null},{"kind":"property-tests","title":"Property-based tests","method":"testing","method_slug":"testing","catches":"Edge-case inputs nobody wrote a test for; invariants over generated data.","tool":null,"alternatives":[],"note":null}],"prompts":[],"prompt_count":0},{"slug":"networking","title":"Network calls, retries, timeouts, protocols","topics":["Networking","Axios"],"checks":[{"kind":"unit-tests","title":"Unit and integration tests","method":"testing","method_slug":"testing","catches":"Behaviour regressions on the paths the tests exercise.","tool":null,"alternatives":[],"note":null},{"kind":"fuzzing","title":"Fuzzing","method":"testing","method_slug":"testing","catches":"Crashes, panics and hangs on malformed input, especially in parsers and decoders.","tool":null,"alternatives":[],"note":null}],"prompts":[],"prompt_count":0},{"slug":"ui","title":"UI components and pages","topics":["React","Next","Next.js","Vue","Angular"],"checks":[{"kind":"browser-tests","title":"End-to-end browser tests","method":"testing","method_slug":"testing","catches":"User flows broken across components, routing and the network.","tool":null,"alternatives":[],"note":null},{"kind":"linting","title":"Linting","method":"static_analysis","method_slug":"static-analysis","catches":"Bug-prone patterns, unused code and conventions the formatter does not cover.","tool":null,"alternatives":[],"note":null}],"prompts":[],"prompt_count":0},{"slug":"data","title":"Databases, migrations, caching","topics":["Database","Migrations","Caching"],"checks":[{"kind":"unit-tests","title":"Unit and integration tests","method":"testing","method_slug":"testing","catches":"Behaviour regressions on the paths the tests exercise.","tool":null,"alternatives":[],"note":null},{"kind":"version-matrix","title":"Version and platform matrix","method":"testing","method_slug":"testing","catches":"Breakage on a runtime version, OS or feature combination you did not run locally.","tool":null,"alternatives":[],"note":null}],"prompts":[{"slug":"helicone-deliberate-schema-constraints","title":"Deliberate schema constraints","description":"When writing migrations, define schemas deliberately and avoid redundant or speculative elements. Specifically: - Don''t duplicate mechanisms: if a unique constraint already enforces uniqueness, don''t also create a separate unique index for the same columns.","repository":"Helicone/helicone","domain":"data-systems","topic":"Migrations","language":"Sql","updated":"2025-09-05","comments":5,"stars":6248,"raw":"https://awesomereviewers.com/raw/helicone-deliberate-schema-constraints.md"},{"slug":"inbox-zero-transactional-verified-migrations","title":"Transactional verified migrations","description":"Enhance database migration reliability by wrapping changes in transactions with pre-check and post-verification steps. This pattern prevents partial migrations that could leave your database in an inconsistent state.","repository":"elie222/inbox-zero","domain":"app-frameworks","topic":"Migrations","language":"Sql","updated":"2025-06-27","comments":5,"stars":8267,"raw":"https://awesomereviewers.com/raw/inbox-zero-transactional-verified-migrations.md"},{"slug":"lobe-chat-use-idempotent-migrations","title":"Use idempotent migrations","description":"Always use defensive programming patterns in migration scripts to ensure they can be executed multiple times without errors. This prevents failures during re-execution scenarios and makes migrations more robust.","repository":"lobehub/lobe-chat","domain":"ai-agents","topic":"Migrations","language":"Sql","updated":"2025-08-26","comments":4,"stars":65138,"raw":"https://awesomereviewers.com/raw/lobe-chat-use-idempotent-migrations.md"},{"slug":"mono-enforce-database-constraints-properly","title":"enforce database constraints properly","description":"Database schemas should use appropriate constraints to enforce business rules and prevent data inconsistencies. When designing tables, identify potential duplicate data scenarios and implement unique constraints to prevent them. Consider consolidating related tables when a single table with proper constraints can achieve the same goal more efficiently.","repository":"rocicorp/mono","domain":"data-systems","topic":"Database","language":"Sql","updated":"2025-07-16","comments":3,"stars":2091,"raw":"https://awesomereviewers.com/raw/mono-enforce-database-constraints-properly.md"},{"slug":"inbox-zero-database-type-best-practices","title":"Database type best practices","description":"Select appropriate data types and defaults for database columns to ensure data integrity and simplify application code. For timestamp columns, use timezone-aware types (TIMESTAMPTZ) when working across different timezones or with UTC offsets. For ID columns, configure auto-generation at the database level using functions like gen_random_uuid() rather than...","repository":"elie222/inbox-zero","domain":"app-frameworks","topic":"Database","language":"Sql","updated":"2025-06-10","comments":3,"stars":8267,"raw":"https://awesomereviewers.com/raw/inbox-zero-database-type-best-practices.md"},{"slug":"langfuse-database-migration-best-practices","title":"Database migration best practices","description":"When implementing database schema changes, follow these migration best practices to maintain data integrity and ensure backward compatibility: 1. **Create separate migration files** for new schema changes rather than modifying existing migrations. This ensures users who already ran previous migrations will get new fields added correctly.","repository":"langfuse/langfuse","domain":"observability","topic":"Migrations","language":"Sql","updated":"2025-06-07","comments":3,"stars":13574,"raw":"https://awesomereviewers.com/raw/langfuse-database-migration-best-practices.md"},{"slug":"hyperswitch-use-defensive-sql-clauses","title":"Use defensive SQL clauses","description":"Always use defensive SQL clauses like `IF NOT EXISTS` and `IF EXISTS` in migration scripts to make them idempotent and prevent failures when run multiple times or in different environments. This ensures migrations can be safely re-executed without causing errors due to existing schema elements.","repository":"juspay/hyperswitch","domain":"app-frameworks","topic":"Migrations","language":"Sql","updated":"2025-09-04","comments":2,"stars":34028,"raw":"https://awesomereviewers.com/raw/hyperswitch-use-defensive-sql-clauses.md"},{"slug":"hyperswitch-explicit-database-constraints","title":"explicit database constraints","description":"Be explicit about database constraints and avoid relying on database-level defaults. Always specify NOT NULL constraints where appropriate and let the application layer handle default values rather than the database schema. Use appropriate primary key strategies like SERIAL for auto-incrementing IDs.","repository":"juspay/hyperswitch","domain":"app-frameworks","topic":"Database","language":"Sql","updated":"2025-09-02","comments":2,"stars":34028,"raw":"https://awesomereviewers.com/raw/hyperswitch-explicit-database-constraints.md"},{"slug":"clickhouse-comprehensive-database-testing","title":"Comprehensive database testing","description":"Database tests should verify both query execution and optimization behavior through comprehensive scenario coverage. When testing query optimizations, include EXPLAIN PLAN verification to ensure the optimizer produces expected execution plans. For database features like row policies or security constraints, test multiple scenarios including edge cases and...","repository":"ClickHouse/ClickHouse","domain":"data-systems","topic":"Database","language":"Sql","updated":"2025-08-18","comments":2,"stars":42425,"raw":"https://awesomereviewers.com/raw/clickhouse-comprehensive-database-testing.md"},{"slug":"vitess-size-fields-appropriately","title":"Size fields appropriately","description":"When designing database schemas, choose field types and sizes that accommodate both current and anticipated future data volumes. Undersized fields can cause production issues and limit functionality when data grows beyond initial expectations. Additionally, ensure consistency between related fields that store similar data or participate in the same...","repository":"vitessio/vitess","domain":"data-systems","topic":"Database","language":"Sql","updated":"2025-05-02","comments":2,"stars":19815,"raw":"https://awesomereviewers.com/raw/vitess-size-fields-appropriately.md"},{"slug":"langfuse-materialize-database-indexes","title":"Materialize database indexes","description":"Always materialize database indexes after creation to ensure they are fully built and immediately available for queries. This is especially important in migration scripts where database performance shouldn't be compromised during or after the migration process. Without materialization, indexes may not be immediately usable, causing potential performance...","repository":"langfuse/langfuse","domain":"observability","topic":"Database","language":"Sql","updated":"2025-04-09","comments":2,"stars":13574,"raw":"https://awesomereviewers.com/raw/langfuse-materialize-database-indexes.md"}],"prompt_count":11},{"slug":"performance","title":"Hot paths and performance","topics":["Performance Optimization"],"checks":[],"prompts":[],"prompt_count":0},{"slug":"ai","title":"Model, prompt and LLM code","topics":["AI","Pytorch"],"checks":[{"kind":"unit-tests","title":"Unit and integration tests","method":"testing","method_slug":"testing","catches":"Behaviour regressions on the paths the tests exercise.","tool":null,"alternatives":[],"note":null}],"prompts":[],"prompt_count":0},{"slug":"observability","title":"Logging, metrics, tracing","topics":["Logging","Observability"],"checks":[],"prompts":[],"prompt_count":0},{"slug":"ci-config","title":"CI workflows and configuration files","topics":["CI/CD","Configurations"],"checks":[{"kind":"workflow-linting","title":"CI workflow linting","method":"static_analysis","method_slug":"static-analysis","catches":"Broken GitHub Actions syntax, script injection, over-broad token permissions.","tool":null,"alternatives":[],"note":null},{"kind":"file-hygiene","title":"File hygiene","method":"formatting","method_slug":"formatting","catches":"Invalid JSON, YAML or TOML, merge markers, trailing whitespace, oversized files.","tool":null,"alternatives":[],"note":null}],"prompts":[],"prompt_count":0},{"slug":"dependencies","title":"Dependencies and lockfiles","topics":[],"checks":[{"kind":"dependency-audit","title":"Dependency audit","method":"supply_chain","method_slug":"supply-chain","catches":"Known-vulnerable or disallowed dependencies and licenses.","tool":null,"alternatives":[],"note":null},{"kind":"lockfile-check","title":"Lockfile consistency","method":"supply_chain","method_slug":"supply-chain","catches":"A lockfile that no longer matches its manifest.","tool":null,"alternatives":[],"note":null},{"kind":"version-matrix","title":"Version and platform matrix","method":"testing","method_slug":"testing","catches":"Breakage on a runtime version, OS or feature combination you did not run locally.","tool":null,"alternatives":[],"note":null}],"prompts":[],"prompt_count":0},{"slug":"tests","title":"The tests themselves","topics":["Testing"],"checks":[{"kind":"mutation-testing","title":"Mutation testing","method":"testing","method_slug":"testing","catches":"Tests that keep passing whatever the code does.","tool":null,"alternatives":[],"note":null},{"kind":"version-matrix","title":"Version and platform matrix","method":"testing","method_slug":"testing","catches":"Breakage on a runtime version, OS or feature combination you did not run locally.","tool":null,"alternatives":[],"note":null}],"prompts":[{"slug":"spark-comprehensive-test-coverage","title":"comprehensive test coverage","description":"Ensure test suites provide comprehensive coverage by including edge cases, boundary conditions, and input variations while verifying that tests actually validate the intended functionality. Tests should cover different input formats (case sensitivity, precision levels), boundary values (empty inputs, maximum/minimum values), and error conditions. Remove...","repository":"apache/spark","domain":"data-systems","topic":"Testing","language":"Sql","updated":"2025-07-24","comments":3,"stars":41554,"raw":"https://awesomereviewers.com/raw/spark-comprehensive-test-coverage.md"},{"slug":"clickhouse-write-focused-clear-tests","title":"Write focused, clear tests","description":"Tests should be simple, focused on a single concern, and easy to understand. When a test combines multiple potential failure conditions or verification points, split it into separate, focused test cases. Avoid over-engineering tests with unnecessary complexity.","repository":"ClickHouse/ClickHouse","domain":"data-systems","topic":"Testing","language":"Sql","updated":"2025-08-14","comments":2,"stars":42425,"raw":"https://awesomereviewers.com/raw/clickhouse-write-focused-clear-tests.md"}],"prompt_count":2},{"slug":"docs","title":"Documentation and comments","topics":["Documentation"],"checks":[{"kind":"docs-build","title":"Docs build","method":"static_analysis","method_slug":"static-analysis","catches":"Broken cross-references, links and markup in documentation.","tool":null,"alternatives":[],"note":null},{"kind":"spelling","title":"Spelling","method":"formatting","method_slug":"formatting","catches":"Typos in identifiers, comments and docs.","tool":null,"alternatives":[],"note":null}],"prompts":[],"prompt_count":0}]}
