Every behavior documented in the README and docs/ is listed here with the test that proves it, for each database it
applies to. See Testing for the rules.
- A cell links to the end-to-end test in
tests/that runs against the real database. - Unit-only checks are used only when the behavior is decided or rejected during generation, where the generated code cannot reach it.
test/coverage_map_test.rbchecks that every linked test exists.
| Documented behavior | PostgreSQL | MySQL | SQLite | Unit-only checks |
|---|---|---|---|---|
| Modules sharing a connection keep separate prepared statements | test_generator_options_preserve_runtime_values_and_generate_expected_layouts |
not MySQL (no server-side prepared statements) | not SQLite (statements are per call) | test_statements_are_named_after_the_module_and_query_class |
PostgreSQL statements dropped by DEALLOCATE ALL / DISCARD ALL, or refused after a column type change (cached plan must not change result type), are prepared again |
test_statements_are_prepared_again_after_deallocate_all, test_statements_are_prepared_again_after_a_column_type_change |
not MySQL (no server-side prepared statements) | not SQLite | test_statements_are_named_after_the_module_and_query_class |
PostgreSQL PREPARE interrupted (Timeout / Thread#raise, an exception raised by it) after the server ran it leaves the statement usable |
test_an_interrupt_during_prepare_leaves_the_statement_usable, test_a_statement_left_prepared_by_a_failed_prepare_is_used |
not MySQL (no server-side prepared statements) | not SQLite |
| Documented behavior | PostgreSQL | MySQL | SQLite | Unit-only checks |
|---|---|---|---|---|
| Logger debug format, transaction logs, secret-free parameters | test_logger_receives_query_names_and_durations |
test_logger_receives_query_names_and_durations |
test_logger_receives_query_names_and_durations |
test_logger_support |
| Documented behavior | PostgreSQL | MySQL | SQLite | Unit-only checks |
|---|---|---|---|---|
Duplicate result columns, unsupported options, invalid :copyfrom clauses and generation errors |
E2E cannot reach generation-time rejection | E2E cannot reach generation-time rejection | E2E cannot reach generation-time rejection | test_duplicate_result_columns_are_rejected, test_copyfrom_keeps_or_rejects_conflict_clauses, test_unknown_options_are_rejected_with_a_hint, test_query_names_cannot_replace_generated_methods |
SQLite parameters sqlc does not report (ON CONFLICT ... DO UPDATE SET) are generation errors |
not PostgreSQL | not MySQL | unit: rejected at generation | test_sqlite_parameters_sqlc_does_not_report_are_generation_errors, test_sqlite_placeholders_in_literals_and_comments_are_not_parameters |