il::TypeConstraints qw(enum);
use Try::Tiny;
use Data::Stream::Bulk::DBI;
use SQL::Abstract;
use JSON;
use Scalar::Util qw(weaken refaddr);
use List::MoreUtils qw(any);
use KiokuDB::Backend::DBI::Sc
}
}
has '+serializer' => ( default => "json" ); # to make dumps readable
has json => (
isa => "Object",
is => "ro",
default => sub { JSON->new },
);
has create => (
isa => "Boo
$i_sth->finish;
});
}
sub _parse_dbic_key {
my ( $self, $key ) = @_;
@{ $self->json->decode(substr($key,length('dbic:row:'))) };
}
sub _part_rows_and_ids {
my ( $self, $rows_an
pan:NUFFIN';
}
{
$KiokuDB::TypeMap::Entry::DBIC::ResultSet::VERSION = '1.22';
}
use Moose;
use JSON;
use Scalar::Util qw(weaken);
use namespace::autoclean;
extends qw(KiokuDB::TypeMap::Entry::Nai
Moose;
use JSON;
use Scalar::Util qw(weaken);
use namespace::autoclean;
with qw(KiokuDB::TypeMap::Entry);
has json => (
isa => "Object",
is => "ro",
default => sub { JSON->new },
);
sub compile {
my ( $self, $class ) = @_;
my $json = $self->json;
return KiokuDB::TypeMap::Entry::Compiled->new(
collapse_method => sub {
my ( $collapser, @args ) = @
id_method => sub {
my ( $self, $object ) = @_;
return 'dbic:row:' . $json->encode([ $object->result_source->source_name, $object->id ]);
},
refresh_method