Skip to content

Tags: cre-dev/xml2db

Tags

0.14.0

Toggle 0.14.0's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Fixes and docs (#73)

* Fix inserted rows count to avoid returning 0 when the count is not returned by the backend
* Add zooming capability in `xml2db serve`
* Write documentation for CLI usage
* Several documentation editing

---------
Co-authored-by: Claude <noreply@anthropic.com>

0.13.3

Toggle 0.13.3's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Fix DuckDB bulk_insert failing when quoted CSV cells fall outside sni…

…ffer sample (#64)

* Fix DuckDB bulk_insert failing when quoted CSV cells fall outside sniffer sample (#62)

DuckDB's read_csv sniffer only examines the first ~20 480 rows; if none are
quoted, it sets quote=(empty) and then errors on any later quoted cell with a
column-count mismatch.  Passing quote='"' explicitly bypasses auto-detection.
Adds a regression test that inserts 25 000 plain rows followed by one row
whose value contains a comma (triggering csv.writer quoting).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* Bump version to 0.13.3

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* Add explicit escape='\"' to read_csv alongside quote='\"'

Makes the RFC 4180 doubling behaviour explicit rather than relying on
DuckDB defaulting escape to the same char as quote.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>

0.13.2

Toggle 0.13.2's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Fix KeyError when xs:choice branches share an element with same name …

…and type (#60)

* Fix KeyError when xs:choice branches share an element with same name and type

In add_relation_1/add_relation_n, skip duplicate relations where a field with
the same name and same XSD type already exists. Previously, self.fields (a list)
accumulated both occurrences while self.relations_1/n (dicts) only kept the last,
causing a KeyError in simplify_table when the first occurrence was elevated and
the second tried to look it up.

Add deliveryType to the orders crash-test schema to cover this case, with
order3.xml exercising both the sequence branch (from+to) and standalone branch (to).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* Bump version from 0.13.1 to 0.13.2

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>

0.13.1

Toggle 0.13.1's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Document and test multiprocessing pattern for concurrent XML loading (#…

…58)

Adds a test_multiprocessing.py test (parallel parse + serialised DuckDB writes via multiprocessing.Lock, with XML roundtrip content assertion) and a matching example in the API overview docs. Each worker creates its own DataModel with a unique temp_prefix so temp tables never collide. Bumps version to 0.13.1.

0.13.0

Toggle 0.13.0's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Add DatabaseDialect and implement identifiers truncation (#54)

* Added a DatabaseDialect class hierarchy (base, postgresql, mssql, mysql, duckdb), one subclass per backend, to abstract db specific logic and avoid conditionnals scattered in the code
* Implement truncation of database identifiers, because long names was an issue frequently found especially with postgresql. Each db dialect sets its own limit
* Remove Python 3.9 support (EOL) and add Python 3.14 to the test matrix
* Bump version
---------

Co-authored-by: cre-os <opensource@cre.fr>

0.12.6

Toggle 0.12.6's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Allow xsd:any types (#52)

* Allow xsd:any types by dropping corresponding data

* Bump version

---------

Co-authored-by: cre-os <opensource@cre.fr>

0.12.5

Toggle 0.12.5's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Fix models tree repr (#33)

Add a test for stable source and target tree repr

Co-authored-by: cre-os <opensource@cre.fr>

0.12.4

Toggle 0.12.4's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Move hashing after conversion (#22)

Changed the way hashes are computed in order to compute them after converting data types, so that data which is at the identical in the database result in identical hashes.

---------

Co-authored-by: cre-os <opensource@cre.fr>

0.12.3

Toggle 0.12.3's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Fix integer enumeration parsing (#14)

Schema parsing failed with integer enumeration, because we tried to get field size from the enumeration elements `len`, which does not work for `int`

0.12.2

Toggle 0.12.2's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Switch to lxml XSD validator (#12)

* Add imported XSD schema to test cases
* Switch XML validator to lxml
* Improve docs