Content-Length: 275302 | pFad | http://github.com/perl5-dbi/DBD-mysql/commit/#start-of-content

6846FA7A Add support for JSON column in column_info() · perl5-dbi/DBD-mysql@8c6c960 · GitHub
Skip to content

Commit 8c6c960

Browse files
michal-josef-spacekdveeden
authored andcommitted
Add support for JSON column in column_info()
Field storage requirement for JSON column is approximately the same as for a LONGBLOB or LONGTEXT column. It's defined in https://dev.mysql.com/doc/refman/8.4/en/storage-requirements.html#data-types-storage-reqs-json
1 parent df87c68 commit 8c6c960

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/DBD/mysql.pm

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -459,7 +459,7 @@ sub column_info {
459459
my @type_attr= split / /, $attr||'';
460460

461461
$info->{DATA_TYPE}= SQL_VARCHAR();
462-
if ($basetype =~ /^(char|varchar|\w*text|\w*blob)/)
462+
if ($basetype =~ /^(char|varchar|\w*text|\w*blob|json)/)
463463
{
464464
$info->{DATA_TYPE}= SQL_CHAR() if $basetype eq 'char';
465465
if ($type_params[0])
@@ -471,7 +471,7 @@ sub column_info {
471471
$info->{COLUMN_SIZE} = 65535;
472472
$info->{COLUMN_SIZE} = 255 if $basetype =~ /^tiny/;
473473
$info->{COLUMN_SIZE} = 16777215 if $basetype =~ /^medium/;
474-
$info->{COLUMN_SIZE} = 4294967295 if $basetype =~ /^long/;
474+
$info->{COLUMN_SIZE} = 4294967295 if $basetype =~ /^(long|json)/;
475475
}
476476
}
477477
elsif ($basetype =~ /^(binary|varbinary)/)

0 commit comments

Comments
 (0)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/perl5-dbi/DBD-mysql/commit/#start-of-content

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy