DB::Object::Constraint::Check - Table Check Constraint Class
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" );
v0.1.0
This class represents a table check constraint. It is instantiated by the structure method when retrieving the table structure details.
To instantiate new object, you can pass an hash or hash reference of properties matching the method names available below.
Sets or gets a check constraint expression.
It returns a scalar object
Sets or gets an array reference of table field names associated with this constraint.
It returns a array object
Sets or gets the check constraint name.
Jacques Deguest <jack@deguest.jp>
perl
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.
To install DB::Object, copy and paste the appropriate command in to your terminal.
cpanm
cpanm DB::Object
CPAN shell
perl -MCPAN -e shell install DB::Object
For more information on module installation, please visit the detailed CPAN module installation guide.