GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages


Manual Reference Pages  -  ROSE::DB::OBJECT::METADATA::UNIQUEKEY (3)

.ds Aq ’

NAME

Rose::DB::Object::Metadata::UniqueKey - Unique key metadata.

CONTENTS

SYNOPSIS



  use Rose::DB::Object::Metadata::UniqueKey;

  $uk = Rose::DB::Object::Metadata::UniqueKey->new(
          columns => [ name, color ]);

  MyClass->meta->add_unique_key($uk);
  ...



DESCRIPTION

Objects of this class store and manipulate metadata for unique keys in a database table. Each unique key is made up of one or more columns.

OBJECT METHODS

<B>add_column [COLUMNS]B> This method is an alias for the add_columns method.
<B>add_columns [COLUMNS]B> Add COLUMNS to the list of columns that make up the unique key. COLUMNS must be a list or reference to an array of column names or Rose::DB::Object::Metadata::Column-derived objects.
<B>columns [COLUMNS]B> Get or set the list of columns that make up the unique key. COLUMNS must a list or reference to an array of column names or Rose::DB::Object::Metadata::Column-derived objects.

This method returns all of the columns that make up the unique key. Each column is a Rose::DB::Object::Metadata::Column-derived column object if the unique key’s parent has a column object with the same name, or just the column name otherwise. In scalar context, a reference to an array of columns is returned. In list context, a list is returned.

<B>column_namesB> Returns a list (in list context) or reference to an array (in scalar context) of the names of the columns that make up the unique key.
<B>delete_columnsB> Delete the entire list of columns that make up the unique key.
<B>name [NAME]B> Get or set the name of the unique key. This name should be unique among all unique keys for a given table. Traditionally, it is the name of the index that the database uses to maintain the unique key, but practices vary. If left undefined, the default value is a string created by joining the column_names with underscores.
<B>parent [META]B> Get or set the Rose::DB::Object::Metadata-derived object that this unique key belongs to.

AUTHOR

John C. Siracusa (siracusa@gmail.com)

LICENSE

Copyright (c) 2010 by John C. Siracusa. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
Search for    or go to Top of page |  Section 3 |  Main Index


perl v5.20.3 ROSE::DB::OBJECT::METADATA::UNIQUEKEY (3) 2015-03-17

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.