From bceb4e9b6d372b1f7172ebf2742ed6e1cf5936e7 Mon Sep 17 00:00:00 2001 From: wangmm0220 Date: Wed, 22 Sep 2021 10:24:32 +0800 Subject: [PATCH] TD-6129 add python test case --- src/connector/python/taos/constants.py | 1 + src/connector/python/taos/field.py | 2 ++ 2 files changed, 3 insertions(+) diff --git a/src/connector/python/taos/constants.py b/src/connector/python/taos/constants.py index 8ad5b69fc0..34044a15fc 100644 --- a/src/connector/python/taos/constants.py +++ b/src/connector/python/taos/constants.py @@ -25,6 +25,7 @@ class FieldType(object): C_SMALLINT_UNSIGNED = 12 C_INT_UNSIGNED = 13 C_BIGINT_UNSIGNED = 14 + C_JSON = 15 # NULL value definition # NOTE: These values should change according to C definition in tsdb.h C_BOOL_NULL = 0x02 diff --git a/src/connector/python/taos/field.py b/src/connector/python/taos/field.py index b0bec58b93..9d1799d367 100644 --- a/src/connector/python/taos/field.py +++ b/src/connector/python/taos/field.py @@ -207,6 +207,7 @@ CONVERT_FUNC = { FieldType.C_SMALLINT_UNSIGNED: _crow_smallint_unsigned_to_python, FieldType.C_INT_UNSIGNED: _crow_int_unsigned_to_python, FieldType.C_BIGINT_UNSIGNED: _crow_bigint_unsigned_to_python, + FieldType.C_JSON: _crow_nchar_to_python, } CONVERT_FUNC_BLOCK = { @@ -224,6 +225,7 @@ CONVERT_FUNC_BLOCK = { FieldType.C_SMALLINT_UNSIGNED: _crow_smallint_unsigned_to_python, FieldType.C_INT_UNSIGNED: _crow_int_unsigned_to_python, FieldType.C_BIGINT_UNSIGNED: _crow_bigint_unsigned_to_python, + FieldType.C_JSON: _crow_nchar_to_python_block, } # Corresponding TAOS_FIELD structure in C -- GitLab