NAME

DBIO::InflateColumn::Serializer::MessagePack - MessagePack Inflator

VERSION

version 0.900000

SYNOPSIS

package MySchema::Table;
use base 'DBIO::Core';

__PACKAGE__->load_components('InflateColumn::Serializer');
__PACKAGE__->add_columns(
  'data_column' => {
    'data_type' => 'BLOB',
    'serializer_class'   => 'MessagePack'
  }
);

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 MessagePack format. MessagePack is a compact binary serialization format, ideal for columns where space efficiency matters.

DESCRIPTION

MessagePack backend for DBIO::InflateColumn::Serializer. Loaded automatically when a column declares serializer_class => 'MessagePack'.

METHODS

get_freezer

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

get_unfreezer

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

COLUMN INFO

serializer_class => 'MessagePack'

Selects this backend.

size => $n

Optional. Serialised payload is checked against size on deflate; over-long payloads throw.

DEPENDENCIES

Data::MessagePack. Not a hard dependency of DBIO; install separately.

AUTHOR

DBIO & DBIx::Class Authors

COPYRIGHT AND LICENSE

Copyright (C) 2026 DBIO Authors Portions Copyright (C) 2005-2025 DBIx::Class Authors Based on DBIx::Class, heavily modified.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.