Skip to content

Commit

Permalink
Merge branch 'master' into test-also-xt
Browse files Browse the repository at this point in the history
  • Loading branch information
rabbiveesh committed Nov 25, 2023
2 parents e7d8077 + 76cfd1f commit 641128f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 9 deletions.
2 changes: 1 addition & 1 deletion lib/SQL/Translator/Parser/SQLite.pm
Original file line number Diff line number Diff line change
Expand Up @@ -681,7 +681,7 @@ sub parse {
size => $fdata->{'size'},
default_value => $fdata->{'default'},
is_auto_increment => $fdata->{'is_auto_inc'},
($fdata->{'is_auto_inc'}? ( extra => { auto_increment_type => 'monotonic' } ) : ()),
($fdata->{'is_auto_inc'}? ( extra => { auto_increment_type => 'monotonic' } ) : ()),
is_nullable => $fdata->{'is_nullable'},
comments => $fdata->{'comments'},
) or die $table->error;
Expand Down
12 changes: 4 additions & 8 deletions lib/SQL/Translator/Producer/Dumper.pm
Original file line number Diff line number Diff line change
Expand Up @@ -232,17 +232,13 @@ for my $table ( @tables ) {
my @vals;
for my $fld ( @{ $table->{'fields'} } ) {
my $val = $rec->{ $fld };
if ( $table->{'types'}{ $fld } eq 'string' ) {
if ( defined $val ) {
if ( defined $val ) {
if ( $table->{'types'}{ $fld } eq 'string' ) {
$val =~ s/'/\\'/g;
$val = qq['$val']
}
else {
$val = qq[''];
}
}
else {
$val = defined $val ? $val : $mysql_loadfile ? '\N' : 'NULL';
} else {
$val = $mysql_loadfile ? '\N' : 'NULL';
}
push @vals, $val;
}
Expand Down

0 comments on commit 641128f

Please sign in to comment.