NAME

DB::Object::Constraint::Index - Table Index Constraint Class

SYNOPSIS

use DB::Object::Constraint::Index;
my $idx = DB::Object::Constraint::Index->new(
    fields => [qw( id )],
    is_primary => 1,
    is_unique => 1,
    name => 'pk_some_table',
) || die( DB::Object::Constraint::Index->error, "\n" );

VERSION

v0.1.0

DESCRIPTION

This class represents a table index constraint. It is instantiated by the structure method when retrieving the table structure details.

CONSTRUCTOR

new

To instantiate new object, you can pass an hash or hash reference of properties matching the method names available below.

METHODS

fields

Sets or gets an array reference of table field names associated with this constraint.

It returns a array object

is_primary

Sets or gets a boolean value whether this constraint is a primary index, or not.

Returns a boolean object

is_unique

Sets or gets a boolean value whether this constraint is a unique constraint, or not.

Returns a boolean object

name

Sets or gets the index constraint name.

It returns a scalar object

AUTHOR

Jacques Deguest <jack@deguest.jp>

SEE ALSO

perl

COPYRIGHT & LICENSE

Copyright(c) 2023 DEGUEST Pte. Ltd.

All rights reserved

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.