Dave Rolsky > Fey-0.40 > Fey::Column::Alias

Download:
Fey-0.40.tar.gz

Dependencies

Annotate this POD

CPAN RT

New  3
Open  2
View/Report Bugs
Module Version: 0.40   Source  

NAME ^

Fey::Column::Alias - Represents an alias for a column

VERSION ^

version 0.40

SYNOPSIS ^

  my $alias = $user_id_col->alias();

DESCRIPTION ^

This class represents an alias for a column. Column aliases allow you to use the same column in different ways multiple times in a query, which makes certain types of queries simpler to express.

METHODS ^

Fey::Column::Alias->new()

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

$alias->name()

This returns the name of the column for which this object is an alias.

$alias->alias_name()

Returns the name for this alias.

$alias->type()

$alias->generic_type()

$alias->length()

$alias->precision()

$alias->is_auto_increment()

$alias->is_nullable()

$alias->default()

Returns the specified attribute for the column, just like the Fey::Column methods of the same name.

$alias->table()

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

$alias->is_alias()

Always returns false.

$alias->sql()

$alias->sql_with_alias()

$alias->sql_or_alias()

Returns the appropriate SQL snippet for the alias.

$alias->id()

Returns a unique identifier for the column. This method throws an exception if the alias does not belong to a table.

ROLES ^

This class does the Fey::Role::ColumnLike and Fey::Role::Named roles.

BUGS ^

See Fey for details on how to report bugs.

AUTHOR ^

Dave Rolsky <autarch@urth.org>

COPYRIGHT AND LICENSE ^

This software is Copyright (c) 2011 by Dave Rolsky.

This is free software, licensed under:

  The Artistic License 2.0 (GPL Compatible)
syntax highlighting: