ary('id');
$table->uuid('arid');
$table->column('name');
$table->string('email');
$table->json('metadata');
my $command = $table->create;
my $grammar = $self->grammar('sqlite');
my $sta
('integer_unsigned');
$self->stash(%args) if %args;
return $self;
}
method json(Any %args) {
$self->type('json');
$self->stash(%args) if %args;
return $self;
}
method null(Any %args) {
=back
=cut
=head2 json
json(Any %args) : Column
Configures a JSON column and returns itself.
=over 4
=item json example #1
# given: synopsis
my $json = $self->json;
=back
=cut
=head
urn join ' ', $self->type_integer($col), 'unsigned';
}
method type_json(Column $col) {
# return column type string
return 'json';
}
method type_string(Column $col) {
# return column type stri
# int unsigned
=back
=cut
=head2 type_json
type_json(Column $column) : Str
Returns the type expression for a json column.
=over 4
=item type_json example #1
# given: synopsis
use Doo
dle;
my $ddl = Doodle->new;
my $column = $ddl->table('users')->column('json');
$self->type_json($column);
# json
=back
=cut
=head2 type_string
type_string(Column $column) : Str
Retur
integer_unsigned(Column $col) {
# return column type string
return 'integer';
}
method type_json(Column $col) {
# return column type string
return 'text';
}
method type_string(Column $col)
mn);
# integer
=back
=cut
=head2 type_json
type_json(Column $column) : Str
Returns the type expression for a json column.
=over 4
=item type_json example #1
# given: synopsis
use Doo
dle;
my $ddl = Doodle->new;
my $column = $ddl->table('users')->column('json');
$self->type_json($column);
# text
=back
=cut
=head2 type_string
type_string(Column $column) : Str
Retur
(Column $col) {
# return column type string
return $self->type_integer($col);
}
method type_json(Column $col) {
# return column type string
return 'nvarchar(max)';
}
method type_string(Col
column);
# int
=back
=cut
=head2 type_json
type_json(Column $column) : Str
Returns the type expression for a json column.
=over 4
=item type_json example #1
# given: synopsis
use Doo
dle;
my $ddl = Doodle->new;
my $column = $ddl->table('users')->column('json');
$self->type_json($column);
# nvarchar(max)
=back
=cut
=head2 type_string
type_string(Column $column) : S
umn type string
return $self->type_integer($col);
}
method type_json(Column $col) {
# return column type string
return 'json';
}
method type_string(Column $col) {
# return column type stri
mn);
# integer
=back
=cut
=head2 type_json
type_json(Column $column) : Str
Returns the type expression for a json column.
=over 4
=item type_json example #1
# given: synopsis
use Doo
dle;
my $ddl = Doodle->new;
my $column = $ddl->table('users')->column('json');
$self->type_json($column);
# json
=back
=cut
=head2 type_string
type_string(Column $column) : Str
Retur
umn->integer_unsigned(%args);
return $column;
}
method json(Str $name, Any %args) {
my $column = $self->column($name);
$column->json(%args);
return $column;
}
method morphs(Str $name) {
=head2 json
json(Str $name, Any %args) : Column
Registers a JSON column and returns the Command object set.
=over 4
=item json example #1
# given: synopsis
my $json = $self->json('metada