This repository has been archived by the owner on May 17, 2024. It is now read-only.
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.
Little improvements step by step:
Random sampling & time traveling AST nodes, methods and mixins are not used in the codebase at all. We can safely remove them. When and if needed, we will restore and reimplement them.
The schema fetching is a bit more complicated: there are 2 schema fetching logics in the code. The one that is actually used is
Database.select_table_schema()
&Database.query_table_schema()
. The one in the mixins (list_tables()
&table_information()
) is unused. Hence, we can remove it too.On a matter of whether we want to move the schema fetching from databases to dialects: probably not. Some databases can expose their schemas via non-SQL APIs, such as HTTP API, so it should remain in the database. The dialect should only do the SQL rendering. If we would like to generalize it, we will do this later anew.
On a side note: The split of Databases & Dialects is also conditional, only for simplicity of testing the SQL rendering without real connection to the database, and vice versa. There would be no much problem in merging the paired classes or their methods if needed.