Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/kentnl/dbix-class-inflatecolumn-serializer-sereal
Sereal based Serialization for DBIx Class Columns
https://github.com/kentnl/dbix-class-inflatecolumn-serializer-sereal
Last synced: 4 days ago
JSON representation
Sereal based Serialization for DBIx Class Columns
- Host: GitHub
- URL: https://github.com/kentnl/dbix-class-inflatecolumn-serializer-sereal
- Owner: kentnl
- License: other
- Created: 2014-10-18T21:54:51.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2017-03-07T20:11:46.000Z (over 7 years ago)
- Last Synced: 2023-08-20T22:28:49.619Z (about 1 year ago)
- Language: Perl
- Size: 67.4 KB
- Stars: 1
- Watchers: 3
- Forks: 2
- Open Issues: 2
-
Metadata Files:
- Readme: README.mkdn
- Changelog: Changes
- License: LICENSE
Awesome Lists containing this project
README
# NAME
DBIx::Class::InflateColumn::Serializer::Sereal - Sereal based Serialization for DBIx Class Columns
# VERSION
version 0.001003
# SYNOPSIS
Standard DBIx::Class definition:
package Some::Result::Item;
use parent 'DBIx::Class::Core';# Add Inflate::Column::Serializer to component loading.
__PACKAGE__->load_components( 'InflateColumn::Serializer', 'Core' );
__PACKAGE__->table('item');
__PACKAGE__->add_column( itemid => { data_type => 'integer' }, );
__PACKAGE__->set_primary_key('itemid');
__PACKAGE__->add_column(
data => {
data_type => 'text',
size => 1024,
serializer_class => 'Sereal', # This line tells InflateColumn::Serializer what class to use.
}
);
__PACKAGE__->source_name('Item');# METHODS
## get\_freezer
This is an implementation detail for the `InflateColumn::Serializer` module.
my $freezer = ::Sereal->get_freezer( $column, $info, $column_args );
my $string = $freezer->( $object );
# $data isa string## get\_unfreezer
This is an implementation detail for the `InflateColumn::Serializer` module.
my $unfreezer = ::Sereal>get_unfreezer( $column, $info, $args );
my $object = $unfreezer->( $string );# AUTHOR
Kent Fredric
# COPYRIGHT AND LICENSE
This software is copyright (c) 2017 by Kent Fredric .
This is free software; you can redistribute it and/or modify it under
the same terms as the Perl 5 programming language system itself.