Rose::...iqueKey(3pm)
π NAME π
okay so bestie, welcome to the Rose::...iqueKey(3pm) page in User Contributed Perl Documentation β this one is all about Rose::DB::Object::Metadata::UniqueKey, and the vibe is unique key metadata. β¨
β¨ SYNOPSIS β¨
like, here's the whole setup:
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. That's the whole assignment, no cap.
π OBJECT METHODS π
here's every method, no skips, no cap:
add_column [COLUMNS]
This method is an alias for the add_columns method. Literally the same thing, just a shorter little nickname.
add_columns [COLUMNS]
Add COLUMNS to the list of columns that make up the unique key. COLUMNS must be a list or a reference to an array of column names or Rose::DB::Object::Metadata::Column-derived objects. Stack 'em up.
columns [COLUMNS]
Get or set the list of columns that make up the unique key. COLUMNS must be a list or a 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. Context-aware queen behavior.
column_names
Returns a list (in list context) or a reference to an array (in scalar context) of the names of the columns that make up the unique key. Names only, no extra baggage.
delete_columns
Delete the entire list of columns that make up the unique key. Poof, gone, periodt.
name [NAME]
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.
parent [META]
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.
mwah, bye bestie π
β source/version situation is perl v5.40.1, dated 2025-08-21, and the footer tag is Rose::...iqueKey(3pm).
π¦ where this page comes from
- ubuntu resolute: librose-db-object-perl 1:0.822-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: librose-db-object-perl 1:0.822-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms