Dave Rolsky > Fey-0.11 > Fey::Column

Download:
Fey-0.11.tar.gz

Dependencies

Annotate this POD

CPAN RT

New  2
Open  0
View Bugs
Report a bug
Source   Latest Release: Fey-0.34

NAME ^

Fey::Column - Represents a column

SYNOPSIS ^

  my $column = Fey::Column->new( name              => 'user_id',
                                 type              => 'integer',
                                 is_auto_increment => 1,
                               );

DESCRIPTION ^

This class represents a column in a table.

METHODS ^

This class provides the following methods:

Fey::Column->new()

This method constructs a new Fey::Column object. It takes the following parameters:

$column->name()

$column->type()

$column->generic_type()

$column->length()

$column->precision()

$column->is_auto_increment()

$column->is_nullable()

$column->default()

Returns the specified attribute.

$column->table()

Returns the Fey::Table object to which the column belongs, if any.

$column->alias(%p)

This method returns a new Fey::Column::Alias object based on the column. Any parameters passed to this method will be passed through to Fey::Column::Alias->new().

$column->is_alias()

Always returns false.

$column->sql()

$column->sql_with_alias()

$column->sql_or_alias()

Returns the appropriate SQL snippet for the column.

$column->id()

Returns a unique identifier for the column.

ROLES ^

This class does the Fey::Role::ColumnLike role.

AUTHOR ^

Dave Rolsky, <autarch@urth.org>

BUGS ^

See Fey for details on how to report bugs.

COPYRIGHT & LICENSE ^

Copyright 2006-2008 Dave Rolsky, All Rights Reserved.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.