José Diaz Seng > DBIx-Table-TestDataGenerator-0.005 > DBIx::Table::TestDataGenerator::SelfReference

Download:
DBIx-Table-TestDataGenerator-0.005.tar.gz

Dependencies

Annotate this POD

CPAN RT

Open  0
View/Report Bugs
Module Version: 0.005   Source  

NAME ^

DBIx::Table::TestDataGenerator::SelfReference - self-reference handling

DESCRIPTION ^

Determines if there is a self-reference and if so, information about it.

SUBROUTINES/METHODS ^

_self_ref_condition

Internal method, returns the name of the foreign key defining a self-reference and a hash relating the referencing to the referenced column in case there is a self-reference, returns undef otherwise.

get_self_reference

If there is an fkey defining a self-reference, its name and the name of the referencing column are returned in a two-element array reference, otherwise undef is returned.

selfref_tree

Arguments:

Returns a hash corresponding to the self-reference defined on the table.

num_roots

Arguments:

Returns the number of roots in the target table in case a self-reference exists on it. A record is considered a root node if either the value for the parent primary key is equal to NULL or to the record's primary key value.

AUTHOR ^

Jose Diaz Seng, <josediazseng at gmx.de>

COPYRIGHT AND LICENSE ^

Copyright (C) 2012-2013, Jose Diaz Seng.

This module is free software; you can redistribute it and/or modify it under the same terms as Perl 5.10.0. For more details, see the full text of the licenses in the directory LICENSES.

This program is distributed in the hope that it will be useful, but without any warranty; without even the implied warranty of merchantability or fitness for a particular purpose.

syntax highlighting: