[Koha-bugs] [Bug 7167] updatedatabase improvements

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Thu Jul 26 15:23:25 CEST 2012


http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7167

--- Comment #102 from Jared Camins-Esakov <jcamins at cpbibliography.com> ---
(In reply to comment #101)
> To provide a more robust script, we have to accept some compromises. For
> example, each .pl update version must contain a _get_queries routine to be
> called by a parent script. Perhaps it seems less easy to write, but I don't
> think so. Indeed, all the common part of code (like get a dbh, execute, get
> errors (or not), etc.) are factorised.

I like centralizing database access and eliminating direct use of dbh (at least
wherever possible). I have no objection to saving the SQL that was run, and did
not check the code to see if it works. If it doesn't and that is one of the
stated features, it should.

However, I don't like parsing the SQL ourselves. Why don't we just open the SQL
file, save the contents into the variable that stores the SQL, and run it
directly? Writing our own SQL parser is sure to come back and bite us.
Moreover, requiring special delimiters seems like an unnecessary burden.

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


More information about the Koha-bugs mailing list