Paul Sharpe > DbFramework-1.10 > DbFramework::DataType::Mysql

Download:
DbFramework-1.10.tar.gz

Dependencies

Annotate this POD

CPAN RT

New  1
Open  1
View/Report Bugs
Source   Latest Release: DbFramework-1.11

NAME ^

DbFramework::DataType::Mysql - Mysql data type class

SYNOPSIS ^

  use DbFramework::DataType::Mysql;
  $dt     = new DbFramework::DataType::ANSII($dm,$type,$ansii_type,$length);
  $name   = $dt->name($name);
  $type   = $dt->type($type);
  $length = $dt->length($length);
  $extra  = $dt->extra($extra);
  $ansii  = $dt->ansii_type;

DESCRIPTION ^

A DbFramework::DataType::Mysql object represents a Mysql data type.

SUPERCLASSES ^

DbFramework::DefinitionObject

CLASS METHODS ^

new($dm,$type,$ansii_type,$length,$extra)

Create a new DbFramework::DataType object. $dm is a DbFramework::DataModle object. $type is a numeric Mysql type e.g. a type containd in the array reference returned by $sth->{mysql_type}. This method will die() unless $type is a member of the set of types supported by DBD::mysql. $ansii_type is the ANSII type that most closely resembles the native Mysql type. $length is the length of the data type. $extra is any extra stuff which applies to the type e.g. 'AUTO_INCREMENT'.

name($name)

If $name is supplied sets the name of the Mysql data type. Returns the name of the data type.

type($type)

If $type is supplied sets the number of the Mysql data type. Returns the numeric data type.

ansii_type($ansii_type)

If $ansii_type is supplied sets the number of the ANSII type which most closely corresponds to the Mysql native type. Returns the ANSII type which most closely corresponds to the Mysql native type.

length($length)

If $length is supplied sets the length of the data type. Returns the length of the data type.

extra($extra)

If $extra is supplied sets any extra information which applies to the data type e.g. AUTO_INCREMENT in they case of a Mysql INTEGER data type. Returns the extra information which applies to the data type.

SEE ALSO ^

DbFramework::DefinitionObject

AUTHOR ^

Paul Sharpe <paul@miraclefish.com>

COPYRIGHT ^

Copyright (c) 1999 Paul Sharpe. England. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

syntax highlighting: