feat (conf file): add exclude/include parameter#78
Merged
Conversation
Preview build readyBinaries for commit d8efa2c are available at:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This pull request introduces significant improvements to the handling of primary keys, foreign keys, and type inference in the codebase, especially for multi-column primary keys and MongoDB-to-Postgres export logic. It also adds comprehensive tests to ensure correctness for these scenarios. The changes enhance support for tables with composite primary keys, improve the mapping of MongoDB IDs, and simplify type inference logic.
Primary key and foreign key handling:
TableNodeand related logic insrc/export.rsto support multiple primary key columns (pk_cols: Vec<String>) instead of a singlepk_col, updating all related usages and row extraction logic to handle composite keys. [1] [2] [3] [4] [5]parse_sqlinsrc/schema_diagram.rsto correctly parse and mark table-level (including multi-column) primary keys, removing the need for a fake primary key column. Added a helper function for parsing primary key columns and tests to verify correct marking of PK columns. [1] [2] [3]src/to_pg.rsto support multiple foreign key columns (parent_ref: Option<Vec<(String, String, String)>>), and updated child table creation logic to generate appropriate foreign key columns for both single and multi-column PKs. [1] [2] [3] [4] [5] [6]MongoDB to Postgres export improvements:
_idfields to the appropriate SQL columns, including handling of flattened object ID fields for composite PKs, and added tests to verify correct row extraction for both composite and scalar IDs. [1] [2]Type inference and simplification:
src/to_pg.rsby removing thenumeric_string_pg_typefunction, and ensuring that number fields are mapped toINTEGER,BIGINT, orDOUBLE PRECISIONas appropriate, and mapping MongoDBObjectIdtoTEXTinstead ofUUID. [1] [2] [3] [4]Analyzer improvements:
src/analyzer.rsso that empty arrays do not count as present for probability calculations, and added a test to verify this behavior. [1] [2]These changes collectively improve the correctness, flexibility, and maintainability of the codebase, especially for complex database schemas and MongoDB-to-Postgres export scenarios.