ClickHouse/Test/Schema/Snapshot.pm

filter: Statementstmt 100% 17 / 17 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 3 / 3 Podpod n/a totaltotal 100% 20 / 20 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« ClickHouse/Test/Schema/Reading.pm ↑ Summary ClickHouse/Test/Schema/Unsorted.pm »
1 package DBIO::ClickHouse::Test::Schema::Snapshot;
2 # ABSTRACT: Test result class -- a ReplacingMergeTree table for FINAL
3  
4 24 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 24 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
6  
7 24 our $VERSION = '0.900007';
8  
9 24 ▶use base 'DBIO::Core';
Subroutine BEGIN: called CC=1 SCAR=0.0
10  
11  
12 24 __PACKAGE__->load_components('ClickHouse::Result');
13  
14 24 __PACKAGE__->table('dbio_test_snapshot');
15  
16 24 __PACKAGE__->add_columns(
17 id => { data_type => 'integer', is_nullable => 0 },
18 label => { data_type => 'varchar', size => 64, is_nullable => 0 },
19 version => { data_type => 'bigint', extra => { unsigned => 1 }, is_nullable => 0 }
20 );
21  
22 24 __PACKAGE__->set_primary_key('id');
23  
24 24 __PACKAGE__->has_many(
25 hits => 'DBIO::ClickHouse::Test::Schema::Hit',
26 { 'foreign.snapshot' => 'self.id' }
27 );
28  
29 24 __PACKAGE__->clickhouse_table({
30 engine => 'ReplacingMergeTree(version)',
31 order_by => ['id']
32 });
33  
34 24 1;
35  
36 __END__
« ClickHouse/Test/Schema/Reading.pm ↑ Summary ClickHouse/Test/Schema/Unsorted.pm »