.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.42) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "DBSchema::ForeignKey 3pm" .TH DBSchema::ForeignKey 3pm "2022-09-10" "perl v5.34.0" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" DBIx::DBSchema::ForeignKey \- Foreign key objects .SH "SYNOPSIS" .IX Header "SYNOPSIS" .Vb 1 \& use DBIx::DBSchema::ForeignKey; \& \& $foreign_key = new DBIx::DBSchema::ForeignKey ( \& { \*(Aqcolumns\*(Aq => [ \*(Aqcolumn_name\*(Aq ], \& \*(Aqtable\*(Aq => \*(Aqforeign_table\*(Aq, \& } \& ); \& \& $foreign_key = new DBIx::DBSchema::ForeignKey ( \& { \& \*(Aqconstraint\*(Aq => \*(Aqconstraint_name\*(Aq, \& \*(Aqcolumns\*(Aq => [ \*(Aqcolumn_name\*(Aq, \*(Aqcolumn2\*(Aq ], \& \*(Aqtable\*(Aq => \*(Aqforeign_table\*(Aq, \& \*(Aqreferences\*(Aq => [ \*(Aqforeign_column\*(Aq, \*(Aqforeign_column2\*(Aq ], \& \*(Aqmatch\*(Aq => \*(AqMATCH FULL\*(Aq, # or MATCH SIMPLE \& \*(Aqon_delete\*(Aq => \*(AqNO ACTION\*(Aq, # on clauses: NO ACTION / RESTRICT / \& \*(Aqon_update\*(Aq => \*(AqRESTRICT\*(Aq, # CASCADE / SET NULL / SET DEFAULT \& } \& ); .Ve .SH "DESCRIPTION" .IX Header "DESCRIPTION" DBIx::DBSchema::ForeignKey objects represent a foreign key. .SH "METHODS" .IX Header "METHODS" .IP "new \s-1HASHREF\s0 | \s-1OPTION, VALUE, ...\s0" 4 .IX Item "new HASHREF | OPTION, VALUE, ..." Creates a new DBIx::DBschema::ForeignKey object. .Sp Accepts either a hashref or a list of options and values. .Sp Options are: .RS 4 .IP "constraint \- constraint name" 8 .IX Item "constraint - constraint name" .PD 0 .IP "columns \- List reference of column names" 8 .IX Item "columns - List reference of column names" .IP "table \- Foreign table name" 8 .IX Item "table - Foreign table name" .IP "references \- List reference of column names in foreign table" 8 .IX Item "references - List reference of column names in foreign table" .IP "match \-" 8 .IX Item "match -" .IP "on_delete \-" 8 .IX Item "on_delete -" .IP "on_update \-" 8 .IX Item "on_update -" .RE .RS 4 .RE .IP "constraint [ \s-1CONSTRAINT_NAME\s0 ]" 4 .IX Item "constraint [ CONSTRAINT_NAME ]" .PD Returns or sets the constraint name .IP "table [ \s-1TABLE_NAME\s0 ]" 4 .IX Item "table [ TABLE_NAME ]" Returns or sets the foreign table name .IP "columns [ \s-1LISTREF\s0 ]" 4 .IX Item "columns [ LISTREF ]" Returns or sets the columns. .IP "columns_sql" 4 .IX Item "columns_sql" Returns a comma-joined list of columns, suitable for an \s-1SQL\s0 statement. .IP "references [ \s-1LISTREF\s0 ]" 4 .IX Item "references [ LISTREF ]" Returns or sets the referenced columns. .IP "references_sql" 4 .IX Item "references_sql" Returns a comma-joined list of referenced columns, suitable for an \s-1SQL\s0 statement. .IP "match [ \s-1TABLE_NAME\s0 ]" 4 .IX Item "match [ TABLE_NAME ]" Returns or sets the \s-1MATCH\s0 clause .IP "on_delete [ \s-1ACTION\s0 ]" 4 .IX Item "on_delete [ ACTION ]" Returns or sets the \s-1ON DELETE\s0 clause .IP "on_update [ \s-1ACTION\s0 ]" 4 .IX Item "on_update [ ACTION ]" Returns or sets the \s-1ON UPDATE\s0 clause .IP "sql_foreign_key" 4 .IX Item "sql_foreign_key" Returns an \s-1SQL FOREIGN KEY\s0 statement. .IP "cmp \s-1OTHER_INDEX_OBJECT\s0" 4 .IX Item "cmp OTHER_INDEX_OBJECT" Compares this object to another supplied object. Returns true if they are have the same table, columns and references. .SH "AUTHOR" .IX Header "AUTHOR" Ivan Kohler .PP Copyright (c) 2013 Freeside Internet Services, Inc. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. .SH "BUGS" .IX Header "BUGS" Should give in and Mo or Moo. .SH "SEE ALSO" .IX Header "SEE ALSO" DBIx::DBSchema::Table, DBIx::DBSchema, \s-1DBI\s0