[Koha-bugs] [Bug 13897] Use XML files for installer data

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Tue Dec 17 09:57:24 CET 2019


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13897

--- Comment #16 from Jonathan Druart <jonathan.druart at bugs.koha-community.org> ---
(In reply to Bernardo Gonzalez Kriegel from comment #11)
> (In reply to Jonathan Druart from comment #9)
> > Hola Bernado,
> > I like the idea, but not XML, neither the MySQL only limitation.
> 
> Salut Jonathan,
> I don't like XML either, nor the MySQL only. 
> Just remember that I was thinking in translations, and xml support it's
> included right now.
> But yaml can be handled.
> 
> > Why not write our own stuff, yml-based?
> 
> No problem, I'll write a POC patch, but have a question:
> 
> Do you think the sequence 
>  a) Read YAML > Write $tmp/out.sql >
> DBIx_::RunSQL->run_sql_file($tmp/out.sql) 
> is a valid approach, or
>  b) Read YAML > Insert into DB somehow 
> it's better?
> I suppose b) is slower.

I would:
- Retrieve and parse the whole YAML file
- Generate the SQL queries (like 1 per table)
- Execute the INSERT statements (using DBIx::RunSQL->run_sql)

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list