Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 3bb3a4a5

Von Sven Schöling vor mehr als 8 Jahren hinzugefügt

  • ID 3bb3a4a56b0be39fd60f011137ffbadd9dba3fd7
  • Vorgänger 8d06fb89
  • Nachfolger 8b374ce4

GDPDU: Weitere fixes

Unterschiede anzeigen:

SL/GDPDU.pm
package SL::GDPDU;
# TODO:
# translations
# optional: background jobable
use strict;
......
# callbacks that produce the xml spec for these column types
my %column_types = (
'Rose::DB::Object::Metadata::Column::Integer' => sub { $_[0]->tag('Numeric', sub { $_[0]->tag('Accuracy', 0) }) },
'Rose::DB::Object::Metadata::Column::BigInt' => sub { $_[0]->tag('Numeric', sub { $_[0]->tag('Accuracy', 0) }) },
'Rose::DB::Object::Metadata::Column::Integer' => sub { $_[0]->tag('Numeric') }, # see Caveats for integer issues
'Rose::DB::Object::Metadata::Column::BigInt' => sub { $_[0]->tag('Numeric') }, # see Caveats for integer issues
'Rose::DB::Object::Metadata::Column::Text' => sub { $_[0]->tag('AlphaNumeric') },
'Rose::DB::Object::Metadata::Column::Varchar' => sub { $_[0]->tag('AlphaNumeric') },
'Rose::DB::Object::Metadata::Column::Character' => sub { $_[0]->tag('AlphaNumeric') },
......
->tag('DecimalSymbol', '.')
->tag('DigitGroupingSymbol', '|') # see CAVEATS in documentation
->tag('VariableLength', sub { $self
->tag('ColumnDelimiter', ',')
->tag('RecordDelimiter', '
')
->tag('ColumnDelimiter', ',') # see CAVEATS for missing RecordDelimiter
->tag('TextEncapsulator', '"')
->columns($table)
->foreign_keys($table)
......
sub do_csv_export {
my ($self, $table) = @_;
my $csv = Text::CSV_XS->new({ binary => 1, eol => "\n", sep_char => ",", quote_char => '"' });
my $csv = Text::CSV_XS->new({ binary => 1, eol => "\r\n", sep_char => ",", quote_char => '"' });
my ($fh, $filename) = File::Temp::tempfile();
binmode($fh, ':utf8');
......
=item *
Number pasing seems to be fragile. Official docs state that behaviour for too
low C<Accuracy> settings is undefined.
Number parsing seems to be fragile. Official docs state that behaviour for too
low C<Accuracy> settings is undefined. Accuracy of 0 is not taken to mean
Integer but instead generates a warning for redudancy.
There is no dedicated integer type.
......
L<http://www.gdpdu-portal.com/forum/index.php?mode=thread&id=1392>
=item *
It is not possible to define a C<RecordDelimiter> with XML entities. &#x0A;
generates the error message:
C<RecordDelimiter>-Wert (&#x0A;) sollte immer aus ein oder zwei Zeichen
bestehen.
Instead we just use the implicit default RecordDelimiter CRLF.
=item *
Not confirmed yet:
Foreign keys seem only to work with previously defined tables (which would be
utterly insane).
=back
=head1 AUTHOR

Auch abrufbar als: Unified diff