Class::DBI::Lite::ColumnInfo - Extended meta-information about database table fields.


Class-DBI-Lite documentation  | view source Contained in the Class-DBI-Lite distribution.

Index


NAME

Top

Class::DBI::Lite::ColumnInfo - Extended meta-information about database table fields.

SYNOPSIS

Top

  foreach my $field ( app::artist->columns )
  {

  }# end foreach()

DESCRIPTION

Top

Sometimes database table field information needs to be available during runtime.

This class provides a simple interface to query a specific database field.

PUBLIC PROPERTIES

Top

name

Returns the name of the column.

type

Returns the data type of the column - varchar, int, etc.

length

Returns the size of the field.

is_nullable

True or false.

default_value

Returns the default value of the field, if any.

is_pk

Returns true if the field is a primary key field. False otherwise.

key

Returns either undef, primary_key or unique.

enum_values

ONLY if the column is an enum data type, this property will return an arraref of the possible enum values.

BUGS

Top

It's possible that some bugs have found their way into this release.

AUTHOR

Top

John Drago <jdrago_999@yahoo.com>

http://www.devstack.com/

COPYRIGHT AND LICENSE

Top


Class-DBI-Lite documentation  | view source Contained in the Class-DBI-Lite distribution.