Skip to content

Commit

Permalink
Merge branch 'master' into index-length
Browse files Browse the repository at this point in the history
  • Loading branch information
rabbiveesh committed Nov 25, 2023
2 parents 28d3d2f + 13649ce commit a2d2e6c
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 11 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,4 @@ jobs:
- name: Set up
run: perl Makefile.PL
- name: Run Tests
run: prove -lj4 t
run: prove -lj4 t xt
2 changes: 1 addition & 1 deletion .github/workflows/macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@ jobs:
- name: Set up
run: perl Makefile.PL
- name: Run Tests
run: prove -lj4 t
run: prove -lj4 t xt
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 a2d2e6c

Please sign in to comment.