xml2db 0.12.2__tar.gz → 0.12.3__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 (26) hide show
  1. {xml2db-0.12.2/src/xml2db.egg-info → xml2db-0.12.3}/PKG-INFO +1 -1
  2. {xml2db-0.12.2 → xml2db-0.12.3}/pyproject.toml +1 -1
  3. {xml2db-0.12.2 → xml2db-0.12.3}/src/xml2db/model.py +1 -1
  4. {xml2db-0.12.2 → xml2db-0.12.3}/src/xml2db/table/column.py +2 -2
  5. {xml2db-0.12.2 → xml2db-0.12.3/src/xml2db.egg-info}/PKG-INFO +1 -1
  6. {xml2db-0.12.2 → xml2db-0.12.3}/LICENSE +0 -0
  7. {xml2db-0.12.2 → xml2db-0.12.3}/README.md +0 -0
  8. {xml2db-0.12.2 → xml2db-0.12.3}/setup.cfg +0 -0
  9. {xml2db-0.12.2 → xml2db-0.12.3}/src/xml2db/__init__.py +0 -0
  10. {xml2db-0.12.2 → xml2db-0.12.3}/src/xml2db/document.py +0 -0
  11. {xml2db-0.12.2 → xml2db-0.12.3}/src/xml2db/exceptions.py +0 -0
  12. {xml2db-0.12.2 → xml2db-0.12.3}/src/xml2db/table/__init__.py +0 -0
  13. {xml2db-0.12.2 → xml2db-0.12.3}/src/xml2db/table/duplicated_table.py +0 -0
  14. {xml2db-0.12.2 → xml2db-0.12.3}/src/xml2db/table/relations.py +0 -0
  15. {xml2db-0.12.2 → xml2db-0.12.3}/src/xml2db/table/reused_table.py +0 -0
  16. {xml2db-0.12.2 → xml2db-0.12.3}/src/xml2db/table/table.py +0 -0
  17. {xml2db-0.12.2 → xml2db-0.12.3}/src/xml2db/table/transformed_table.py +0 -0
  18. {xml2db-0.12.2 → xml2db-0.12.3}/src/xml2db/xml_converter.py +0 -0
  19. {xml2db-0.12.2 → xml2db-0.12.3}/src/xml2db.egg-info/SOURCES.txt +0 -0
  20. {xml2db-0.12.2 → xml2db-0.12.3}/src/xml2db.egg-info/dependency_links.txt +0 -0
  21. {xml2db-0.12.2 → xml2db-0.12.3}/src/xml2db.egg-info/requires.txt +0 -0
  22. {xml2db-0.12.2 → xml2db-0.12.3}/src/xml2db.egg-info/top_level.txt +0 -0
  23. {xml2db-0.12.2 → xml2db-0.12.3}/tests/test_conversions.py +0 -0
  24. {xml2db-0.12.2 → xml2db-0.12.3}/tests/test_models_output.py +0 -0
  25. {xml2db-0.12.2 → xml2db-0.12.3}/tests/test_roundtrip.py +0 -0
  26. {xml2db-0.12.2 → xml2db-0.12.3}/tests/test_validation.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: xml2db
3
- Version: 0.12.2
3
+ Version: 0.12.3
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.12.2"
7
+ version = "0.12.3"
8
8
  authors = [
9
9
  { name="Commission de régulation de l'énergie", email="opensource@cre.fr" },
10
10
  ]
@@ -384,7 +384,7 @@ class DataModel:
384
384
  else None
385
385
  )
386
386
  ae = ae and bt_ae if ae is not None and bt_ae is not None else None
387
- if elem_type.enumeration is not None:
387
+ if elem_type.enumeration is not None and dt in ["string", "NMTOKEN", "duration", "token"]:
388
388
  mil = min([len(val) for val in elem_type.enumeration])
389
389
  mal = max([len(val) for val in elem_type.enumeration])
390
390
  return dt, mil, mal, ae
@@ -32,7 +32,7 @@ def types_mapping_default(temp: bool, col: "DataModelColumn") -> Any:
32
32
  """
33
33
  if col.occurs[1] != 1:
34
34
  return String(8000)
35
- if col.data_type in ["decimal", "float"]:
35
+ if col.data_type in ["decimal", "float", "double"]:
36
36
  return Double
37
37
  if col.data_type == "dateTime":
38
38
  return DateTime(timezone=True)
@@ -77,7 +77,7 @@ def types_mapping_mssql(temp: bool, col: "DataModelColumn") -> Any:
77
77
  """
78
78
  if col.occurs[1] != 1:
79
79
  return mssql.VARCHAR(8000)
80
- if col.data_type in ["decimal", "float"]:
80
+ if col.data_type in ["decimal", "float", "double"]:
81
81
  return Double
82
82
  if col.data_type == "dateTime":
83
83
  # using the DATETIMEOFFSET directly in the temporary table caused issues when inserting data in the target
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: xml2db
3
- Version: 0.12.2
3
+ Version: 0.12.3
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