Skip Menu |

This queue is for tickets about the Class-DBI-mysql CPAN distribution.

Report information
The Basics
Id: 12971
Status: new
Priority: 0/
Queue: Class-DBI-mysql

People
Owner: Nobody in particular
Requestors: dave [...] riverside-cms.co.uk
Cc:
AdminCc:

Bug Information
Severity: Wishlist
Broken in: (no value)
Fixed in: (no value)



Subject: set_vals method (just like enum_vals)
=head2 set_vals my @allowed = $class->set_vals('column_name'); This returns a list of the allowable values for a SET column. =cut sub set_vals { my $class = shift; my $col = shift or die "Need a column for set_vals"; my $series = $class->_column_info->{$col}->{type}; ( my $set ) = $series =~ /set\('(.*?)'\)/ or die "$col is not a SET column"; return map { s/''/'/g; $_ } split( "','", $set ); }