multi method size(Int $length, Int $precision) { $self->length($length); $self->precision($precision); $self->size }
multi method size(ArrayRef $size) { $self->length($size->[0]); $self->precision($size->[1]) if @$size == 2; $self->size }
- multi method size(Any $) {
+ multi method size {
return $self->has_precision
? wantarray
? ($self->length, $self->precision)
$self->column_ids;
}
- multi method fields(Any $) { $self->column_ids }
+ multi method fields { $self->column_ids }
method add_field(Column $column does coerce) { $self->add_column($column) }
multi method parameters(Str $parameter) { $self->add_parameter($parameter) }
multi method parameters(ArrayRef $parameter) { $self->add_parameter($parameter) }
- multi method parameters(Any $) { wantarray ? @{$self->_parameters} : $self->_parameters }
+ multi method parameters { wantarray ? @{$self->_parameters} : $self->_parameters }
}
around add_sequence(Sequence $sequence does coerce) { $self->$orig($sequence->name, $sequence) }
- multi method primary_key(Any $) { grep /^PRIMARY KEY$/, $_->type for $self->get_constraints }
+ multi method primary_key { grep /^PRIMARY KEY$/, $_->type for $self->get_constraints }
multi method primary_key(Str $column) { $self->get_column($column)->is_primary_key(1) }
method is_valid { return $self->get_columns ? 1 : undef }