Branch Coverage

blib/lib/App/Sqitch/Engine/clickhouse.pm
Criterion Covered Total %
branch 111 122 90.9


line true false branch
33 8 19 if (not $uri->host and my $host = $ENV{'CLICKHOUSE_HOST'} || $cfg->{'host'})
36 9 18 if (not $uri->dbname and my $db = $cfg->{'database'})
42 1 26 if not $uri->_port and ($cfg->{'port'} || 0) == 9440
46 2 23 if ($cfg->{'secure'} or ($cfg->{'port'} || 0) == 9440 or ($uri->host || '') =~ /\.clickhouse(?:-staging)?\.cloud\z/)
51 3 1 unless $uri->query_param("SSLMode")
58 8 19 if (my $tls = $cfg->{'tls'})
64 5 17 if (my $val = $$tls{$map->[0]})
65 2 3 if (my $p = $uri->query_param($map->[1]))
69 1 1 if $p ne $val
87 5 2 if (my $mode = $tls->{'verificationMode'} and not $uri->query_param("SSLMode"))
91 2 3 if ($mode eq 'strict' or $mode eq 'once') { }
2 1 elsif ($mode eq 'relaxed') { }
116 1 1 if ($uri->password)
127 0 6 unless @{$doc;} > 0
135 36 22 if @{$n;} == 1 and $n->[0]{'type'} eq "t"
139 1 52 if $c->{'type'} ne "e"
140 2 50 if (my $prev = $$hash{$c->{'name'}}) { }
142 1 1 unless ref $prev eq "ARRAY"
154 5 20 if &looks_like_number($val)
173 5 10 exists $cfg->{'secure'} ? :
177 2 13 if (my $tls = $cfg->{'openSSL'})
178 1 1 if $tls->{'client'}
183 4 11 unless my $creds = $cfg->{'connections_credentials'}
184 1 10 unless my $conns = $creds->{'connection'}
185 6 4 ref $conns eq 'ARRAY' ? :
186 4 10 unless ($c->{'name'} || '') eq $host
187 1 9 if (exists $c->{'secure'})
190 7 3 if $c->{'hostname'}
214 96 6 unless -f $path
215 2 4 $ext eq 'xml' ? :
227 8 1 unless $ENV{'CLICKHOUSE_USER'}
228 9 1 unless $ENV{'CLICKHOUSE_PASSWORD'}
238 1 0 unless ($uri->host)
283 3 7 unless $uri->dbname
289 9 1 unless $ret[0] =~ /-client(?:[.]exe)?$/
298 19 21 if $spec->[1]
302 1 9 if (my(%vars) = $self->variables)
315 1 9 if (my(@p) = $uri->query_params)
318 1 1 if ($k eq 'sslmode') { }
1 0 elsif ($k eq 'nativeport') { }
332 8 2 unless ($have_port)
334 2 6 if $http_port == 8443 or $http_port == 443
348 0 2 $^O eq 'cygwin' ? :
357 0 22 if -f $path and -x $path
389 1 5 if $lim and $off
390 2 3 if $lim
391 1 2 if $off
400 2 9 unless $_[1]
402 1 8 unless $list
403 2 6 if @{$list;} and $list->[0] eq ""
420 2 2 if $DBI::state and $DBI::state eq "HY000"
427 0 0 if $self->initialized
467 0 3 $offset ? :
477 1 2 if $self->_no_table_error and not $self->initialized
656 1 0 unless my(@tags) = $change->tags
676 0 0 unless @tags
727 3 1 unless my $pass = $self->password
735 2 1 unless my $pass = $self->password
744 2 1 unless my $pass = $self->password
757 1 1 $self->sqitch->verbosity > 1 ? :
765 1 1 if ((my $idx = &firstidx(sub {