Skip to content

Database_Integration: separate import and export examples per language - #8

Merged
karlkauc merged 1 commit into
mainfrom
feature/db-integration-multilang
May 15, 2026
Merged

karlkauc merged 1 commit into
mainfrom
feature/db-integration-multilang

Conversation

@karlkauc

Copy link
Copy Markdown
Contributor

Follow-up to #7 (merged). Per request: import and export are now separate standalone programs, not one combined file — a developer can lift exactly the direction they need.

Language Import (FundsXML → DB) Export (DB → FundsXML)
Python python/import_fundsxml.py python/export_fundsxml.py
Java java/ImportFundsXml.java java/ExportFundsXml.java
JavaScript javascript/import_fundsxml.mjs javascript/export_fundsxml.mjs
C# csharp/import/ (own .csproj) csharp/export/ (own .csproj)

(The combined fundsxml_db.* / single csharp project are removed.)

  • Each program is self-contained (its own copy of the small kind/qty maps — nothing shared to import) and heavily commented as a teaching artifact. Import creates the schema in a fresh SQLite DB then loads; export reads it back. Uniform CLI: <import> <db> <xml> ; <export> <db> <docId> <out.xml>.
  • README + CI updated: run import then export, then xml_equiv + XSD, for all four languages on the multi-fund fixture (cross-language identical) plus the single-fund sample.

Verified locally end-to-end (Python, Java, JavaScript, C#): every language's exported file is xml_equiv-equal to the original input and to every other language's export, and XSD-valid; the single-fund Mixed-Fund_Positions.xml still round-trips XSD-valid.

🤖 Generated with Claude Code

Per request: import and export are now separate standalone programs (not one
combined file), so a developer lifts exactly the direction they need.

- python/   import_fundsxml.py   + export_fundsxml.py   (was fundsxml_db.py)
- java/     ImportFundsXml.java  + ExportFundsXml.java   (was FundsXmlDb.java)
- javascript/ import_fundsxml.mjs + export_fundsxml.mjs  (was fundsxml_db.mjs)
- csharp/import/ + csharp/export/  (separate .csproj each; was one project)

Each is self-contained (own copy of the small kind/qty maps) and heavily
commented. Import creates the schema in a fresh SQLite DB then loads; export
reads it back. CLI: <import> <db> <xml> ; <export> <db> <docId> <out.xml>.

README + CI updated to run import then export then xml_equiv + XSD for all
four languages on the multi-fund fixture (cross-language identical) plus the
single-fund sample. Verified locally end-to-end: every language's export is
xml_equiv-equal to the input and to each other, and XSD-valid.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@karlkauc
karlkauc merged commit 8daee09 into main May 15, 2026
2 checks passed
@karlkauc
karlkauc deleted the feature/db-integration-multilang branch May 15, 2026 20:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant