DBIx::DBSchema::ColGroup(3pm)

DBIx::DBSchema::ColGroup3pm

Column group objects

Usage

  use DBIx::DBSchema::ColGroup;
  $colgroup = new DBIx::DBSchema::ColGroup ( $lol_ref );
  $colgroup = new DBIx::DBSchema::ColGroup ( \@lol );
  $colgroup = new DBIx::DBSchema::ColGroup (
    [
      [ 'single_column' ],
      [ 'multiple_columns', 'another_column', ],
    ]
  );
  $lol_ref = $colgroup->lol_ref;
  @sql_lists = $colgroup->sql_list;
  @singles = $colgroup->singles;

Overview

This class is deprecated and included for backwards-compatibility only. See DBIx::DBSchema::Index for the current class used to store unique and non-unique indices.

DBIx::DBSchema::ColGroup objects represent sets of sets of columns. (IOW a "list of lists" - see perllol.)

Methods

new [ LOL_REF ]

Creates a new DBIx::DBSchema::ColGroup object. Pass a reference to a list of lists of column names.

lol_ref

Returns a reference to a list of lists of column names.

sql_list

Returns a flat list of comma-separated values, for SQL statements.

For example:

  @lol = (
           [ 'single_column' ],
           [ 'multiple_columns', 'another_column', ],
         );
  $colgroup = new DBIx::DBSchema::ColGroup ( \@lol );
  print join("\n", $colgroup->sql_list), "\n";

Will print:

  single_column
  multiple_columns, another_column
singles

Returns a flat list of all single item lists.

Releases

6 releases since Debian 3.0 (Woody); the text changed 5 times.

  1. 3.0
  2. 3.1
  3. 4.0
  4. 5.0
  5. 6.0
  6. 7

Author

Ivan Kohler <[email protected]>

Bugs

From libdbix-dbschema-perl 0.40-2 in Debian 7 (Wheezy). Parsed by carta from the page's man source.