Fey::Table::Alias - Represents an alias for a table
version 0.43
my $alias = $user_table->alias(); my $alias = $user_table->alias( alias_name => 'User2' );
This class represents an alias for a table. Table aliases allow you to join the same table more than once in a query, which makes certain types of queries simpler to express.
This class provides the following methods:
This method constructs a new Fey::Table::Alias object. It takes the following parameters:
Fey::Table::Alias
table - required
This is the Fey::Table object which we are aliasing.
Fey::Table
alias_name - optional
This should be a valid table name for your DBMS. If not provided, a unique name is automatically created.
Returns the Fey::Table object for which this object is an alias.
Returns the name for this alias.
These methods work like the corresponding methods in Fey::Table. The name() method returns the real table name.
name()
These methods work like the corresponding methods in Fey::Table. However, the columns they return will return the alias object when $column->table() is called.
$column->table()
Always returns true.
Returns the appropriate SQL snippet for the alias.
Returns a unique string identifying the alias.
This class does the Fey::Role::TableLike and Fey::Role::Named roles.
See Fey for details on how to report bugs.
Dave Rolsky <autarch@urth.org>
This software is Copyright (c) 2011 - 2015 by Dave Rolsky.
This is free software, licensed under:
The Artistic License 2.0 (GPL Compatible)
To install Fey, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Fey
CPAN shell
perl -MCPAN -e shell install Fey
For more information on module installation, please visit the detailed CPAN module installation guide.