++ed by:

2 non-PAUSE users.

Al Newkirk

NAME

Doodle::Table

ABSTRACT

Doodle Table Class

SYNOPSIS

  use Doodle;
  use Doodle::Table;

  my $ddl = Doodle->new;

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

DESCRIPTION

This package provides database table representation.

INTEGRATES

This package integrates behaviors from:

Doodle::Table::Helpers

LIBRARIES

This package uses type constraints from:

Doodle::Library

ATTRIBUTES

This package has the following attributes:

charset

  charset(Str)

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

collation

  collation(Str)

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

columns

  columns(Columns)

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

data

  data(Data)

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

doodle

  doodle(Doodle)

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

engine

  engine(Str)

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

indices

  indices(Indices)

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

name

  name(Str)

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

relations

  relations(Relations)

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

schema

  schema(Schema)

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

METHODS

This package implements the following methods:

column

  column(Str $name, Any @args) : Column

Returns a new Column object.

column example #1
  # given: synopsis

  my $column = $self->column('id');

create

  create(Any %args) : Command

Registers a table create and returns the Command object.

create example #1
  # given: synopsis

  my $create = $self->create;

delete

  delete(Any %args) : Command

Registers a table delete and returns the Command object.

delete example #1
  # given: synopsis

  my $delete = $self->delete;

doodle

  doodle() : Doodle

Returns the associated Doodle object.

doodle example #1
  # given: synopsis

  my $doodle = $self->doodle;

index

  index(ArrayRef :$columns, Any %args) : Index

Returns a new Index object.

index example #1
  # given: synopsis

  my $index = $self->index(columns => ['email', 'password']);

relation

  relation(Str $column, Str $ftable, Str $fcolumn, Any %args) : Relation

Returns a new Relation object.

relation example #1
  # given: synopsis

  my $relation = $self->relation('profile_id', 'profiles', 'id');

rename

  rename(Any %args) : Command

Registers a table rename and returns the Command object.

rename example #1
  # given: synopsis

  my $rename = $self->rename('people');

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