json: make index_base support for json_lexer
Introduced a new index_base field for json_lexer class - this value is a base field offset for emitted JSON_TOKEN_NUM tokens. Thus, we get rid of the need to perform manual casts using the TUPLE_INDEX_BASE constant in the majority of cases. This will also ensure that the extracted tuples are correctly inserted into the numerical level of JSON tree. @locker: use int instead of unsigned for index_base. Needed for #1012
Showing
- src/box/tuple_format.c 4 additions, 12 deletionssrc/box/tuple_format.c
- src/lib/json/json.c 3 additions, 1 deletionsrc/lib/json/json.c
- src/lib/json/json.h 10 additions, 1 deletionsrc/lib/json/json.h
- test/engine/tuple.result 2 additions, 2 deletionstest/engine/tuple.result
- test/unit/json_path.c 15 additions, 9 deletionstest/unit/json_path.c
- test/unit/json_path.result 11 additions, 10 deletionstest/unit/json_path.result
Please register or sign in to comment