https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13897 --- Comment #30 from Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> --- (In reply to Jonathan Druart from comment #29)
What about the following structure: ...
I do not think we should force to have the same number of fields. What if you want the default value for instance? That's not a big deal but I would prefer to get rid of this limitation since the beginning :)
Maybe I'm wrong but to do that we'll need to do a prepare/execute for each row, because we won't know which columns are necessary; and this could be slower ( https://docstore.mik.ua/orelly/linux/dbi/ch05_05.htm ) Columns must be absent on insert statement for them to use default values. It'll be equivalent to a $dbh->do() for each row. Or we can fill missing values with empty/NULL my @values = map { $row->{$_} ? $row->{$_} : NULL } @columns; for example, if we are going to use all column names in one prepare(). (do not like this) What about entries for many tables in a file? Note: I like your idea, simply don't know how to solve it. -- You are receiving this mail because: You are watching all bug changes.