NAME

DB::Object::Constraint::Check - Table Check Constraint Class

SYNOPSIS

use DB::Object::Constraint::Check;
my $check = DB::Object::Constraint::Check->new(
    expr => q{CHECK (status::text ~* '^(active|inactive|locked|pending|protected|removed|suspended)$'::text)},
    fields => [qw( status )],
    name => 'chk_users_status',
) || die( DB::Object::Constraint::Check->error, "\n" );

VERSION

v0.1.0

DESCRIPTION

This class represents a table check 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

expr

Sets or gets a check constraint expression.

It returns a scalar object

fields

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

It returns a array object

name

Sets or gets the check 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.