- 🇺🇸United States kevinquillen
Exciting to see this happening.
Does this mean that now we can do this instead of use a serialized blob store?
'data' => [ 'type' => 'blob', 'mysql_type' => 'json', 'pgsql_type' => 'jsonb',
Other than this patch and query functions, is there anything else to be aware of?
- Status changed to Needs work
almost 2 years ago 10:31pm 15 February 2023 - 🇺🇸United States smustgrave
Moving to NW for the test coverage. If the solution changes per the current discussion please update issue summary also.
- 🇩🇪Germany rgpublic Düsseldorf 🇩🇪 🇪🇺
I wonder if it wouldn't be nice to have a "shortcut" so instead of this:
data' => [ 'type' => 'blob', 'mysql_type' => 'json', 'pgsql_type' => 'jsonb', ]
just this would be possible:
data' => [ 'type' => 'json', ]
- 🇨🇦Canada gapple
PostgreSQL has two datatypes,
json
andjsonb
with slightly different behaviour - it looks like MySQL'sjson
type is more similar to PostgreSQL'sjsonb
, in that it does some normalization like removing duplicate object keys and extra whitespace when a value is stored in the field.Should the MySQL driver define both to match the current patch for the PostgresSQL driver?
'json:normal' => 'JSON', 'jsonb:normal' => 'JSON',
The differing behaviour is probably something to note in documentation, and that
jsonb
will probably provide the best consistency of behaviour between db backends. - 🇫🇷France andypost
Looks the most compatible way is to provide only
json:normal
OOB and usemysql_type
andpgsql_type
to vary - Status changed to Needs review
over 1 year ago 5:08pm 8 July 2023 - last update
over 1 year ago Custom Commands Failed - 🇫🇷France andypost
Here's a patch with test for returned data types
The issue I found comparing to
sqlite
andpgsql
is that syntax for->>
operator is bit different- sqlite, pgsql -
select [field] -> "key1" ->> "key2"
- mysql isselect [field] -> '$.key1.key1'
or braces for array indexselect [field] -> '$.key1[0]'
- last update
over 1 year ago Custom Commands Failed - last update
over 1 year ago Custom Commands Failed - last update
over 1 year ago 29,803 pass - last update
over 1 year ago 29,803 pass - last update
over 1 year ago 29,803 pass - last update
over 1 year ago 29,803 pass - Status changed to RTBC
over 1 year ago 10:24pm 9 July 2023 - 🇺🇸United States smustgrave
Tests appear green
Verified the test locally running on ddev with mysql:8.0 I get
Undefined array key "json:normal" - last update
over 1 year ago 29,806 pass - last update
over 1 year ago 29,812 pass - last update
over 1 year ago 29,816 pass - last update
over 1 year ago 29,816 pass 5:15 2:39 RunningThe last submitted patch, 32: 3143512-32.patch, failed testing. View results →
- 🇺🇸United States smustgrave
Random unrelated failure that was popping up today.
- last update
over 1 year ago 29,828 pass - last update
over 1 year ago 29,880 pass - last update
over 1 year ago 29,880 pass - last update
over 1 year ago 29,885 pass - Status changed to Closed: duplicate
over 1 year ago 9:38pm 27 July 2023 - 🇺🇸United States bradjones1 Digital Nomad Life
Per #3343634-14: [META] Add "json" as core data type for Schema API → this is being consolidated into the parent issue for a single change.