Updated query2json, and tidied query2csv

This commit is contained in:
Dave Morriss
2025-05-07 10:06:01 +01:00
parent 118ee00677
commit 586c8e537e
2 changed files with 529 additions and 66 deletions

View File

@@ -49,7 +49,7 @@ use Data::Dumper;
our $VERSION = '0.0.4';
#
# Script and directory names
# Script name
#
( my $PROG = $0 ) =~ s|.*/||mx;
@@ -141,6 +141,9 @@ _debug( $DEBUG >= 3, '$query: ' . Dumper(\$query) );
$pcount = grep {/\?/} split( '', $query );
$acount = scalar(@dbargs);
#
# Check the placeholder and argument counts are the same
#
if ( $pcount ne $acount) {
say STDERR "Query placeholder vs argument mismatch";
say STDERR "Placeholders = $pcount, Arguments = $acount";
@@ -543,8 +546,8 @@ MySQL/MariaDB format:
<database>
dbtype = MySQL
host = 127.0.0.1
name = hpr_hpr
user = hpradmin
name = DBNAME
user = DBUSER
password = PASSWORD
</database>