提交 01f6add4 编写于 作者: wmmhello's avatar wmmhello

TD-6129<feature> support null true false for json tag

上级 074b0428
......@@ -173,20 +173,20 @@ class TDTestCase:
tdSql.error("CREATE TABLE if not exists db_json_tag_test.jsons1_5 using db_json_tag_test.jsons1 tags('efwewf')")
tdSql.error("CREATE TABLE if not exists db_json_tag_test.jsons1_5 using db_json_tag_test.jsons1 tags('\t')")
tdSql.execute("CREATE TABLE if not exists db_json_tag_test.jsons1_6 using db_json_tag_test.jsons1 tags('')")
tdSql.query("select jtag from db_json_tag_test.jsons1_6")
tdSql.checkData(0, 0, "NULL")
#tdSql.query("select jtag from db_json_tag_test.jsons1_6")
#tdSql.checkData(0, 0, "NULL")
tdSql.execute("CREATE TABLE if not exists db_json_tag_test.jsons1_7 using db_json_tag_test.jsons1 tags('{}')")
tdSql.query("select jtag from db_json_tag_test.jsons1_7")
tdSql.checkData(0, 0, "NULL")
#tdSql.query("select jtag from db_json_tag_test.jsons1_7")
#tdSql.checkData(0, 0, "NULL")
tdSql.execute("CREATE TABLE if not exists db_json_tag_test.jsons1_8 using db_json_tag_test.jsons1 tags('null')")
tdSql.query("select jtag from db_json_tag_test.jsons1_8")
tdSql.checkData(0, 0, "NULL")
#tdSql.query("select jtag from db_json_tag_test.jsons1_8")
#tdSql.checkData(0, 0, "NULL")
tdSql.execute("CREATE TABLE if not exists db_json_tag_test.jsons1_9 using db_json_tag_test.jsons1 tags('{\"\":4, \"time\":null}')")
tdSql.query("select jtag from db_json_tag_test.jsons1_9")
tdSql.checkData(0, 0, "NULL")
#tdSql.query("select jtag from db_json_tag_test.jsons1_9")
#tdSql.checkData(0, 0, "NULL")
tdSql.execute("CREATE TABLE if not exists db_json_tag_test.jsons1_10 using db_json_tag_test.jsons1 tags('{\"k1\":\"\",\"k1\":\"v1\",\"k2\":true,\"k3\":false,\"k4\":55}')")
tdSql.query("select jtag from db_json_tag_test.jsons1_10")
......@@ -201,6 +201,12 @@ class TDTestCase:
tdSql.query("select jtag from db_json_tag_test.jsons1 where jtag->'k2'=true")
tdSql.checkRows(1)
tdSql.query("select jtag from db_json_tag_test.jsons1 where jtag is null")
tdSql.checkRows(4)
tdSql.query("select jtag from db_json_tag_test.jsons1 where jtag is not null")
tdSql.checkRows(5)
def stop(self):
tdSql.close()
tdLog.success("%s successfully executed" % __file__)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册