NAME

Doodle::Relation::Helpers

ABSTRACT

Doodle Relation Helpers

SYNOPSIS

use Doodle::Relation;

my $self = Doodle::Relation->new(
  column => 'profile_id',
  ftable => 'profiles',
  fcolumn => 'id'
);

DESCRIPTION

Helpers for configuring Relation classes.

METHODS

This package implements the following methods.

on_delete

on_delete(Str $action) : Relation

Denote the "ON DELETE" action for a foreign key constraint and returns the Relation.

on_delete example
my $on_delete = $self->on_delete('cascade');

on_update

on_update(Str $action) : Relation

Denote the "ON UPDATE" action for a foreign key constraint and returns the Relation.

on_update example
my $on_update = $self->on_update('cascade');