-
-
16 Jun 2015 03:55:50 UTC
- Distribution: Fey
- Module version: 0.43
- Source (raw)
- Browse (raw)
- Changes
- Homepage
- How to Contribute
- Repository
- Issues (6)
- Testers (893 / 4 / 0)
- Kwalitee
Bus factor: 1- 97.59% Coverage
- License: artistic_2
- Activity
24 month- Tools
- Download (88.18KB)
- MetaCPAN Explorer
- Permissions
- Subscribe to distribution
- Permalinks
- This version
- Latest version
and 5 contributors-
Aristotle Pagaltzis
-
hdp@glaive.weftsoar.net
-
hdp@localhost
-
hdp@rook.opensourcery.com
-
Oliver Charles
- Dependencies
- Carp
- Exception::Class
- Exporter
- List::AllUtils
- Moose
- Moose::Role
- Moose::Util::TypeConstraints
- MooseX::Params::Validate
- MooseX::Role::Parameterized
- MooseX::SemiAffordanceAccessor
- MooseX::StrictConstructor
- MooseX::Types
- MooseX::Types::Combine
- MooseX::Types::Moose
- Scalar::Util
- Task::Weaken
- Tie::IxHash
- base
- namespace::autoclean
- overload
- strict
- warnings
- Reverse dependencies
- CPAN Testers List
- Dependency graph
Take me over?
The maintainer of this distribution is looking for someone to take over! If you're interested then please contact them via email.- NAME
- VERSION
- SYNOPSIS
- DESCRIPTION
- METHODS
- Fey::Column->new()
- $column->name()
- $column->type()
- $column->generic_type()
- $column->length()
- $column->precision()
- $column->is_auto_increment()
- $column->is_nullable()
- $column->default()
- $column->table()
- $column->alias(%p)
- $column->alias($alias_name)
- $column->is_alias()
- $column->sql()
- $column->sql_with_alias()
- $column->sql_or_alias()
- $column->id()
- ROLES
- BUGS
- AUTHOR
- COPYRIGHT AND LICENSE
NAME
Fey::Column - Represents a column
VERSION
version 0.43
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:name - required
The name of the column.
type - required
The type of the column. This should be a string. Do not include modifiers like length or precision.
generic_type - optional
This should be one of the following types:
text
blob
integer
float
date
datetime
time
boolean
other
This indicate a generic type for the column, which is intended to allow for a common description of column types across different DBMS platforms.
If this parameter is not specified, then the constructor code will attempt to determine a reasonable value, defaulting to "other" if necessary.
length - optional
The length of the column. This must be a positive integer.
precision - optional
The precision of the column, for float-type columns. This must be an integer >= 0.
is_auto_increment - defaults to 0
This indicates whether or not the column is auto-incremented.
is_nullable - defaults to 0
A boolean indicating whether the column is nullable.
default - optional
This must be either a scalar (including undef) or a
Fey::Literal
object. If a scalar is provided, it is turned into aFey::Literal
object viaFey::Literal->new_from_scalar()
.
$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)
$column->alias($alias_name)
This method returns a new
Fey::Column::Alias
object based on the column. Any parameters passed to this method will be passed through toFey::Column::Alias->new()
.As a shortcut, if you pass a single argument to this method, it will be passed as the "alias_name" parameter to
Fey::Table::Column->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, Fey::Role::MakesAliasObjects, 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 - 2015 by Dave Rolsky.
This is free software, licensed under:
The Artistic License 2.0 (GPL Compatible)
Module Install Instructions
To install Fey, copy and paste the appropriate command in to your terminal.
cpanm Fey
perl -MCPAN -e shell install Fey
For more information on module installation, please visit the detailed CPAN module installation guide.