I'm trying to understand the files generated by Loader, which I've
generated from an existing database. In many cases, the syntax generated
for calls to add_unique_constraint() don't match that in any
documentation I've found and I don't understand it when reading the
implementation of add_unique_constraint either. Here's an example file:

package TDB::Schema::Functions;

# Created by DBIx::Class::Schema::Loader v0.03000 @ 2010-05-18 14:52:15

use strict;
use warnings;

use base 'DBIx::Class';

__PACKAGE__->load_components("PK::Auto", "Core");
__PACKAGE__->table("functions");
__PACKAGE__->add_columns("func", "description");
__PACKAGE__->set_primary_key("func");
__PACKAGE__->add_unique_constraint(["func"], undef);

1;

I don't understand that trailing undef. All the docs I've seen have the
list of columns as the last argument.

Cheers, Dave

_______________________________________________
List: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/dbix-class
IRC: irc.perl.org#dbix-class
SVN: http://dev.catalyst.perl.org/repos/bast/DBIx-Class/
Searchable Archive: http://www.grokbase.com/group/[email protected]

Reply via email to