Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages

  
 
  

home | help
DBIx::Class::InflateCoUser:Contributed:PerllDocumenmn::Serializer::Storable(3)

NAME
       DBIx::Class::InflateColumn::Serializer::Storable	- Storable Inflator

SYNOPSIS
	 package MySchema::Table;
	 use base 'DBIx::Class';

	 __PACKAGE__->load_components('InflateColumn::Serializer', 'Core');
	 __PACKAGE__->add_columns(
	   'data_column' => {
	     'data_type' => 'VARCHAR',
	     'size'	 => 255,
	     'serializer_class'	  => 'Storable'
	   }
	 );

       Then in your code...

	 my $struct = {	'I' => { 'am' => 'a struct' };
	 $obj->data_column($struct);
	 $obj->update;

       And you can recover your	data structure with:

	 my $obj = ...->find(...);
	 my $struct = $obj->data_column;

       The data	structures you assign to "data_column" will be saved in	the
       database	in Storable format.

       get_freezer
	   Called by DBIx::Class::InflateColumn::Serializer to get the routine
	   that	serializes the data passed to it. Returns a coderef.

       get_unfreezer
	   Called by DBIx::Class::InflateColumn::Serializer to get the routine
	   that	deserializes the data stored in	the column. Returns a coderef.

perl v5.32.1		   DBIx::Class::InflateColumn::Serializer::Storable(3)

NAME | SYNOPSIS

Want to link to this manual page? Use this URL:
<https://www.freebsd.org/cgi/man.cgi?query=DBIx::Class::InflateColumn::Serializer::Storable&sektion=3&manpath=FreeBSD+13.0-RELEASE+and+Ports>

home | help