version: '2' cloud: project: "01HAQMMECEYQYKFJN8MP16QC41" sql: - name: postgresql schema: postgresql/schema.sql queries: postgresql/query.sql engine: postgresql database: uri: "${VET_TEST_EXAMPLES_POSTGRES_AUTHORS}" analyzer: database: false rules: - sqlc/db-prepare - postgresql-query-too-costly gen: go: package: authors sql_package: pgx/v5 out: postgresql - name: mysql schema: mysql/schema.sql queries: mysql/query.sql engine: mysql database: uri: "${VET_TEST_EXAMPLES_MYSQL_AUTHORS}" rules: - sqlc/db-prepare # - mysql-query-too-costly gen: go: package: authors out: mysql - name: sqlite schema: sqlite/schema.sql queries: sqlite/query.sql engine: sqlite database: uri: file:authors?mode=memory&cache=shared rules: - sqlc/db-prepare gen: go: package: authors out: sqlite rules: - name: postgresql-query-too-costly message: "Too costly" rule: "postgresql.explain.plan.total_cost > 300.0" - name: mysql-query-too-costly message: "Too costly" rule: "has(mysql.explain.query_block.cost_info) && double(mysql.explain.query_block.cost_info.query_cost) > 2.0"