Carp qw/croak confess/;
use POSIX();
use IO::Select();
use Scope::Guard();
use Cpanel::JSON::XS qw/decode_json/;
use parent 'DBIx::QuickORM::Select';
use DBIx::QuickORM::Util::HashBase qw{
+rea
{ POSIX::_exit(42) };
my $guard = Scope::Guard->new(sub { POSIX::_exit(1) });
my $json = Cpanel::JSON::XS->new->ascii(1)->convert_blessed(1)->allow_nonref(1);
$wh->autoflush(1);
$sel
print $wh $json->encode({cols => $cols}), "\n";
print $wh $json->encode({relmap => $cols}), "\n";
while (my $data = $sth->fetchrow_arrayref) {
print $wh $json->encode({ro
use Test2::V0 -target => 'DBIx::QuickORM::Conflator::JSON::ASCII';
use ok $CLASS;
done_testing;
= (
uuid => 'DBIx::QuickORM::Conflator::UUID',
json => 'DBIx::QuickORM::Conflator::JSON',
jsonb => 'DBIx::QuickORM::Conflator::JSON',
map {$_ => 'DBIx::QuickORM::Conflator::DateTime'
conflate($conflate);
if ($conflate eq 'DBIx::QuickORM::Conflator::JSON') {
omit();
}
}
elsif ($col->{is_date
BIx::QuickORM::Role::Async';
use Carp qw/croak/;
use Time::HiRes qw/sleep/;
use Cpanel::JSON::XS qw/decode_json/;
use IO::Select;
use DBIx::QuickORM::Util::HashBase qw{
<connection
<sqla_so
ss $self->{+READY};
my $pipe = $self->{+PIPE};
my $line = <$pipe>;
my $data = decode_json($line);
unless ($data && exists $data->{result}) {
chomp($line);
croak "Got
$pipe = $self->{+PIPE};
my $line = <$pipe>;
if (defined $line) {
my $row = decode_json($line);
return $row if $row;
}
$self->set_done;
return;
}
sub set_done {
# Stringy
char => 'string',
json => 'string',
string => 'string',
text => 'string',
# Special
enum => 'string',
jsonb => 'string',
money => 'string',
s
b supports_json {
my $self = shift;
my ($dbh) = @_;
return 'JSONB' unless $dbh;
my $ver = $self->db_version($dbh);
my ($maj, $min) = split /\./, $ver;
return 'JSONB' if $maj
my %NORMALIZED_TYPES = (
INT => 'INTEGER',
BINARY => 'BYTEA',
JSON => 'JSONB',
BIGINTEGER => 'BIGINT',
SMALLINTEGER => 'SMALLINT',
TINYINTEGER => 'TI
elf = shift; $self->{+DB}->supports_uuid($self->dbh, @_) }
sub supports_json { my $self = shift; $self->{+DB}->supports_json($self->dbh, @_) }
sub supports_datetime { my $self = shift; $self->{+DB
b supports_json {
my $self = shift;
my ($dbh) = @_;
return 'JSON' unless $dbh;
my $ver = $self->db_version($dbh);
my ($maj, $min) = split /\./, $ver;
return 'JSON' if $maj >
gy
char => 'string',
json => 'string',
string => 'string',
text => 'string',
bpchar => 'string',
# Special
enum => 'string',
jsonb => 'string',
money => 'st
pports_json {
my $self = shift;
my ($dbh) = @_;
return 'JSON' unless $dbh;
my $ver = $self->db_version($dbh);
my ($maj, $min, $rev) = split /[-\.]/, $ver;
return 'JSON' if $
our $VERSION = '0.000005';
use parent 'DBIx::QuickORM::DB::MySQL';
use DBIx::QuickORM::Util::HashBase;
sub sql_spec_keys { qw/percona mysql/ }
sub supports_uuid { () }
sub supports_json { () }
1;
b supports_json {
my $self = shift;
my ($dbh) = @_;
return 'JSONB' unless $dbh;
my $ver = $self->db_version($dbh);
my ($maj, $min) = split /\./, $ver;
return 'JSONB' if $maj
BIx::QuickORM::Role::Async';
use Carp qw/croak/;
use Time::HiRes qw/sleep/;
use Cpanel::JSON::XS qw/decode_json/;
use IO::Select;
use DBIx::QuickORM::Util::HashBase qw{
<connection
<source
ss $self->{+READY};
my $pipe = $self->{+PIPE};
my $line = <$pipe>;
my $data = decode_json($line);
unless ($data && exists $data->{result}) {
chomp($line);
croak "Got
$pipe = $self->{+PIPE};
my $line = <$pipe>;
if (defined $line) {
my $row = decode_json($line);
return $row if $row;
}
$self->set_done;
return;
}
sub set_done {