NAME
Doodle::Table::Helpers
ABSTRACT
Nam suscipit iaculis magna vitae faucibus.
SYNOPSIS
use Doodle::Table;
my $self = Doodle::Table->new(
name => 'users'
);
DESCRIPTION
Doodle Table Helpers
METHODS
This package implements the following methods.
binary
binary(Str $name, Any %args) : Column
Registers a binary column and returns the Command object set.
boolean
boolean(Str $name, Any %args) : Column
Registers a boolean column and returns the Command object set.
char
char(Str $name, Any %args) : Column
Registers a char column and returns the Command object set.
date
date(Str $name, Any %args) : Column
Registers a date column and returns the Command object set.
datetime
datetime(Str $name, Any %args) : Column
Registers a datetime column and returns the Command object set.
datetime_tz
datetime_tz(Str $name, Any %args) : Column
Registers a datetime column with timezone and returns the Command object set.
decimal
decimal(Str $name, Any %args) : Column
Registers a decimal column and returns the Command object set.
double
double(Str $name, Any %args) : Column
Registers a double column and returns the Command object set.
enum
enum(Str $name, Any %args) : Column
Registers an enum column and returns the Command object set.
float
float(Str $name, Any %args) : Column
Registers a float column and returns the Command object set.
increments_big
increments_big(Str $name, Any %args) : Column
Registers an auto-incrementing big integer (8-byte) column and returns the Command object set.
increments_medium
increments_medium(Str $name, Any %args) : Column
Registers an auto-incrementing medium integer (3-byte) column and returns the Command object set.
increments_small
increments_small(Str $name, Any %args) : Column
Registers an auto-incrementing small integer (2-byte) column and returns the Command object set.
integer
integer(Str $name, Any %args) : Column
Registers an integer (4-byte) column and returns the Command object set.
integer_big
integer_big(Str $name, Any %args) : Column
Registers a big integer (8-byte) column and returns the Command object set.
integer_big_unsigned
integer_big_unsigned(Str $name, Any %args) : Column
Registers an unsigned big integer (8-byte) column and returns the Command object set.
integer_medium
integer_medium(Str $name, Any %args) : Column
Registers a medium integer (3-byte) column and returns the Command object set.
integer_medium_unsigned
integer_medium_unsigned(Str $name, Any %args) : Column
Registers an unsigned medium integer (3-byte) column and returns the Command object set.
- integer_medium_unsigned example
-
my $integer_medium_unsigned = $self->integer_medium_unsigned('number');
integer_small
integer_small(Str $name, Any %args) : Column
Registers a small integer (2-byte) column and returns the Command object set.
integer_small_unsigned
integer_small_unsigned(Str $name, Any %args) : Column
Registers an unsigned small integer (2-byte) column and returns the Command object set.
- integer_small_unsigned example
-
my $integer_small_unsigned = $self->integer_small_unsigned('number');
integer_tiny
integer_tiny(Str $name, Any %args) : Column
Registers a tiny integer (1-byte) column and returns the Command object set.
integer_tiny_unsigned
integer_tiny_unsigned(Str $name, Any %args) : Column
Registers an unsigned tiny integer (1-byte) column and returns the Command object set.
integer_unsigned
integer_unsigned(Str $name, Any %args) : Column
Registers an unsigned integer (4-byte) column and returns the Command object set.
json
json(Str $name, Any %args) : Column
Registers a JSON column and returns the Command object set.
morphs
morphs(Str $name) : [Column]
Registers columns neccessary for polymorphism and returns the Column object set.
no_timestamps
no_timestamps() : [Command]
Registers a drop for created_at
, updated_at
and deleted_at
columns and returns the Command object set.
primary
primary(Str $name, Any %args) : Column
Registers primary key(s) and returns the Command object set.
string
string(Str $name, Any %args) : Column
Registers a string column and returns the Command object set.
temporary
temporary() : Table
Denotes that the table created should be a temporary one.
text
text(Str $name, Any %args) : Column
Registers a text column and returns the Command object set.
text_long
text_long(Str $name, Any %args) : Column
Registers a long text column and returns the Command object set.
text_medium
text_medium(Str $name, Any %args) : Column
Registers a medium text column and returns the Command object set.
time
time(Str $name, Any %args) : Column
Registers a time column and returns the Command object set.
time_tz
time_tz(Str $name, Any %args) : Column
Registers a time column with timezone and returns the Command object set.
timestamp
timestamp(Str $name, Any %args) : Column
Registers a timestamp column and returns the Command object set.
timestamp_tz
timestamp_tz(Str $name, Any %args) : Column
Registers a timestamp_tz column and returns the Command object set.
timestamps
timestamps() : [Column]
Registers created_at
, updated_at
and deleted_at
columns and returns the Command object set.
timestamps_tz
timestamps_tz() : [Column]
Registers created_at
, updated_at
and deleted_at
columns with timezone and returns the Command object set.
uuid
uuid(Str $name, Any %args) : Column
Registers a uuid column and returns the Command object set.