feat: add BigQueryMockTable class for explicit three-part naming #134
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Introduces
BigQueryMockTableclass to provide clean, explicit support for BigQuery's three-part naming scheme (project.dataset.table).Previously, BigQuery mock tables had to awkwardly cram project and dataset together into the
database_namefield. The new class makes each component explicit using simple class variables.Changes
Implementation
BigQueryMockTableclass insrc/sql_testing_library/_mock_table.pybigquery_project,bigquery_dataset,bigquery_tableBaseMockTableinterfaceTests
tests/test_bigquery_mock_table.pytests/integration/test_bigquery_integration.pyDocumentation
README.mdwith BigQueryMockTable examples and benefitsdocs/adapters.mdwith detailed BigQuery-specific sectiondocs/api-reference.mdwith complete API documentationdocs/examples.mdwith practical usage examplesexamples/folder files (redundant with inline documentation)Example Usage
Before (Awkward)
After (Clean)
Inheritance Pattern
Benefits
BaseMockTablemethodsTest Results