Commit Graph

19 Commits

Author SHA1 Message Date
0b04d1c6c7 expression: rewrite builtin JSON functions under the new framework. (#4367) 2017-09-06 14:42:35 +08:00
8c6998387a expression, json: fix cast json to other types. (#4265) 2017-08-23 20:16:50 +08:00
c51d0f57ed *: support JSON in new expression architecture (#4089) 2017-08-10 15:56:53 +08:00
dff73cc6e4 *: Modify the Makefile for go vet (#3900) 2017-07-30 23:02:52 -05:00
c844ad7cea *: fix two error shade bug. (#3910)
* fix a json decode bug.
2017-07-27 02:40:21 -05:00
edb9110a7c *: CoerceDatum should deal with truncate error internally (#3799) 2017-07-20 16:46:06 +08:00
6bd585f27c json: add uint64 support. (#3648) 2017-07-07 11:02:33 +08:00
45cd7c9864 builtin, json: add json_object and json_array functions. (#3562) 2017-07-03 20:23:27 +08:00
b9088c26b7 codec: simplify json codec. (#3524) 2017-06-23 14:04:09 +08:00
8a31944402 json: be more compatible with MySQL' document instead of implement. (#3521) 2017-06-23 11:25:47 +08:00
db8ff90334 json: fix unquote bug and add test cases. (#3507) 2017-06-20 18:50:25 +08:00
d1bb107e62 json: fix a bug in path_expr. (#3504) 2017-06-20 16:36:58 +08:00
791b4c273c expression: add buildin functions json_{set,insert,replace} and json_merge. (#3388) 2017-06-06 15:50:32 +08:00
7a872e4694 add json functions: json_{set/insert/replace} and json_merge. (#3374) 2017-06-03 15:29:59 +08:00
21ecc66963 *: fix typos (#3375)
* *: fix typos
2017-06-02 07:14:57 -05:00
01dd725090 add Extract and Unquote functions for JSON. (#3353) 2017-06-02 10:30:30 +08:00
ed32957cfc document-store: reconstruct JSON code (#3326) 2017-05-26 17:18:03 +08:00
6962814a29 add json_type function and compare json with primitive types. (#3307) 2017-05-24 15:21:40 +08:00
1e4bf4775c document store: add JSON type and codec. (#3248)
Document store: add JSON type and codec.

The JSON binary representation is same with MySQL 5.7. we prefer
this not bson because 1) bson only supports JSON compound types
but not JSON primitive types, and 2) this representation is better
than bson on random access.

This PR now can support these  statements:
```
CREATE TABLE t (a json_field);
INSERT INTO t (a) values ('{"a": "b"}');
SELECT * FROM t;
```

JSON codec uses MySQL 5.7 compatible format, which doesn't support use JSON field as key or index. We will limit this in tidb later.
2017-05-17 12:00:34 +08:00