| 1 | package DBIO::ClickHouse::Test::Schema::HotHit; | ||
| 2 | # ABSTRACT: Test result class -- a non-virtual view over the hit table | ||
| 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__->table_class('DBIO::ResultSource::View'); | |
| 13 | 24 | __PACKAGE__->table('dbio_test_hot_hit'); | |
| 14 | |||
| 15 | 24 | __PACKAGE__->add_columns( | |
| 16 | id => { data_type => 'uuid', is_nullable => 0 }, | ||
| 17 | url => { data_type => 'varchar', size => 2048, is_nullable => 0 }, | ||
| 18 | hits => { data_type => 'integer', extra => { unsigned => 1 }, is_nullable => 0 } | ||
| 19 | ); | ||
| 20 | |||
| 21 | 24 | __PACKAGE__->set_primary_key('id'); | |
| 22 | |||
| 23 | 24 | __PACKAGE__->result_source_instance->view_definition( | |
| 24 | 'SELECT `id`, `url`, `hits` FROM `dbio_test_hit` WHERE `hits` >= 100' | ||
| 25 | ); | ||
| 26 | |||
| 27 | 24 | 1; | |
| 28 | |||
| 29 | __END__ | ||