| 1 | package SQLite::VecDB::Result; | ||
| 2 | # ABSTRACT: Search result from SQLite::VecDB | ||
| 3 | 7 | our $VERSION = '0.001'; | |
| 4 | |||
| 5 | 7 | ▶ | use Moose; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 6 | |||
| 7 | 0 | ▶ | use overload '""' => sub { $_[0]->id }, fallback => 1; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.2
Subroutine
__ANON__: not called CC=1 SCAR=0.2
| |||
| 8 | |||
| 9 | 7 | has id => ( | |
| 10 | is => 'ro', | ||
| 11 | isa => 'Str', | ||
| 12 | required => 1, | ||
| 13 | ); | ||
| 14 | |||
| 15 | |||
| 16 | 7 | has distance => ( | |
| 17 | is => 'ro', | ||
| 18 | isa => 'Num', | ||
| 19 | ); | ||
| 20 | |||
| 21 | |||
| 22 | has metadata => ( | ||
| 23 | is => 'ro', | ||
| 24 | isa => 'HashRef', | ||
| 25 | 0 | ▶ | default => sub { {} }, |
|
Subroutine
__ANON__: not called CC=1 SCAR=6.9
| |||
| 26 | 7 | ); | |
| 27 | |||
| 28 | |||
| 29 | 7 | has content => ( | |
| 30 | is => 'ro', | ||
| 31 | isa => 'Str', | ||
| 32 | predicate => 'has_content', | ||
| 33 | ); | ||
| 34 | |||
| 35 | |||
| 36 | 7 | has vector => ( | |
| 37 | is => 'ro', | ||
| 38 | isa => 'ArrayRef[Num]', | ||
| 39 | predicate => 'has_vector', | ||
| 40 | ); | ||
| 41 | |||
| 42 | |||
| 43 | 7 | __PACKAGE__->meta->make_immutable; | |
| 44 | |||
| 45 | 7 | 1; | |
| 46 | |||
| 47 | __END__ | ||