The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Doodle::Relation

ABSTRACT

Doodle Relation Class

SYNOPSIS

  use Doodle;
  use Doodle::Relation;
  use Doodle::Table;

  my $ddl = Doodle->new;

  my $table = Doodle::Table->new(
    name => 'users',
    doodle => $ddl
  );

  my $self = Doodle::Relation->new(
    table => $table,
    column => 'person_id',
    foreign_table => 'persons',
    foreign_column => 'id'
  );

DESCRIPTION

This package provides a representation of a table relation.

INTEGRATES

This package integrates behaviors from:

Doodle::Relation::Helpers

LIBRARIES

This package uses type constraints from:

Doodle::Library

ATTRIBUTES

This package has the following attributes:

column

  column(Str)

This attribute is read-only, accepts (Str) values, and is required.

data

  data(Data)

This attribute is read-only, accepts (Data) values, and is optional.

foreign_column

  foreign_column(Str)

This attribute is read-only, accepts (Str) values, and is required.

foreign_table

  foreign_table(Str)

This attribute is read-only, accepts (Str) values, and is required.

name

  name(Str)

This attribute is read-only, accepts (Str) values, and is optional.

table

  table(Table)

This attribute is read-only, accepts (Table) values, and is required.

METHODS

This package implements the following methods:

create

  create(Any %args) : Command

Registers a relation create and returns the Command object.

create example #1
  # given: synopsis

  my $create = $self->create;

delete

  delete(Any %args) : Command

Registers a relation update and returns the Command object.

delete example #1
  # given: synopsis

  my $delete = $self->delete;

doodle

  doodle(Any %args) : Doodle

Returns the associated Doodle object.

doodle example #1
  # given: synopsis

  my $doodle = $self->doodle;

AUTHOR

Al Newkirk, awncorp@cpan.org

LICENSE

Copyright (C) 2011-2019, Al Newkirk, et al.

This is free software; you can redistribute it and/or modify it under the terms of the The Apache License, Version 2.0, as elucidated in the "license file".

PROJECT

Wiki

Project

Initiatives

Milestones

Contributing

Issues