Doodle::Table
Doodle Table Class
use Doodle; use Doodle::Table; my $ddl = Doodle->new; my $self = Doodle::Table->new( name => 'users', doodle => $ddl );
This package provides database table representation.
This package integrates behaviors from:
Doodle::Table::Helpers
This package uses type constraints from:
Doodle::Library
This package has the following attributes:
charset(Str)
This attribute is read-only, accepts (Str) values, and is optional.
(Str)
collation(Str)
columns(Columns)
This attribute is read-only, accepts (Columns) values, and is optional.
(Columns)
data(Data)
This attribute is read-only, accepts (Data) values, and is optional.
(Data)
doodle(Doodle)
This attribute is read-only, accepts (Doodle) values, and is required.
(Doodle)
engine(Str)
indices(Indices)
This attribute is read-only, accepts (Indices) values, and is optional.
(Indices)
name(Str)
This attribute is read-only, accepts (Str) values, and is required.
relations(Relations)
This attribute is read-only, accepts (Relations) values, and is optional.
(Relations)
schema(Schema)
This attribute is read-only, accepts (Schema) values, and is optional.
(Schema)
This package implements the following methods:
column(Str $name, Any @args) : Column
Returns a new Column object.
# given: synopsis my $column = $self->column('id');
create(Any %args) : Command
Registers a table create and returns the Command object.
# given: synopsis my $create = $self->create;
delete(Any %args) : Command
Registers a table delete and returns the Command object.
# given: synopsis my $delete = $self->delete;
doodle() : Doodle
Returns the associated Doodle object.
# given: synopsis my $doodle = $self->doodle;
index(ArrayRef :$columns, Any %args) : Index
Returns a new Index object.
# given: synopsis my $index = $self->index(columns => ['email', 'password']);
relation(Str $column, Str $ftable, Str $fcolumn, Any %args) : Relation
Returns a new Relation object.
# given: synopsis my $relation = $self->relation('profile_id', 'profiles', 'id');
rename(Any %args) : Command
Registers a table rename and returns the Command object.
# given: synopsis my $rename = $self->rename('people');
Al Newkirk, awncorp@cpan.org
awncorp@cpan.org
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".
Wiki
Project
Initiatives
Milestones
Contributing
Issues
To install Doodle, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Doodle
CPAN shell
perl -MCPAN -e shell install Doodle
For more information on module installation, please visit the detailed CPAN module installation guide.