1 package SL::Auth::ColumnInformation;
6 use Scalar::Util qw(weaken);
11 my ($class, %params) = @_;
13 my $self = bless {}, $class;
15 $self->{auth} = $params{auth} || croak "Missing 'auth'";
24 return $self if $self->{info};
27 SELECT a.attname, format_type(a.atttypid, a.atttypmod) AS format_type, d.adsrc, a.attnotnull
29 LEFT JOIN pg_attrdef d ON (a.attrelid = d.adrelid) AND (a.attnum = d.adnum)
30 WHERE (a.attrelid = 'auth.session_content'::regclass)
32 AND NOT a.attisdropped
36 $self->{info} = { selectall_as_map($::form, $self->{auth}->dbconnect, $query, 'attname', [ qw(format_type adsrc attnotnull) ]) };
43 return $self->_fetch->{info};
47 my ($self, $column) = @_;
48 return $self->info->{$column};