xml2db 0.13.1__tar.gz → 0.13.2__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (34) hide show
  1. {xml2db-0.13.1/src/xml2db.egg-info → xml2db-0.13.2}/PKG-INFO +1 -1
  2. {xml2db-0.13.1 → xml2db-0.13.2}/pyproject.toml +1 -1
  3. {xml2db-0.13.1 → xml2db-0.13.2}/src/xml2db/table/table.py +10 -0
  4. {xml2db-0.13.1 → xml2db-0.13.2/src/xml2db.egg-info}/PKG-INFO +1 -1
  5. {xml2db-0.13.1 → xml2db-0.13.2}/LICENSE +0 -0
  6. {xml2db-0.13.1 → xml2db-0.13.2}/README.md +0 -0
  7. {xml2db-0.13.1 → xml2db-0.13.2}/setup.cfg +0 -0
  8. {xml2db-0.13.1 → xml2db-0.13.2}/src/xml2db/__init__.py +0 -0
  9. {xml2db-0.13.1 → xml2db-0.13.2}/src/xml2db/dialect/__init__.py +0 -0
  10. {xml2db-0.13.1 → xml2db-0.13.2}/src/xml2db/dialect/base.py +0 -0
  11. {xml2db-0.13.1 → xml2db-0.13.2}/src/xml2db/dialect/duckdb.py +0 -0
  12. {xml2db-0.13.1 → xml2db-0.13.2}/src/xml2db/dialect/mssql.py +0 -0
  13. {xml2db-0.13.1 → xml2db-0.13.2}/src/xml2db/dialect/mysql.py +0 -0
  14. {xml2db-0.13.1 → xml2db-0.13.2}/src/xml2db/dialect/postgresql.py +0 -0
  15. {xml2db-0.13.1 → xml2db-0.13.2}/src/xml2db/document.py +0 -0
  16. {xml2db-0.13.1 → xml2db-0.13.2}/src/xml2db/exceptions.py +0 -0
  17. {xml2db-0.13.1 → xml2db-0.13.2}/src/xml2db/model.py +0 -0
  18. {xml2db-0.13.1 → xml2db-0.13.2}/src/xml2db/table/__init__.py +0 -0
  19. {xml2db-0.13.1 → xml2db-0.13.2}/src/xml2db/table/column.py +0 -0
  20. {xml2db-0.13.1 → xml2db-0.13.2}/src/xml2db/table/duplicated_table.py +0 -0
  21. {xml2db-0.13.1 → xml2db-0.13.2}/src/xml2db/table/relations.py +0 -0
  22. {xml2db-0.13.1 → xml2db-0.13.2}/src/xml2db/table/reused_table.py +0 -0
  23. {xml2db-0.13.1 → xml2db-0.13.2}/src/xml2db/table/transformed_table.py +0 -0
  24. {xml2db-0.13.1 → xml2db-0.13.2}/src/xml2db/xml_converter.py +0 -0
  25. {xml2db-0.13.1 → xml2db-0.13.2}/src/xml2db.egg-info/SOURCES.txt +0 -0
  26. {xml2db-0.13.1 → xml2db-0.13.2}/src/xml2db.egg-info/dependency_links.txt +0 -0
  27. {xml2db-0.13.1 → xml2db-0.13.2}/src/xml2db.egg-info/requires.txt +0 -0
  28. {xml2db-0.13.1 → xml2db-0.13.2}/src/xml2db.egg-info/top_level.txt +0 -0
  29. {xml2db-0.13.1 → xml2db-0.13.2}/tests/test_bulk_insert.py +0 -0
  30. {xml2db-0.13.1 → xml2db-0.13.2}/tests/test_conversions.py +0 -0
  31. {xml2db-0.13.1 → xml2db-0.13.2}/tests/test_models_output.py +0 -0
  32. {xml2db-0.13.1 → xml2db-0.13.2}/tests/test_multiprocessing.py +0 -0
  33. {xml2db-0.13.1 → xml2db-0.13.2}/tests/test_roundtrip.py +0 -0
  34. {xml2db-0.13.1 → xml2db-0.13.2}/tests/test_validation.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: xml2db
3
- Version: 0.13.1
3
+ Version: 0.13.2
4
4
  Summary: Import complex XML files to a relational database
5
5
  Author-email: Commission de régulation de l'énergie <opensource@cre.fr>
6
6
  Project-URL: Documentation, https://cre-dev.github.io/xml2db
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "xml2db"
7
- version = "0.13.1"
7
+ version = "0.13.2"
8
8
  authors = [
9
9
  { name="Commission de régulation de l'énergie", email="opensource@cre.fr" },
10
10
  ]
@@ -180,6 +180,11 @@ class DataModelTable:
180
180
  raise ValueError(
181
181
  "attempting to add a 1-1 relationship with max occurrences different from 1"
182
182
  )
183
+ if (
184
+ name in self.relations_1
185
+ and self.relations_1[name].other_table.type_name == other_table.type_name
186
+ ):
187
+ return
183
188
  rel = DataModelRelation1(
184
189
  name,
185
190
  [(name, other_table.type_name)],
@@ -206,6 +211,11 @@ class DataModelTable:
206
211
  raise ValueError(
207
212
  "attempting to add a 1-n relationship with max occurrences equal to 1"
208
213
  )
214
+ if (
215
+ name in self.relations_n
216
+ and self.relations_n[name].other_table.type_name == other_table.type_name
217
+ ):
218
+ return
209
219
  rel = DataModelRelationN(
210
220
  name,
211
221
  [(name, other_table.type_name)],
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: xml2db
3
- Version: 0.13.1
3
+ Version: 0.13.2
4
4
  Summary: Import complex XML files to a relational database
5
5
  Author-email: Commission de régulation de l'énergie <opensource@cre.fr>
6
6
  Project-URL: Documentation, https://cre-dev.github.io/xml2db
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes