Help for this page

Select Code to Download


  1. or download this
    $schema->resultset("Thing")->search({ ... })->prefetch('last_event')->
    +all
    
  2. or download this
    SELECT me.*, thing_max_event.* FROM thing me
    LEFT JOIN thing_event thing_max_event ON thing_max_event.id = (
    ...
      ORDER BY timestamp DESC
    )
    WHERE ...
    
  3. or download this
    package App::Schema::ResultSet::ThingEvent;
    
    ...
          unsafe_subselect_ok => 1
       });
    }
    
  4. or download this
    package App::Schema::Result::Thing;
    
    ...
          }
       };
    });
    
  5. or download this
    package App::Schema;
    
    ...
       my ($self, $new_dialect_value)= @_;
       MSSQL_LimitDialectFlipper->new($self->storage, $new_dialect_value);
    }
    
  6. or download this
    $schema->resultset("Thing")->join('last_event_of_type1','last_event_of
    +_type2')
      ->where('last_event_of_type1.timestamp' => { '>=', $cutoff1 },
              'last_event_of_type2.timestamp' => { '<', $cutoff2 });