1Rose::DB::Object::MetadUastear::CPornitmrairbyuKteeydR(o3Ps)eer:l:DDBo:c:uOmbejnetcatt:i:oMnetadata::PrimaryKey(3)
2
3
4

NAME

6       Rose::DB::Object::Metadata::PrimaryKey - Primary key metadata.
7

SYNOPSIS

9         use Rose::DB::Object::Metadata::PrimaryKey;
10
11         $pk = Rose::DB::Object::Metadata::PrimaryKey->new(
12                 columns => [ 'id', 'type' ]);
13
14         MyClass->meta->primary_key($pk);
15         ...
16

DESCRIPTION

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

OBJECT METHODS

22       add_column [COLUMNS]
23           This method is an alias for the add_columns method.
24
25       add_columns [COLUMNS]
26           Add COLUMNS to the list of columns that make up the primary key.
27           COLUMNS must be a list or reference to an array of  column names or
28           Rose::DB::Object::Metadata::Column-derived objects.
29
30       columns [COLUMNS]
31           Get or set the list of columns that make up the primary key.
32           COLUMNS must a list or reference to an array of column names or
33           Rose::DB::Object::Metadata::Column-derived objects.
34
35           This method returns all of the columns that make up the primary
36           key.  Each column is a Rose::DB::Object::Metadata::Column-derived
37           column object if the primary key's parent has a column object with
38           the same name, or just the column name otherwise.  In scalar
39           context, a reference to an array of columns is returned.  In list
40           context, a list is returned.
41
42       column_names
43           Returns a list (in list context) or reference to an array (in
44           scalar context) of the names of the columns that make up the
45           primary key.
46
47       delete_columns
48           Delete the entire list of columns that make up the primary key.
49
50       name [NAME]
51           Get or set the name of the primary key.  Traditionally, this is the
52           name of the index that the database uses to maintain the primary
53           key, but databases vary.  If left undefined, the default value is
54           "primary_key".
55
56       parent [META]
57           Get or set the Rose::DB::Object::Metadata-derived object that this
58           primary key belongs to.
59
60       sequence_names [NAMES]
61           Get or set the list of database sequence names (if any) used to
62           generate values for the primary key columns.  The sequence names
63           must be in the same order as the columns.  NAMES may be a list or
64           reference to an array of sequence names.  Returns a list (in list
65           context) or reference to the array (in scalar context) of sequence
66           names.
67

AUTHOR

69       John C. Siracusa (siracusa@gmail.com)
70

LICENSE

72       Copyright (c) 2010 by John C. Siracusa.  All rights reserved.  This
73       program is free software; you can redistribute it and/or modify it
74       under the same terms as Perl itself.
75
76
77
78perl v5.28.0                      2015R-o0s3e-:1:8DB::Object::Metadata::PrimaryKey(3)
Impressum