NAME

App::Dochazka::REST::Model::Schedintvls - object class for "scratch schedules"

SYNOPSIS

use App::Dochazka::REST::Model::Schedintvls;

...

METHODS

populate

Populate the schedintvls object (called automatically by 'reset' method which is, in turn, called automatically by 'spawn')

load

Instance method. Once the scratch intervals are inserted, we have a fully populated object. This method runs each scratch interval through the stored procedure 'translate_schedintvl' -- upon success, it creates a new attribute, $self->{schedule}, containing the translated intervals.

insert

Instance method. Attempts to INSERT one or more records (one for each interval in the 'intvls' attribute) into the 'schedintvls' table. Field values are taken from the object. Returns a status object.

update

There is no update method for schedintvls. Instead, delete and re-create.

delete

Instance method. Once we are done with the scratch intervals, they can be deleted. Returns a status object.

json

Instance method. Returns a JSON string representation of the schedule.

FUNCTIONS

Exported functions

Non-exported functions

_next_scratch_sid

Get next value from the scratch_sid_seq sequence

AUTHOR

Nathan Cutler, <presnypreklad@gmail.com>