"""Constants in TDengine python"""from.dbapiimport*classFieldType(object):"""TDengine Field Types """# type_codeC_NULL=0C_BOOL=1C_TINYINT=2C_SMALLINT=3C_INT=4C_BIGINT=5C_FLOAT=6C_DOUBLE=7C_BINARY=8C_TIMESTAMP=9C_NCHAR=10# NULL value definition# NOTE: These values should change according to C definition in tsdb.hC_BOOL_NULL=0x02C_TINYINT_NULL=-128C_SMALLINT_NULL=-32768C_INT_NULL=-2147483648C_BIGINT_NULL=-9223372036854775808C_FLOAT_NULL=float('nan')C_DOUBLE_NULL=float('nan')C_BINARY_NULL=bytearray([int('0xff',16)])# Time precision definitionC_TIMESTAMP_MILLI=0C_TIMESTAMP_MICRO=1