« blib/lib/ElasticSearchX/Model/Document/Trait/Field/TTL.pm
↑ Summary
blib/lib/ElasticSearchX/Model/Scroll.pm »
| 1 | # | ||
| 2 | # This file is part of ElasticSearchX-Model | ||
| 3 | # | ||
| 4 | # This software is Copyright (c) 2018 by Moritz Onken. | ||
| 5 | # | ||
| 6 | # This is free software, licensed under: | ||
| 7 | # | ||
| 8 | # The (three-clause) BSD License | ||
| 9 | # | ||
| 10 | package ElasticSearchX::Model::Document::Trait::Field::Timestamp; | ||
| 11 | 3 | $ElasticSearchX::Model::Document::Trait::Field::Timestamp::VERSION = '1.0.3'; | |
| 12 | 3 | ▶ | use Moose::Role; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 13 | 3 | ▶ | use ElasticSearchX::Model::Document::Types qw(:all); |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 14 | |||
| 15 | 3 | has timestamp => ( | |
| 16 | is => 'rw', | ||
| 17 | isa => TimestampField, | ||
| 18 | coerce => 1, | ||
| 19 | predicate => 'has_timestamp', | ||
| 20 | ); | ||
| 21 | |||
| 22 | 0 | ▶ | around mapping => sub { () }; |
|
Subroutine
__ANON__: not called CC=1 SCAR=1.2
| |||
| 23 | |||
| 24 | around type_mapping => sub { | ||
| 25 | 0 | ▶ | my ( $orig, $self ) = @_; |
|
Subroutine
__ANON__: not called CC=1 SCAR=6.9
| |||
| 26 | 0 | return ( _timestamp => $self->timestamp ); | |
| 27 | 3 | }; | |
| 28 | |||
| 29 | 0 | ▶ | around field_name => sub {'_timestamp'}; |
|
Subroutine
__ANON__: not called CC=1 SCAR=1.2
| |||
| 30 | |||
| 31 | 0 | ▶ | around query_property => sub {1}; |
|
Subroutine
__ANON__: not called CC=1 SCAR=1.2
| |||
| 32 | |||
| 33 | 0 | ▶ | around property => sub {0}; |
|
Subroutine
__ANON__: not called CC=1 SCAR=1.2
| |||
| 34 | |||
| 35 | package ElasticSearchX::Model::Document::Trait::Class::Timestamp; | ||
| 36 | 3 | $ElasticSearchX::Model::Document::Trait::Class::Timestamp::VERSION = '1.0.3'; | |
| 37 | 3 | ▶ | use Moose::Role; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 38 | |||
| 39 | 3 | 1; | |
| 40 | |||
| 41 | __END__ | ||
| 42 | |||
| 43 | =pod | ||
| 44 | |||
| 45 | =encoding UTF-8 | ||
| 46 | |||
| 47 | =head1 NAME | ||
| 48 | |||
| 49 | ElasticSearchX::Model::Document::Trait::Field::Timestamp | ||
| 50 | |||
| 51 | =head1 VERSION | ||
| 52 | |||
| 53 | version 1.0.3 | ||
| 54 | |||
| 55 | =head1 AUTHOR | ||
| 56 | |||
| 57 | Moritz Onken | ||
| 58 | |||
| 59 | =head1 COPYRIGHT AND LICENSE | ||
| 60 | |||
| 61 | This software is Copyright (c) 2018 by Moritz Onken. | ||
| 62 | |||
| 63 | This is free software, licensed under: | ||
| 64 | |||
| 65 | The (three-clause) BSD License | ||
| 66 | |||
| 67 | =cut | ||