aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/FixMyStreet/DB/Result/Nearby.pm
blob: adeba703a2271f3836f13271353eb0ba0245fb53 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
package FixMyStreet::DB::Result::Nearby;

# Thanks to http://www.perlmonks.org/?node_id=633800

use strict;
use warnings;

use base 'DBIx::Class::Core';
use Moo;
use namespace::clean -except => [ 'meta' ];

__PACKAGE__->table( 'NONE' );
__PACKAGE__->add_columns(
  "problem_id",
  { data_type => "integer", is_nullable => 0 },
  "distance",
  { data_type => "double precision", is_nullable => 0 },
);
__PACKAGE__->belongs_to(
  "problem",
  "FixMyStreet::DB::Result::Problem",
  { id => "problem_id" },
  { is_deferrable => 1 },
);

# Make a new ResultSource based on the User class
__PACKAGE__->result_source_instance
    ->name( \'problem_find_nearby(?,?,?)' );

1;