-
-
Notifications
You must be signed in to change notification settings - Fork 238
Closed
Description
With MySQL
mysql> select JSON_EXTRACT('{"id":234}', '$.id')-1;
+--------------------------------------+
| JSON_EXTRACT('{"id":234}', '$.id')-1 |
+--------------------------------------+
| 233 |
+--------------------------------------+
1 row in set (0.00 sec)
mysql> select JSON_EXTRACT('{"id":234}', '$.id') = 234;
+------------------------------------------+
| JSON_EXTRACT('{"id":234}', '$.id') = 234 |
+------------------------------------------+
| 1 |
+------------------------------------------+
1 row in set (0.00 sec)
With go-mysql-server
MySQL [(none)]> select JSON_EXTRACT('{"id":234}', '$.id')-1;
ERROR 1105 (HY000): unable to cast sql.JSONDocument{Val:234} of type sql.JSONDocument to float64
MySQL [(none)]> select JSON_EXTRACT('{"id":234}', '$.id') = 234;
+------------------------------------------+
| JSON_EXTRACT('{"id":234}', '$.id') = 234 |
+------------------------------------------+
| 0 |
+------------------------------------------+
1 row in set (0.002 sec)```
Metadata
Metadata
Assignees
Labels
No labels