blob: 4ce4d33fbc33b8b7c1b34453724ba6477a48d3c5 [file] [log] [blame]
Akron61e8bce2017-05-24 15:55:27 +02001package Krawfish::Koral::Query::Constraint::NotBetween;
2use Krawfish::Query::Constraint::NotBetween;
Akron61e8bce2017-05-24 15:55:27 +02003use strict;
4use warnings;
5
6sub new {
7 my $class = shift;
8 bless {
9 query => shift
10 }, $class;
11};
12
13sub to_string {
14 my $self = shift;
Akron52751e62017-05-25 02:31:37 +020015 return 'notBetween=' . $self->{query}->to_string;
Akron61e8bce2017-05-24 15:55:27 +020016};
17
18sub plan_for {
19 my ($self, $index) = @_;
Akron617871f2017-05-27 02:05:31 +020020 my $query;
21
22 unless ($query = $self->{query}->plan_without_classes_for($index)) {
23 # TODO something like this: $self->copy_info_from($self->span);
24 return;
25 };
26
27 # Span has no match
28 if ($query->freq == 0) {
29 return;
30 };
31
32 return Krawfish::Query::Constraint::NotBetween->new($query);
Akron61e8bce2017-05-24 15:55:27 +020033};
34
351;