NAME

Doodle::Column::Helpers

ABSTRACT

Doodle Column Helpers

SYNOPSIS

use Doodle::Column;

my $self = Doodle::Column->new(%args);

DESCRIPTION

Helpers for configuring Column classes.

METHODS

This package implements the following methods.

binary

binary(Any %args) : Column

Configures a binary column and returns itself.

binary example
my $binary = $self->binary;

boolean

boolean(Any %args) : Column

Configures a boolean column and returns itself.

boolean example
my $boolean = $self->boolean;

char

char(Any %args) : Column

Configures a char column and returns itself.

char example
my $char = $self->char;

date

date(Any %args) : Column

Configures a date column and returns itself.

date example
my $date = $self->date;

datetime

datetime(Any %args) : Column

Configures a datetime column and returns itself.

datetime example
my $datetime = $self->datetime;

datetime_tz

datetime_tz(Any %args) : Column

Configures a datetime column with timezone and returns itself.

datetime_tz example
my $datetime_tz = $self->datetime_tz;

decimal

decimal(Any %args) : Column

Configures a decimal column and returns itself.

decimal example
my $decimal = $self->decimal;

double

double(Any %args) : Column

Configures a double column and returns itself.

double example
my $double = $self->double;

enum

enum(Any %args) : Column

Configures an enum column and returns itself.

enum example
my $enum = $self->enum(options => [
  'red', 'blue', 'green'
]);

float

float(Any %args) : Column

Configures a float column and returns itself.

float example
my $float = $self->float;

increments

increments() : Column

Denotes that the column auto-increments and returns the Column object.

increments example
my $increments = $self->increments;

increments_big

increments_big(Any %args) : Column

Configures an auto-incrementing big integer (8-byte) column and returns itself.

increments_big example
my $increments_big = $self->increments_big;

increments_medium

increments_medium(Any %args) : Column

Configures an auto-incrementing medium integer (3-byte) column and returns itself.

increments_medium example
my $increments_medium = $self->increments_medium;

increments_small

increments_small(Any %args) : Column

Configures an auto-incrementing small integer (2-byte) column and returns itself.

increments_small example
my $increments_small = $self->increments_small;

integer

integer(Any %args) : Column

Configures an integer (4-byte) column and returns itself.

integer example
my $integer = $self->integer;

integer_big

integer_big(Any %args) : Column

Configures a big integer (8-byte) column and returns itself.

integer_big example
my $integer_big = $self->integer_big;

integer_big_unsigned

integer_big_unsigned(Any %args) : Column

Configures an unsigned big integer (8-byte) column and returns itself.

integer_big_unsigned example
my $integer_big_unsigned = $self->integer_big_unsigned;

integer_medium

integer_medium(Any %args) : Column

Configures a medium integer (3-byte) column and returns itself.

integer_medium example
my $integer_medium = $self->integer_medium('number');

integer_medium_unsigned

integer_medium_unsigned(Any %args) : Column

Configures an unsigned medium integer (3-byte) column and returns itself.

integer_medium_unsigned example
my $integer_medium_unsigned = $self->integer_medium_unsigned('number');

integer_small

integer_small(Any %args) : Column

Configures a small integer (2-byte) column and returns itself.

integer_small example
my $integer_small = $self->integer_small;

integer_small_unsigned

integer_small_unsigned(Any %args) : Column

Configures an unsigned small integer (2-byte) column and returns itself.

integer_small_unsigned example
my $integer_small_unsigned = $self->integer_small_unsigned;

integer_tiny

integer_tiny(Any %args) : Column

Configures a tiny integer (1-byte) column and returns itself.

integer_tiny example
my $integer_tiny = $self->integer_tiny;

integer_tiny_unsigned

integer_tiny_unsigned(Any %args) : Column

Configures an unsigned tiny integer (1-byte) column and returns itself.

integer_tiny_unsigned example
my $integer_tiny_unsigned = $self->integer_tiny_unsigned;

integer_unsigned

integer_unsigned(Any %args) : Column

Configures an unsigned integer (4-byte) column and returns itself.

integer_unsigned example
my $integer_unsigned = $self->integer_unsigned;

json

json(Any %args) : Column

Configures a JSON column and returns itself.

json example
my $json = $self->json;

not_null

not_null(Any %args) : Column

Denotes that the Column is not nullable and returns itself.

not_null example
my $not_null = $self->not_null;

null

null(Any %args) : Column

Denotes that the Column is nullable and returns itself.

null example
my $null = $self->null;

primary

primary(Any %args) : Column

Denotes that the column is the primary key and returns the Column object.

primary example
my $primary = $self->primary('id');

string

string(Any %args) : Column

Configures a string column and returns itself.

string example
my $string = $self->string;

text

text(Any %args) : Column

Configures a text column and returns itself.

text example
my $text = $self->text;

text_long

text_long(Any %args) : Column

Configures a long text column and returns itself.

text_long example
my $text_long = $self->text_long;

text_medium

text_medium(Any %args) : Column

Configures a medium text column and returns itself.

text_medium example
my $text_medium = $self->text_medium;

time

time(Any %args) : Column

Configures a time column and returns itself.

time example
my $time = $self->time;

time_tz

time_tz(Any %args) : Column

Configures a time column with timezone and returns itself.

time_tz example
my $time_tz = $self->time_tz;

timestamp

timestamp(Any %args) : Column

Configures a timestamp column and returns itself.

timestamp example
my $timestamp = $self->timestamp;

timestamp_tz

timestamp_tz(Any %args) : Column

Configures a timestamp_tz column and returns itself.

timestamp_tz example
my $timestamp_tz = $self->timestamp_tz;

uuid

uuid(Any %args) : Column

Configures a uuid column and returns itself.

uuid example
my $uuid = $self->uuid;