use std::fmt;
use num_enum::{FromPrimitive, IntoPrimitive};
#[derive(Debug, Clone, Copy, Eq, PartialEq, FromPrimitive, IntoPrimitive)]
#[repr(i32)]
#[derive(serde::Deserialize)]
pub enum TaosCode {
Success = 0x0000,
RpcActionInProgress = 0x0001,
RpcAuthRequired = 0x0002,
RpcAuthFailure = 0x0003,
RpcRedirect = 0x0004,
RpcNotReady = 0x0005,
RpcAlreadyProcessed = 0x0006,
RpcLastSessionNotFinished = 0x0007,
RpcMismatchedLinkId = 0x0008,
RpcTooSlow = 0x0009,
RpcMaxSessions = 0x000A,
RpcNetworkUnavail = 0x000B,
RpcAppError = 0x000C,
RpcUnexpectedResponse = 0x000D,
RpcInvalidValue = 0x000E,
RpcInvalidTranId = 0x000F,
RpcInvalidSessionId = 0x0010,
RpcInvalidMsgType = 0x0011,
RpcInvalidResponseType = 0x0012,
RpcInvalidTimeStamp = 0x0013,
AppNotReady = 0x0014,
RpcFqdnError = 0x0015,
RpcInvalidVersion = 0x0016,
ComOpsNotSupport = 0x0100,
ComMemoryCorrupted = 0x0101,
ComOutOfMemory = 0x0102,
ComInvalidCfgMsg = 0x0103,
ComFileCorrupted = 0x0104,
RefNoMemory = 0x0105,
RefFull = 0x0106,
RefIdRemoved = 0x0107,
RefInvalidId = 0x0108,
RefAlreadyExist = 0x0109,
RefNotExist = 0x010A,
TscInvalidOperation = 0x0200,
TscInvalidQhandle = 0x0201,
TscInvalidTimeStamp = 0x0202,
TscInvalidValue = 0x0203,
TscInvalidVersion = 0x0204,
TscInvalidIe = 0x0205,
TscInvalidFqdn = 0x0206,
TscInvalidUserLength = 0x0207,
TscInvalidPassLength = 0x0208,
TscInvalidDbLength = 0x0209,
TscInvalidTableIdLength = 0x020A,
TscInvalidConnection = 0x020B,
TscOutOfMemory = 0x020C,
TscNoDiskspace = 0x020D,
TscQueryCacheErased = 0x020E,
TscQueryCancelled = 0x020F,
TscSortedResTooMany = 0x0210,
TscAppError = 0x0211,
TscActionInProgress = 0x0212,
TscDisconnected = 0x0213,
TscNoWriteAuth = 0x0214,
TscConnKilled = 0x0215,
TscSqlSyntaxError = 0x0216,
TscDbNotSelected = 0x0217,
TscInvalidTableName = 0x0218,
TscExceedSqlLimit = 0x0219,
TscFileEmpty = 0x021A,
TscLineSyntaxError = 0x021B,
TscNoMetaCached = 0x021C,
TscDupColNames = 0x021D,
TscInvalidTagLength = 0x021E,
TscInvalidColumnLength = 0x021F,
TscDupTagNames = 0x0220,
TscInvalidJson = 0x0221,
TscInvalidJsonType = 0x0222,
TscInvalidJsonConfig = 0x0223,
TscValueOutOfRange = 0x0224,
TscInvalidProtocolType = 0x0225,
TscInvalidPrecisionType = 0x0226,
TscResTooMany = 0x0227,
TscInvalidSchemaVersion = 0x0228,
MndMsgNotProcessed = 0x0300,
MndActionInProgress = 0x0301,
MndActionNeedReprocessed = 0x0302,
MndNoRights = 0x0303,
MndAppError = 0x0304,
MndInvalidConnection = 0x0305,
MndInvalidMsgVersion = 0x0306,
MndInvalidMsgLen = 0x0307,
MndInvalidMsgType = 0x0308,
MndTooManyShellConns = 0x0309,
MndOutOfMemory = 0x030A,
MndInvalidShowobj = 0x030B,
MndInvalidQueryId = 0x030C,
MndInvalidStreamId = 0x030D,
MndInvalidConnId = 0x030E,
MndMnodeIsRunning = 0x0310,
MndFailedToConfigSync = 0x0311,
MndFailedToStartSync = 0x0312,
MndFailedToCreateDir = 0x0313,
MndFailedToInitStep = 0x0314,
MndSdbObjAlreadyThere = 0x0320,
MndSdbError = 0x0321,
MndSdbInvalidTableType = 0x0322,
MndSdbObjNotThere = 0x0323,
MndSdbInvaidMetaRow = 0x0324,
MndSdbInvaidKeyType = 0x0325,
MndDnodeAlreadyExist = 0x0330,
MndDnodeNotExist = 0x0331,
MndVgroupNotExist = 0x0332,
MndNoRemoveMaster = 0x0333,
MndNoEnoughDnodes = 0x0334,
MndClusterCfgInconsistent = 0x0335,
MndInvalidDnodeCfgOption = 0x0336,
MndBalanceEnabled = 0x0337,
MndVgroupNotInDnode = 0x0338,
MndVgroupAlreadyInDnode = 0x0339,
MndDnodeNotFree = 0x033A,
MndInvalidClusterId = 0x033B,
MndNotReady = 0x033C,
MndDnodeIdNotConfigured = 0x033D,
MndDnodeEpNotConfigured = 0x033E,
MndAcctAlreadyExist = 0x0340,
MndInvalidAcct = 0x0341,
MndInvalidAcctOption = 0x0342,
MndAcctExpired = 0x0343,
MndUserAlreadyExist = 0x0350,
MndInvalidUser = 0x0351,
MndInvalidUserFormat = 0x0352,
MndInvalidPassFormat = 0x0353,
MndNoUserFromConn = 0x0354,
MndTooManyUsers = 0x0355,
MndTableAlreadyExist = 0x0360,
MndInvalidTableId = 0x0361,
MndInvalidTableName = 0x0362,
MndInvalidTableType = 0x0363,
MndTooManyTags = 0x0364,
MndTooManyColumns = 0x0365,
MndTooManyTimeseries = 0x0366,
MndNotSuperTable = 0x0367,
MndColNameTooLong = 0x0368,
MndTagAlreayExist = 0x0369,
MndTagNotExist = 0x036A,
MndFieldAlreayExist = 0x036B,
MndFieldNotExist = 0x036C,
MndInvalidStableName = 0x036D,
MndInvalidCreateTableMsg = 0x036E,
MndExceedMaxRowBytes = 0x036F,
MndInvalidFuncName = 0x0370,
MndInvalidFuncLen = 0x0371,
MndInvalidFuncCode = 0x0372,
MndFuncAlreadyExist = 0x0373,
MndInvalidFunc = 0x0374,
MndInvalidFuncBufsize = 0x0375,
MndInvalidTagLength = 0x0376,
MndInvalidColumnLength = 0x0377,
MndDbNotSelected = 0x0380,
MndDbAlreadyExist = 0x0381,
MndInvalidDbOption = 0x0382,
MndInvalidDb = 0x0383,
MndMonitorDbForbidden = 0x0384,
MndTooManyDatabases = 0x0385,
MndDbInDropping = 0x0386,
MndVgroupNotReady = 0x0387,
MndInvalidDbOptionDays = 0x0390,
MndInvalidDbOptionKeep = 0x0391,
MndInvalidTopic = 0x0392,
MndInvalidTopicOption = 0x0393,
MndInvalidTopicPartitons = 0x0394,
MndTopicAlreadyExist = 0x0395,
DndMsgNotProcessed = 0x0400,
DndOutOfMemory = 0x0401,
DndNoWriteAccess = 0x0402,
DndInvalidMsgLen = 0x0403,
DndActionInProgress = 0x0404,
DndTooManyVnodes = 0x0405,
DndExiting = 0x0406,
DndVnodeOpenFailed = 0x0407,
VndActionInProgress = 0x0500,
VndMsgNotProcessed = 0x0501,
VndActionNeedReprocessed = 0x0502,
VndInvalidVgroupId = 0x0503,
VndInitFailed = 0x0504,
VndNoDiskspace = 0x0505,
VndNoDiskPermissions = 0x0506,
VndNoSuchFileOrDir = 0x0507,
VndOutOfMemory = 0x0508,
VndAppError = 0x0509,
VndInvalidVresionFile = 0x050A,
VndIsFull = 0x050B,
VndIsFlowctrl = 0x050C,
VndIsDropping = 0x050D,
VndIsBalancing = 0x050E,
VndIsClosing = 0x0510,
VndNotSynced = 0x0511,
VndNoWriteAuth = 0x0512,
VndIsSyncing = 0x0513,
VndInvalidTsdbState = 0x0514,
WaitThreadTooMany = 0x0515,
TdbInvalidTableId = 0x0600,
TdbInvalidTableType = 0x0601,
TdbIvdTbSchemaVersion = 0x0602,
TdbTableAlreadyExist = 0x0603,
TdbInvalidConfig = 0x0604,
TdbInitFailed = 0x0605,
TdbNoDiskspace = 0x0606,
TdbNoDiskPermissions = 0x0607,
TdbFileCorrupted = 0x0608,
TdbOutOfMemory = 0x0609,
TdbTagVerOutOfDate = 0x060A,
TdbTimestampOutOfRange = 0x060B,
TdbSubmitMsgMssedUp = 0x060C,
TdbInvalidAction = 0x060D,
TdbInvalidCreateTbMsg = 0x060E,
TdbNoTableDataInMem = 0x060F,
TdbFileAlreadyExists = 0x0610,
TdbTableReconfigure = 0x0611,
TdbIvdCreateTableInfo = 0x0612,
TdbNoAvailDisk = 0x0613,
TdbMessedMsg = 0x0614,
TdbIvldTagVal = 0x0615,
TdbNoCacheLastRow = 0x0616,
TdbIncompleteDfileset = 0x0617,
QryInvalidQhandle = 0x0700,
QryInvalidMsg = 0x0701,
QryNoDiskspace = 0x0702,
QryOutOfMemory = 0x0703,
QryAppError = 0x0704,
QryDupJoinKey = 0x0705,
QryExceedTagsLimit = 0x0706,
QryNotReady = 0x0707,
QryHasRsp = 0x0708,
QryInExec = 0x0709,
QryTooManyTimewindow = 0x070A,
QryNotEnoughBuffer = 0x070B,
QryInconsistan = 0x070C,
QrySysError = 0x070D,
QryInvalidTimeCondition = 0x070E,
QryInvalidSchemaVersion = 0x0710,
QryResultTooLarge = 0x0711,
GrantExpired = 0x0800,
GrantDnodeLimited = 0x0801,
GrantAcctLimited = 0x0802,
GrantTimeseriesLimited = 0x0803,
GrantDbLimited = 0x0804,
GrantUserLimited = 0x0805,
GrantConnLimited = 0x0806,
GrantStreamLimited = 0x0807,
GrantSpeedLimited = 0x0808,
GrantStorageLimited = 0x0809,
GrantQuerytimeLimited = 0x080A,
GrantCpuLimited = 0x080B,
SynInvalidConfig = 0x0900,
SynNotEnabled = 0x0901,
SynInvalidVersion = 0x0902,
SynConfirmExpired = 0x0903,
SynTooManyFwdinfo = 0x0904,
SynMismatchedProtocol = 0x0905,
SynMismatchedClusterid = 0x0906,
SynMismatchedSignature = 0x0907,
SynInvalidChecksum = 0x0908,
SynInvalidMsglen = 0x0909,
SynInvalidMsgtype = 0x090A,
WalAppError = 0x1000,
WalFileCorrupted = 0x1001,
WalSizeLimit = 0x1002,
HttpServerOffline = 0x1100,
HttpUnsupportUrl = 0x1101,
HttpInvalidUrl = 0x1102,
HttpNoEnoughMemory = 0x1103,
HttpRequsetTooBig = 0x1104,
HttpNoAuthInfo = 0x1105,
HttpNoMsgInput = 0x1106,
HttpNoSqlInput = 0x1107,
HttpNoExecUsedb = 0x1108,
HttpSessionFull = 0x1109,
HttpGenTaosdTokenErr = 0x110A,
HttpInvalidMultiRequest = 0x110B,
HttpCreateGzipFailed = 0x110C,
HttpFinishGzipFailed = 0x110D,
HttpLoginFailed = 0x110E,
HttpInvalidVersion = 0x1120,
HttpInvalidContentLength = 0x1121,
HttpInvalidAuthType = 0x1122,
HttpInvalidAuthFormat = 0x1123,
HttpInvalidBasicAuth = 0x1124,
HttpInvalidTaosdAuth = 0x1125,
HttpParseMethodFailed = 0x1126,
HttpParseTargetFailed = 0x1127,
HttpParseVersionFailed = 0x1128,
HttpParseSpFailed = 0x1129,
HttpParseStatusFailed = 0x112A,
HttpParsePhraseFailed = 0x112B,
HttpParseCrlfFailed = 0x112C,
HttpParseHeaderFailed = 0x112D,
HttpParseHeaderKeyFailed = 0x112E,
HttpParseHeaderValFailed = 0x112F,
HttpParseChunkSizeFailed = 0x1130,
HttpParseChunkFailed = 0x1131,
HttpParseEndFailed = 0x1132,
HttpParseInvalidState = 0x1134,
HttpParseErrorState = 0x1135,
HttpGcQueryNull = 0x1150,
HttpGcQuerySize = 0x1151,
HttpGcReqParseError = 0x1152,
HttpTgDbNotInput = 0x1160,
HttpTgDbTooLong = 0x1161,
HttpTgInvalidJson = 0x1162,
HttpTgMetricsNull = 0x1163,
HttpTgMetricsSize = 0x1164,
HttpTgMetricNull = 0x1165,
HttpTgMetricType = 0x1166,
HttpTgMetricNameNull = 0x1167,
HttpTgMetricNameLong = 0x1168,
HttpTgTimestampNull = 0x1169,
HttpTgTimestampType = 0x116A,
HttpTgTimestampValNull = 0x116B,
HttpTgTagsNull = 0x116C,
HttpTgTagsSize0 = 0x116D,
HttpTgTagsSizeLong = 0x116E,
HttpTgTagNull = 0x116F,
HttpTgTagNameNull = 0x1170,
HttpTgTagNameSize = 0x1171,
HttpTgTagValueType = 0x1172,
HttpTgTagValueNull = 0x1173,
HttpTgTableNull = 0x1174,
HttpTgTableSize = 0x1175,
HttpTgFieldsNull = 0x1176,
HttpTgFieldsSize0 = 0x1177,
HttpTgFieldsSizeLong = 0x1178,
HttpTgFieldNull = 0x1179,
HttpTgFieldNameNull = 0x117A,
HttpTgFieldNameSize = 0x117B,
HttpTgFieldValueType = 0x117C,
HttpTgFieldValueNull = 0x117D,
HttpTgHostNotString = 0x117E,
HttpTgStableNotExist = 0x117F,
HttpOpDbNotInput = 0x1190,
HttpOpDbTooLong = 0x1191,
HttpOpInvalidJson = 0x1192,
HttpOpMetricsNull = 0x1193,
HttpOpMetricsSize = 0x1194,
HttpOpMetricNull = 0x1195,
HttpOpMetricType = 0x1196,
HttpOpMetricNameNull = 0x1197,
HttpOpMetricNameLong = 0x1198,
HttpOpTimestampNull = 0x1199,
HttpOpTimestampType = 0x119A,
HttpOpTimestampValNull = 0x119B,
HttpOpTagsNull = 0x119C,
HttpOpTagsSize0 = 0x119D,
HttpOpTagsSizeLong = 0x119E,
HttpOpTagNull = 0x119F,
HttpOpTagNameNull = 0x11A0,
HttpOpTagNameSize = 0x11A1,
HttpOpTagValueType = 0x11A2,
HttpOpTagValueNull = 0x11A3,
HttpOpTagValueTooLong = 0x11A4,
HttpOpValueNull = 0x11A5,
HttpOpValueType = 0x11A6,
HttpRequestJsonError = 0x1F00,
OdbcOom = 0x2100,
OdbcConvCharNotNum = 0x2101,
OdbcConvUndef = 0x2102,
OdbcConvTruncFrac = 0x2103,
OdbcConvTrunc = 0x2104,
OdbcConvNotSupport = 0x2105,
OdbcConvOor = 0x2106,
OdbcOutOfRange = 0x2107,
OdbcNotSupport = 0x2108,
OdbcInvalidHandle = 0x2109,
OdbcNoResult = 0x210a,
OdbcNoFields = 0x210b,
OdbcInvalidCursor = 0x210c,
OdbcStatementNotReady = 0x210d,
OdbcConnectionBusy = 0x210e,
OdbcBadConnstr = 0x210f,
OdbcBadArg = 0x2110,
OdbcConvNotValidTs = 0x2111,
OdbcConvSrcTooLarge = 0x2112,
OdbcConvSrcBadSeq = 0x2113,
OdbcConvSrcIncomplete = 0x2114,
OdbcConvSrcGeneral = 0x2115,
FsOutOfMemory = 0x2200,
FsInvldCfg = 0x2201,
FsTooManyMount = 0x2202,
FsDupPrimary = 0x2203,
FsNoPrimaryDisk = 0x2204,
FsNoMountAtTier = 0x2205,
FsFileAlreadyExists = 0x2206,
FsInvldLevel = 0x2207,
FsNoValidDisk = 0x2208,
MonConnectionInvalid = 0x2300,
#[num_enum(default)]
Unknown = 0xffff,
}
use TaosCode::*;
impl fmt::Display for TaosCode {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
write!(f, "{}", *self as i32)
}
}
impl TaosCode {
pub fn success(&self) -> bool {
matches!(self, Success)
}
pub fn rpc_action_in_progress(&self) -> bool {
matches!(self, RpcActionInProgress)
}
pub fn rpc_auth_required(&self) -> bool {
matches!(self, RpcAuthRequired)
}
pub fn rpc_auth_failure(&self) -> bool {
matches!(self, RpcAuthFailure)
}
pub fn rpc_redirect(&self) -> bool {
matches!(self, RpcRedirect)
}
pub fn rpc_not_ready(&self) -> bool {
matches!(self, RpcNotReady)
}
pub fn rpc_already_processed(&self) -> bool {
matches!(self, RpcAlreadyProcessed)
}
pub fn rpc_last_session_not_finished(&self) -> bool {
matches!(self, RpcLastSessionNotFinished)
}
pub fn rpc_mismatched_link_id(&self) -> bool {
matches!(self, RpcMismatchedLinkId)
}
pub fn rpc_too_slow(&self) -> bool {
matches!(self, RpcTooSlow)
}
pub fn rpc_max_sessions(&self) -> bool {
matches!(self, RpcMaxSessions)
}
pub fn rpc_network_unavail(&self) -> bool {
matches!(self, RpcNetworkUnavail)
}
pub fn rpc_app_error(&self) -> bool {
matches!(self, RpcAppError)
}
pub fn rpc_unexpected_response(&self) -> bool {
matches!(self, RpcUnexpectedResponse)
}
pub fn rpc_invalid_value(&self) -> bool {
matches!(self, RpcInvalidValue)
}
pub fn rpc_invalid_tran_id(&self) -> bool {
matches!(self, RpcInvalidTranId)
}
pub fn rpc_invalid_session_id(&self) -> bool {
matches!(self, RpcInvalidSessionId)
}
pub fn rpc_invalid_msg_type(&self) -> bool {
matches!(self, RpcInvalidMsgType)
}
pub fn rpc_invalid_response_type(&self) -> bool {
matches!(self, RpcInvalidResponseType)
}
pub fn rpc_invalid_time_stamp(&self) -> bool {
matches!(self, RpcInvalidTimeStamp)
}
pub fn app_not_ready(&self) -> bool {
matches!(self, AppNotReady)
}
pub fn rpc_fqdn_error(&self) -> bool {
matches!(self, RpcFqdnError)
}
pub fn rpc_invalid_version(&self) -> bool {
matches!(self, RpcInvalidVersion)
}
pub fn com_ops_not_support(&self) -> bool {
matches!(self, ComOpsNotSupport)
}
pub fn com_memory_corrupted(&self) -> bool {
matches!(self, ComMemoryCorrupted)
}
pub fn com_out_of_memory(&self) -> bool {
matches!(self, ComOutOfMemory)
}
pub fn com_invalid_cfg_msg(&self) -> bool {
matches!(self, ComInvalidCfgMsg)
}
pub fn com_file_corrupted(&self) -> bool {
matches!(self, ComFileCorrupted)
}
pub fn ref_no_memory(&self) -> bool {
matches!(self, RefNoMemory)
}
pub fn ref_full(&self) -> bool {
matches!(self, RefFull)
}
pub fn ref_id_removed(&self) -> bool {
matches!(self, RefIdRemoved)
}
pub fn ref_invalid_id(&self) -> bool {
matches!(self, RefInvalidId)
}
pub fn ref_already_exist(&self) -> bool {
matches!(self, RefAlreadyExist)
}
pub fn ref_not_exist(&self) -> bool {
matches!(self, RefNotExist)
}
pub fn tsc_invalid_operation(&self) -> bool {
matches!(self, TscInvalidOperation)
}
pub fn tsc_invalid_qhandle(&self) -> bool {
matches!(self, TscInvalidQhandle)
}
pub fn tsc_invalid_time_stamp(&self) -> bool {
matches!(self, TscInvalidTimeStamp)
}
pub fn tsc_invalid_value(&self) -> bool {
matches!(self, TscInvalidValue)
}
pub fn tsc_invalid_version(&self) -> bool {
matches!(self, TscInvalidVersion)
}
pub fn tsc_invalid_ie(&self) -> bool {
matches!(self, TscInvalidIe)
}
pub fn tsc_invalid_fqdn(&self) -> bool {
matches!(self, TscInvalidFqdn)
}
pub fn tsc_invalid_user_length(&self) -> bool {
matches!(self, TscInvalidUserLength)
}
pub fn tsc_invalid_pass_length(&self) -> bool {
matches!(self, TscInvalidPassLength)
}
pub fn tsc_invalid_db_length(&self) -> bool {
matches!(self, TscInvalidDbLength)
}
pub fn tsc_invalid_table_id_length(&self) -> bool {
matches!(self, TscInvalidTableIdLength)
}
pub fn tsc_invalid_connection(&self) -> bool {
matches!(self, TscInvalidConnection)
}
pub fn tsc_out_of_memory(&self) -> bool {
matches!(self, TscOutOfMemory)
}
pub fn tsc_no_diskspace(&self) -> bool {
matches!(self, TscNoDiskspace)
}
pub fn tsc_query_cache_erased(&self) -> bool {
matches!(self, TscQueryCacheErased)
}
pub fn tsc_query_cancelled(&self) -> bool {
matches!(self, TscQueryCancelled)
}
pub fn tsc_sorted_res_too_many(&self) -> bool {
matches!(self, TscSortedResTooMany)
}
pub fn tsc_app_error(&self) -> bool {
matches!(self, TscAppError)
}
pub fn tsc_action_in_progress(&self) -> bool {
matches!(self, TscActionInProgress)
}
pub fn tsc_disconnected(&self) -> bool {
matches!(self, TscDisconnected)
}
pub fn tsc_no_write_auth(&self) -> bool {
matches!(self, TscNoWriteAuth)
}
pub fn tsc_conn_killed(&self) -> bool {
matches!(self, TscConnKilled)
}
pub fn tsc_sql_syntax_error(&self) -> bool {
matches!(self, TscSqlSyntaxError)
}
pub fn tsc_db_not_selected(&self) -> bool {
matches!(self, TscDbNotSelected)
}
pub fn tsc_invalid_table_name(&self) -> bool {
matches!(self, TscInvalidTableName)
}
pub fn tsc_exceed_sql_limit(&self) -> bool {
matches!(self, TscExceedSqlLimit)
}
pub fn tsc_file_empty(&self) -> bool {
matches!(self, TscFileEmpty)
}
pub fn tsc_line_syntax_error(&self) -> bool {
matches!(self, TscLineSyntaxError)
}
pub fn tsc_no_meta_cached(&self) -> bool {
matches!(self, TscNoMetaCached)
}
pub fn tsc_dup_col_names(&self) -> bool {
matches!(self, TscDupColNames)
}
pub fn tsc_invalid_tag_length(&self) -> bool {
matches!(self, TscInvalidTagLength)
}
pub fn tsc_invalid_column_length(&self) -> bool {
matches!(self, TscInvalidColumnLength)
}
pub fn tsc_dup_tag_names(&self) -> bool {
matches!(self, TscDupTagNames)
}
pub fn tsc_invalid_json(&self) -> bool {
matches!(self, TscInvalidJson)
}
pub fn tsc_invalid_json_type(&self) -> bool {
matches!(self, TscInvalidJsonType)
}
pub fn tsc_invalid_json_config(&self) -> bool {
matches!(self, TscInvalidJsonConfig)
}
pub fn tsc_value_out_of_range(&self) -> bool {
matches!(self, TscValueOutOfRange)
}
pub fn tsc_invalid_protocol_type(&self) -> bool {
matches!(self, TscInvalidProtocolType)
}
pub fn tsc_invalid_precision_type(&self) -> bool {
matches!(self, TscInvalidPrecisionType)
}
pub fn tsc_res_too_many(&self) -> bool {
matches!(self, TscResTooMany)
}
pub fn tsc_invalid_schema_version(&self) -> bool {
matches!(self, TscInvalidSchemaVersion)
}
pub fn mnd_msg_not_processed(&self) -> bool {
matches!(self, MndMsgNotProcessed)
}
pub fn mnd_action_in_progress(&self) -> bool {
matches!(self, MndActionInProgress)
}
pub fn mnd_action_need_reprocessed(&self) -> bool {
matches!(self, MndActionNeedReprocessed)
}
pub fn mnd_no_rights(&self) -> bool {
matches!(self, MndNoRights)
}
pub fn mnd_app_error(&self) -> bool {
matches!(self, MndAppError)
}
pub fn mnd_invalid_connection(&self) -> bool {
matches!(self, MndInvalidConnection)
}
pub fn mnd_invalid_msg_version(&self) -> bool {
matches!(self, MndInvalidMsgVersion)
}
pub fn mnd_invalid_msg_len(&self) -> bool {
matches!(self, MndInvalidMsgLen)
}
pub fn mnd_invalid_msg_type(&self) -> bool {
matches!(self, MndInvalidMsgType)
}
pub fn mnd_too_many_shell_conns(&self) -> bool {
matches!(self, MndTooManyShellConns)
}
pub fn mnd_out_of_memory(&self) -> bool {
matches!(self, MndOutOfMemory)
}
pub fn mnd_invalid_showobj(&self) -> bool {
matches!(self, MndInvalidShowobj)
}
pub fn mnd_invalid_query_id(&self) -> bool {
matches!(self, MndInvalidQueryId)
}
pub fn mnd_invalid_stream_id(&self) -> bool {
matches!(self, MndInvalidStreamId)
}
pub fn mnd_invalid_conn_id(&self) -> bool {
matches!(self, MndInvalidConnId)
}
pub fn mnd_mnode_is_running(&self) -> bool {
matches!(self, MndMnodeIsRunning)
}
pub fn mnd_failed_to_config_sync(&self) -> bool {
matches!(self, MndFailedToConfigSync)
}
pub fn mnd_failed_to_start_sync(&self) -> bool {
matches!(self, MndFailedToStartSync)
}
pub fn mnd_failed_to_create_dir(&self) -> bool {
matches!(self, MndFailedToCreateDir)
}
pub fn mnd_failed_to_init_step(&self) -> bool {
matches!(self, MndFailedToInitStep)
}
pub fn mnd_sdb_obj_already_there(&self) -> bool {
matches!(self, MndSdbObjAlreadyThere)
}
pub fn mnd_sdb_error(&self) -> bool {
matches!(self, MndSdbError)
}
pub fn mnd_sdb_invalid_table_type(&self) -> bool {
matches!(self, MndSdbInvalidTableType)
}
pub fn mnd_sdb_obj_not_there(&self) -> bool {
matches!(self, MndSdbObjNotThere)
}
pub fn mnd_sdb_invaid_meta_row(&self) -> bool {
matches!(self, MndSdbInvaidMetaRow)
}
pub fn mnd_sdb_invaid_key_type(&self) -> bool {
matches!(self, MndSdbInvaidKeyType)
}
pub fn mnd_dnode_already_exist(&self) -> bool {
matches!(self, MndDnodeAlreadyExist)
}
pub fn mnd_dnode_not_exist(&self) -> bool {
matches!(self, MndDnodeNotExist)
}
pub fn mnd_vgroup_not_exist(&self) -> bool {
matches!(self, MndVgroupNotExist)
}
pub fn mnd_no_remove_master(&self) -> bool {
matches!(self, MndNoRemoveMaster)
}
pub fn mnd_no_enough_dnodes(&self) -> bool {
matches!(self, MndNoEnoughDnodes)
}
pub fn mnd_cluster_cfg_inconsistent(&self) -> bool {
matches!(self, MndClusterCfgInconsistent)
}
pub fn mnd_invalid_dnode_cfg_option(&self) -> bool {
matches!(self, MndInvalidDnodeCfgOption)
}
pub fn mnd_balance_enabled(&self) -> bool {
matches!(self, MndBalanceEnabled)
}
pub fn mnd_vgroup_not_in_dnode(&self) -> bool {
matches!(self, MndVgroupNotInDnode)
}
pub fn mnd_vgroup_already_in_dnode(&self) -> bool {
matches!(self, MndVgroupAlreadyInDnode)
}
pub fn mnd_dnode_not_free(&self) -> bool {
matches!(self, MndDnodeNotFree)
}
pub fn mnd_invalid_cluster_id(&self) -> bool {
matches!(self, MndInvalidClusterId)
}
pub fn mnd_not_ready(&self) -> bool {
matches!(self, MndNotReady)
}
pub fn mnd_dnode_id_not_configured(&self) -> bool {
matches!(self, MndDnodeIdNotConfigured)
}
pub fn mnd_dnode_ep_not_configured(&self) -> bool {
matches!(self, MndDnodeEpNotConfigured)
}
pub fn mnd_acct_already_exist(&self) -> bool {
matches!(self, MndAcctAlreadyExist)
}
pub fn mnd_invalid_acct(&self) -> bool {
matches!(self, MndInvalidAcct)
}
pub fn mnd_invalid_acct_option(&self) -> bool {
matches!(self, MndInvalidAcctOption)
}
pub fn mnd_acct_expired(&self) -> bool {
matches!(self, MndAcctExpired)
}
pub fn mnd_user_already_exist(&self) -> bool {
matches!(self, MndUserAlreadyExist)
}
pub fn mnd_invalid_user(&self) -> bool {
matches!(self, MndInvalidUser)
}
pub fn mnd_invalid_user_format(&self) -> bool {
matches!(self, MndInvalidUserFormat)
}
pub fn mnd_invalid_pass_format(&self) -> bool {
matches!(self, MndInvalidPassFormat)
}
pub fn mnd_no_user_from_conn(&self) -> bool {
matches!(self, MndNoUserFromConn)
}
pub fn mnd_too_many_users(&self) -> bool {
matches!(self, MndTooManyUsers)
}
pub fn mnd_table_already_exist(&self) -> bool {
matches!(self, MndTableAlreadyExist)
}
pub fn mnd_invalid_table_id(&self) -> bool {
matches!(self, MndInvalidTableId)
}
pub fn mnd_invalid_table_name(&self) -> bool {
matches!(self, MndInvalidTableName)
}
pub fn mnd_invalid_table_type(&self) -> bool {
matches!(self, MndInvalidTableType)
}
pub fn mnd_too_many_tags(&self) -> bool {
matches!(self, MndTooManyTags)
}
pub fn mnd_too_many_columns(&self) -> bool {
matches!(self, MndTooManyColumns)
}
pub fn mnd_too_many_timeseries(&self) -> bool {
matches!(self, MndTooManyTimeseries)
}
pub fn mnd_not_super_table(&self) -> bool {
matches!(self, MndNotSuperTable)
}
pub fn mnd_col_name_too_long(&self) -> bool {
matches!(self, MndColNameTooLong)
}
pub fn mnd_tag_alreay_exist(&self) -> bool {
matches!(self, MndTagAlreayExist)
}
pub fn mnd_tag_not_exist(&self) -> bool {
matches!(self, MndTagNotExist)
}
pub fn mnd_field_alreay_exist(&self) -> bool {
matches!(self, MndFieldAlreayExist)
}
pub fn mnd_field_not_exist(&self) -> bool {
matches!(self, MndFieldNotExist)
}
pub fn mnd_invalid_stable_name(&self) -> bool {
matches!(self, MndInvalidStableName)
}
pub fn mnd_invalid_create_table_msg(&self) -> bool {
matches!(self, MndInvalidCreateTableMsg)
}
pub fn mnd_exceed_max_row_bytes(&self) -> bool {
matches!(self, MndExceedMaxRowBytes)
}
pub fn mnd_invalid_func_name(&self) -> bool {
matches!(self, MndInvalidFuncName)
}
pub fn mnd_invalid_func_len(&self) -> bool {
matches!(self, MndInvalidFuncLen)
}
pub fn mnd_invalid_func_code(&self) -> bool {
matches!(self, MndInvalidFuncCode)
}
pub fn mnd_func_already_exist(&self) -> bool {
matches!(self, MndFuncAlreadyExist)
}
pub fn mnd_invalid_func(&self) -> bool {
matches!(self, MndInvalidFunc)
}
pub fn mnd_invalid_func_bufsize(&self) -> bool {
matches!(self, MndInvalidFuncBufsize)
}
pub fn mnd_invalid_tag_length(&self) -> bool {
matches!(self, MndInvalidTagLength)
}
pub fn mnd_invalid_column_length(&self) -> bool {
matches!(self, MndInvalidColumnLength)
}
pub fn mnd_db_not_selected(&self) -> bool {
matches!(self, MndDbNotSelected)
}
pub fn mnd_db_already_exist(&self) -> bool {
matches!(self, MndDbAlreadyExist)
}
pub fn mnd_invalid_db_option(&self) -> bool {
matches!(self, MndInvalidDbOption)
}
pub fn mnd_invalid_db(&self) -> bool {
matches!(self, MndInvalidDb)
}
pub fn mnd_monitor_db_forbidden(&self) -> bool {
matches!(self, MndMonitorDbForbidden)
}
pub fn mnd_too_many_databases(&self) -> bool {
matches!(self, MndTooManyDatabases)
}
pub fn mnd_db_in_dropping(&self) -> bool {
matches!(self, MndDbInDropping)
}
pub fn mnd_vgroup_not_ready(&self) -> bool {
matches!(self, MndVgroupNotReady)
}
pub fn mnd_invalid_db_option_days(&self) -> bool {
matches!(self, MndInvalidDbOptionDays)
}
pub fn mnd_invalid_db_option_keep(&self) -> bool {
matches!(self, MndInvalidDbOptionKeep)
}
pub fn mnd_invalid_topic(&self) -> bool {
matches!(self, MndInvalidTopic)
}
pub fn mnd_invalid_topic_option(&self) -> bool {
matches!(self, MndInvalidTopicOption)
}
pub fn mnd_invalid_topic_partitons(&self) -> bool {
matches!(self, MndInvalidTopicPartitons)
}
pub fn mnd_topic_already_exist(&self) -> bool {
matches!(self, MndTopicAlreadyExist)
}
pub fn dnd_msg_not_processed(&self) -> bool {
matches!(self, DndMsgNotProcessed)
}
pub fn dnd_out_of_memory(&self) -> bool {
matches!(self, DndOutOfMemory)
}
pub fn dnd_no_write_access(&self) -> bool {
matches!(self, DndNoWriteAccess)
}
pub fn dnd_invalid_msg_len(&self) -> bool {
matches!(self, DndInvalidMsgLen)
}
pub fn dnd_action_in_progress(&self) -> bool {
matches!(self, DndActionInProgress)
}
pub fn dnd_too_many_vnodes(&self) -> bool {
matches!(self, DndTooManyVnodes)
}
pub fn dnd_exiting(&self) -> bool {
matches!(self, DndExiting)
}
pub fn dnd_vnode_open_failed(&self) -> bool {
matches!(self, DndVnodeOpenFailed)
}
pub fn vnd_action_in_progress(&self) -> bool {
matches!(self, VndActionInProgress)
}
pub fn vnd_msg_not_processed(&self) -> bool {
matches!(self, VndMsgNotProcessed)
}
pub fn vnd_action_need_reprocessed(&self) -> bool {
matches!(self, VndActionNeedReprocessed)
}
pub fn vnd_invalid_vgroup_id(&self) -> bool {
matches!(self, VndInvalidVgroupId)
}
pub fn vnd_init_failed(&self) -> bool {
matches!(self, VndInitFailed)
}
pub fn vnd_no_diskspace(&self) -> bool {
matches!(self, VndNoDiskspace)
}
pub fn vnd_no_disk_permissions(&self) -> bool {
matches!(self, VndNoDiskPermissions)
}
pub fn vnd_no_such_file_or_dir(&self) -> bool {
matches!(self, VndNoSuchFileOrDir)
}
pub fn vnd_out_of_memory(&self) -> bool {
matches!(self, VndOutOfMemory)
}
pub fn vnd_app_error(&self) -> bool {
matches!(self, VndAppError)
}
pub fn vnd_invalid_vresion_file(&self) -> bool {
matches!(self, VndInvalidVresionFile)
}
pub fn vnd_is_full(&self) -> bool {
matches!(self, VndIsFull)
}
pub fn vnd_is_flowctrl(&self) -> bool {
matches!(self, VndIsFlowctrl)
}
pub fn vnd_is_dropping(&self) -> bool {
matches!(self, VndIsDropping)
}
pub fn vnd_is_balancing(&self) -> bool {
matches!(self, VndIsBalancing)
}
pub fn vnd_is_closing(&self) -> bool {
matches!(self, VndIsClosing)
}
pub fn vnd_not_synced(&self) -> bool {
matches!(self, VndNotSynced)
}
pub fn vnd_no_write_auth(&self) -> bool {
matches!(self, VndNoWriteAuth)
}
pub fn vnd_is_syncing(&self) -> bool {
matches!(self, VndIsSyncing)
}
pub fn vnd_invalid_tsdb_state(&self) -> bool {
matches!(self, VndInvalidTsdbState)
}
pub fn wait_thread_too_many(&self) -> bool {
matches!(self, WaitThreadTooMany)
}
pub fn tdb_invalid_table_id(&self) -> bool {
matches!(self, TdbInvalidTableId)
}
pub fn tdb_invalid_table_type(&self) -> bool {
matches!(self, TdbInvalidTableType)
}
pub fn tdb_ivd_tb_schema_version(&self) -> bool {
matches!(self, TdbIvdTbSchemaVersion)
}
pub fn tdb_table_already_exist(&self) -> bool {
matches!(self, TdbTableAlreadyExist)
}
pub fn tdb_invalid_config(&self) -> bool {
matches!(self, TdbInvalidConfig)
}
pub fn tdb_init_failed(&self) -> bool {
matches!(self, TdbInitFailed)
}
pub fn tdb_no_diskspace(&self) -> bool {
matches!(self, TdbNoDiskspace)
}
pub fn tdb_no_disk_permissions(&self) -> bool {
matches!(self, TdbNoDiskPermissions)
}
pub fn tdb_file_corrupted(&self) -> bool {
matches!(self, TdbFileCorrupted)
}
pub fn tdb_out_of_memory(&self) -> bool {
matches!(self, TdbOutOfMemory)
}
pub fn tdb_tag_ver_out_of_date(&self) -> bool {
matches!(self, TdbTagVerOutOfDate)
}
pub fn tdb_timestamp_out_of_range(&self) -> bool {
matches!(self, TdbTimestampOutOfRange)
}
pub fn tdb_submit_msg_mssed_up(&self) -> bool {
matches!(self, TdbSubmitMsgMssedUp)
}
pub fn tdb_invalid_action(&self) -> bool {
matches!(self, TdbInvalidAction)
}
pub fn tdb_invalid_create_tb_msg(&self) -> bool {
matches!(self, TdbInvalidCreateTbMsg)
}
pub fn tdb_no_table_data_in_mem(&self) -> bool {
matches!(self, TdbNoTableDataInMem)
}
pub fn tdb_file_already_exists(&self) -> bool {
matches!(self, TdbFileAlreadyExists)
}
pub fn tdb_table_reconfigure(&self) -> bool {
matches!(self, TdbTableReconfigure)
}
pub fn tdb_ivd_create_table_info(&self) -> bool {
matches!(self, TdbIvdCreateTableInfo)
}
pub fn tdb_no_avail_disk(&self) -> bool {
matches!(self, TdbNoAvailDisk)
}
pub fn tdb_messed_msg(&self) -> bool {
matches!(self, TdbMessedMsg)
}
pub fn tdb_ivld_tag_val(&self) -> bool {
matches!(self, TdbIvldTagVal)
}
pub fn tdb_no_cache_last_row(&self) -> bool {
matches!(self, TdbNoCacheLastRow)
}
pub fn tdb_incomplete_dfileset(&self) -> bool {
matches!(self, TdbIncompleteDfileset)
}
pub fn qry_invalid_qhandle(&self) -> bool {
matches!(self, QryInvalidQhandle)
}
pub fn qry_invalid_msg(&self) -> bool {
matches!(self, QryInvalidMsg)
}
pub fn qry_no_diskspace(&self) -> bool {
matches!(self, QryNoDiskspace)
}
pub fn qry_out_of_memory(&self) -> bool {
matches!(self, QryOutOfMemory)
}
pub fn qry_app_error(&self) -> bool {
matches!(self, QryAppError)
}
pub fn qry_dup_join_key(&self) -> bool {
matches!(self, QryDupJoinKey)
}
pub fn qry_exceed_tags_limit(&self) -> bool {
matches!(self, QryExceedTagsLimit)
}
pub fn qry_not_ready(&self) -> bool {
matches!(self, QryNotReady)
}
pub fn qry_has_rsp(&self) -> bool {
matches!(self, QryHasRsp)
}
pub fn qry_in_exec(&self) -> bool {
matches!(self, QryInExec)
}
pub fn qry_too_many_timewindow(&self) -> bool {
matches!(self, QryTooManyTimewindow)
}
pub fn qry_not_enough_buffer(&self) -> bool {
matches!(self, QryNotEnoughBuffer)
}
pub fn qry_inconsistan(&self) -> bool {
matches!(self, QryInconsistan)
}
pub fn qry_sys_error(&self) -> bool {
matches!(self, QrySysError)
}
pub fn qry_invalid_time_condition(&self) -> bool {
matches!(self, QryInvalidTimeCondition)
}
pub fn qry_invalid_schema_version(&self) -> bool {
matches!(self, QryInvalidSchemaVersion)
}
pub fn qry_result_too_large(&self) -> bool {
matches!(self, QryResultTooLarge)
}
pub fn grant_expired(&self) -> bool {
matches!(self, GrantExpired)
}
pub fn grant_dnode_limited(&self) -> bool {
matches!(self, GrantDnodeLimited)
}
pub fn grant_acct_limited(&self) -> bool {
matches!(self, GrantAcctLimited)
}
pub fn grant_timeseries_limited(&self) -> bool {
matches!(self, GrantTimeseriesLimited)
}
pub fn grant_db_limited(&self) -> bool {
matches!(self, GrantDbLimited)
}
pub fn grant_user_limited(&self) -> bool {
matches!(self, GrantUserLimited)
}
pub fn grant_conn_limited(&self) -> bool {
matches!(self, GrantConnLimited)
}
pub fn grant_stream_limited(&self) -> bool {
matches!(self, GrantStreamLimited)
}
pub fn grant_speed_limited(&self) -> bool {
matches!(self, GrantSpeedLimited)
}
pub fn grant_storage_limited(&self) -> bool {
matches!(self, GrantStorageLimited)
}
pub fn grant_querytime_limited(&self) -> bool {
matches!(self, GrantQuerytimeLimited)
}
pub fn grant_cpu_limited(&self) -> bool {
matches!(self, GrantCpuLimited)
}
pub fn syn_invalid_config(&self) -> bool {
matches!(self, SynInvalidConfig)
}
pub fn syn_not_enabled(&self) -> bool {
matches!(self, SynNotEnabled)
}
pub fn syn_invalid_version(&self) -> bool {
matches!(self, SynInvalidVersion)
}
pub fn syn_confirm_expired(&self) -> bool {
matches!(self, SynConfirmExpired)
}
pub fn syn_too_many_fwdinfo(&self) -> bool {
matches!(self, SynTooManyFwdinfo)
}
pub fn syn_mismatched_protocol(&self) -> bool {
matches!(self, SynMismatchedProtocol)
}
pub fn syn_mismatched_clusterid(&self) -> bool {
matches!(self, SynMismatchedClusterid)
}
pub fn syn_mismatched_signature(&self) -> bool {
matches!(self, SynMismatchedSignature)
}
pub fn syn_invalid_checksum(&self) -> bool {
matches!(self, SynInvalidChecksum)
}
pub fn syn_invalid_msglen(&self) -> bool {
matches!(self, SynInvalidMsglen)
}
pub fn syn_invalid_msgtype(&self) -> bool {
matches!(self, SynInvalidMsgtype)
}
pub fn wal_app_error(&self) -> bool {
matches!(self, WalAppError)
}
pub fn wal_file_corrupted(&self) -> bool {
matches!(self, WalFileCorrupted)
}
pub fn wal_size_limit(&self) -> bool {
matches!(self, WalSizeLimit)
}
pub fn http_server_offline(&self) -> bool {
matches!(self, HttpServerOffline)
}
pub fn http_unsupport_url(&self) -> bool {
matches!(self, HttpUnsupportUrl)
}
pub fn http_invalid_url(&self) -> bool {
matches!(self, HttpInvalidUrl)
}
pub fn http_no_enough_memory(&self) -> bool {
matches!(self, HttpNoEnoughMemory)
}
pub fn http_requset_too_big(&self) -> bool {
matches!(self, HttpRequsetTooBig)
}
pub fn http_no_auth_info(&self) -> bool {
matches!(self, HttpNoAuthInfo)
}
pub fn http_no_msg_input(&self) -> bool {
matches!(self, HttpNoMsgInput)
}
pub fn http_no_sql_input(&self) -> bool {
matches!(self, HttpNoSqlInput)
}
pub fn http_no_exec_usedb(&self) -> bool {
matches!(self, HttpNoExecUsedb)
}
pub fn http_session_full(&self) -> bool {
matches!(self, HttpSessionFull)
}
pub fn http_gen_taosd_token_err(&self) -> bool {
matches!(self, HttpGenTaosdTokenErr)
}
pub fn http_invalid_multi_request(&self) -> bool {
matches!(self, HttpInvalidMultiRequest)
}
pub fn http_create_gzip_failed(&self) -> bool {
matches!(self, HttpCreateGzipFailed)
}
pub fn http_finish_gzip_failed(&self) -> bool {
matches!(self, HttpFinishGzipFailed)
}
pub fn http_login_failed(&self) -> bool {
matches!(self, HttpLoginFailed)
}
pub fn http_invalid_version(&self) -> bool {
matches!(self, HttpInvalidVersion)
}
pub fn http_invalid_content_length(&self) -> bool {
matches!(self, HttpInvalidContentLength)
}
pub fn http_invalid_auth_type(&self) -> bool {
matches!(self, HttpInvalidAuthType)
}
pub fn http_invalid_auth_format(&self) -> bool {
matches!(self, HttpInvalidAuthFormat)
}
pub fn http_invalid_basic_auth(&self) -> bool {
matches!(self, HttpInvalidBasicAuth)
}
pub fn http_invalid_taosd_auth(&self) -> bool {
matches!(self, HttpInvalidTaosdAuth)
}
pub fn http_parse_method_failed(&self) -> bool {
matches!(self, HttpParseMethodFailed)
}
pub fn http_parse_target_failed(&self) -> bool {
matches!(self, HttpParseTargetFailed)
}
pub fn http_parse_version_failed(&self) -> bool {
matches!(self, HttpParseVersionFailed)
}
pub fn http_parse_sp_failed(&self) -> bool {
matches!(self, HttpParseSpFailed)
}
pub fn http_parse_status_failed(&self) -> bool {
matches!(self, HttpParseStatusFailed)
}
pub fn http_parse_phrase_failed(&self) -> bool {
matches!(self, HttpParsePhraseFailed)
}
pub fn http_parse_crlf_failed(&self) -> bool {
matches!(self, HttpParseCrlfFailed)
}
pub fn http_parse_header_failed(&self) -> bool {
matches!(self, HttpParseHeaderFailed)
}
pub fn http_parse_header_key_failed(&self) -> bool {
matches!(self, HttpParseHeaderKeyFailed)
}
pub fn http_parse_header_val_failed(&self) -> bool {
matches!(self, HttpParseHeaderValFailed)
}
pub fn http_parse_chunk_size_failed(&self) -> bool {
matches!(self, HttpParseChunkSizeFailed)
}
pub fn http_parse_chunk_failed(&self) -> bool {
matches!(self, HttpParseChunkFailed)
}
pub fn http_parse_end_failed(&self) -> bool {
matches!(self, HttpParseEndFailed)
}
pub fn http_parse_invalid_state(&self) -> bool {
matches!(self, HttpParseInvalidState)
}
pub fn http_parse_error_state(&self) -> bool {
matches!(self, HttpParseErrorState)
}
pub fn http_gc_query_null(&self) -> bool {
matches!(self, HttpGcQueryNull)
}
pub fn http_gc_query_size(&self) -> bool {
matches!(self, HttpGcQuerySize)
}
pub fn http_gc_req_parse_error(&self) -> bool {
matches!(self, HttpGcReqParseError)
}
pub fn http_tg_db_not_input(&self) -> bool {
matches!(self, HttpTgDbNotInput)
}
pub fn http_tg_db_too_long(&self) -> bool {
matches!(self, HttpTgDbTooLong)
}
pub fn http_tg_invalid_json(&self) -> bool {
matches!(self, HttpTgInvalidJson)
}
pub fn http_tg_metrics_null(&self) -> bool {
matches!(self, HttpTgMetricsNull)
}
pub fn http_tg_metrics_size(&self) -> bool {
matches!(self, HttpTgMetricsSize)
}
pub fn http_tg_metric_null(&self) -> bool {
matches!(self, HttpTgMetricNull)
}
pub fn http_tg_metric_type(&self) -> bool {
matches!(self, HttpTgMetricType)
}
pub fn http_tg_metric_name_null(&self) -> bool {
matches!(self, HttpTgMetricNameNull)
}
pub fn http_tg_metric_name_long(&self) -> bool {
matches!(self, HttpTgMetricNameLong)
}
pub fn http_tg_timestamp_null(&self) -> bool {
matches!(self, HttpTgTimestampNull)
}
pub fn http_tg_timestamp_type(&self) -> bool {
matches!(self, HttpTgTimestampType)
}
pub fn http_tg_timestamp_val_null(&self) -> bool {
matches!(self, HttpTgTimestampValNull)
}
pub fn http_tg_tags_null(&self) -> bool {
matches!(self, HttpTgTagsNull)
}
pub fn http_tg_tags_size_0(&self) -> bool {
matches!(self, HttpTgTagsSize0)
}
pub fn http_tg_tags_size_long(&self) -> bool {
matches!(self, HttpTgTagsSizeLong)
}
pub fn http_tg_tag_null(&self) -> bool {
matches!(self, HttpTgTagNull)
}
pub fn http_tg_tag_name_null(&self) -> bool {
matches!(self, HttpTgTagNameNull)
}
pub fn http_tg_tag_name_size(&self) -> bool {
matches!(self, HttpTgTagNameSize)
}
pub fn http_tg_tag_value_type(&self) -> bool {
matches!(self, HttpTgTagValueType)
}
pub fn http_tg_tag_value_null(&self) -> bool {
matches!(self, HttpTgTagValueNull)
}
pub fn http_tg_table_null(&self) -> bool {
matches!(self, HttpTgTableNull)
}
pub fn http_tg_table_size(&self) -> bool {
matches!(self, HttpTgTableSize)
}
pub fn http_tg_fields_null(&self) -> bool {
matches!(self, HttpTgFieldsNull)
}
pub fn http_tg_fields_size_0(&self) -> bool {
matches!(self, HttpTgFieldsSize0)
}
pub fn http_tg_fields_size_long(&self) -> bool {
matches!(self, HttpTgFieldsSizeLong)
}
pub fn http_tg_field_null(&self) -> bool {
matches!(self, HttpTgFieldNull)
}
pub fn http_tg_field_name_null(&self) -> bool {
matches!(self, HttpTgFieldNameNull)
}
pub fn http_tg_field_name_size(&self) -> bool {
matches!(self, HttpTgFieldNameSize)
}
pub fn http_tg_field_value_type(&self) -> bool {
matches!(self, HttpTgFieldValueType)
}
pub fn http_tg_field_value_null(&self) -> bool {
matches!(self, HttpTgFieldValueNull)
}
pub fn http_tg_host_not_string(&self) -> bool {
matches!(self, HttpTgHostNotString)
}
pub fn http_tg_stable_not_exist(&self) -> bool {
matches!(self, HttpTgStableNotExist)
}
pub fn http_op_db_not_input(&self) -> bool {
matches!(self, HttpOpDbNotInput)
}
pub fn http_op_db_too_long(&self) -> bool {
matches!(self, HttpOpDbTooLong)
}
pub fn http_op_invalid_json(&self) -> bool {
matches!(self, HttpOpInvalidJson)
}
pub fn http_op_metrics_null(&self) -> bool {
matches!(self, HttpOpMetricsNull)
}
pub fn http_op_metrics_size(&self) -> bool {
matches!(self, HttpOpMetricsSize)
}
pub fn http_op_metric_null(&self) -> bool {
matches!(self, HttpOpMetricNull)
}
pub fn http_op_metric_type(&self) -> bool {
matches!(self, HttpOpMetricType)
}
pub fn http_op_metric_name_null(&self) -> bool {
matches!(self, HttpOpMetricNameNull)
}
pub fn http_op_metric_name_long(&self) -> bool {
matches!(self, HttpOpMetricNameLong)
}
pub fn http_op_timestamp_null(&self) -> bool {
matches!(self, HttpOpTimestampNull)
}
pub fn http_op_timestamp_type(&self) -> bool {
matches!(self, HttpOpTimestampType)
}
pub fn http_op_timestamp_val_null(&self) -> bool {
matches!(self, HttpOpTimestampValNull)
}
pub fn http_op_tags_null(&self) -> bool {
matches!(self, HttpOpTagsNull)
}
pub fn http_op_tags_size_0(&self) -> bool {
matches!(self, HttpOpTagsSize0)
}
pub fn http_op_tags_size_long(&self) -> bool {
matches!(self, HttpOpTagsSizeLong)
}
pub fn http_op_tag_null(&self) -> bool {
matches!(self, HttpOpTagNull)
}
pub fn http_op_tag_name_null(&self) -> bool {
matches!(self, HttpOpTagNameNull)
}
pub fn http_op_tag_name_size(&self) -> bool {
matches!(self, HttpOpTagNameSize)
}
pub fn http_op_tag_value_type(&self) -> bool {
matches!(self, HttpOpTagValueType)
}
pub fn http_op_tag_value_null(&self) -> bool {
matches!(self, HttpOpTagValueNull)
}
pub fn http_op_tag_value_too_long(&self) -> bool {
matches!(self, HttpOpTagValueTooLong)
}
pub fn http_op_value_null(&self) -> bool {
matches!(self, HttpOpValueNull)
}
pub fn http_op_value_type(&self) -> bool {
matches!(self, HttpOpValueType)
}
pub fn http_request_json_error(&self) -> bool {
matches!(self, HttpRequestJsonError)
}
pub fn odbc_oom(&self) -> bool {
matches!(self, OdbcOom)
}
pub fn odbc_conv_char_not_num(&self) -> bool {
matches!(self, OdbcConvCharNotNum)
}
pub fn odbc_conv_undef(&self) -> bool {
matches!(self, OdbcConvUndef)
}
pub fn odbc_conv_trunc_frac(&self) -> bool {
matches!(self, OdbcConvTruncFrac)
}
pub fn odbc_conv_trunc(&self) -> bool {
matches!(self, OdbcConvTrunc)
}
pub fn odbc_conv_not_support(&self) -> bool {
matches!(self, OdbcConvNotSupport)
}
pub fn odbc_conv_oor(&self) -> bool {
matches!(self, OdbcConvOor)
}
pub fn odbc_out_of_range(&self) -> bool {
matches!(self, OdbcOutOfRange)
}
pub fn odbc_not_support(&self) -> bool {
matches!(self, OdbcNotSupport)
}
pub fn odbc_invalid_handle(&self) -> bool {
matches!(self, OdbcInvalidHandle)
}
pub fn odbc_no_result(&self) -> bool {
matches!(self, OdbcNoResult)
}
pub fn odbc_no_fields(&self) -> bool {
matches!(self, OdbcNoFields)
}
pub fn odbc_invalid_cursor(&self) -> bool {
matches!(self, OdbcInvalidCursor)
}
pub fn odbc_statement_not_ready(&self) -> bool {
matches!(self, OdbcStatementNotReady)
}
pub fn odbc_connection_busy(&self) -> bool {
matches!(self, OdbcConnectionBusy)
}
pub fn odbc_bad_connstr(&self) -> bool {
matches!(self, OdbcBadConnstr)
}
pub fn odbc_bad_arg(&self) -> bool {
matches!(self, OdbcBadArg)
}
pub fn odbc_conv_not_valid_ts(&self) -> bool {
matches!(self, OdbcConvNotValidTs)
}
pub fn odbc_conv_src_too_large(&self) -> bool {
matches!(self, OdbcConvSrcTooLarge)
}
pub fn odbc_conv_src_bad_seq(&self) -> bool {
matches!(self, OdbcConvSrcBadSeq)
}
pub fn odbc_conv_src_incomplete(&self) -> bool {
matches!(self, OdbcConvSrcIncomplete)
}
pub fn odbc_conv_src_general(&self) -> bool {
matches!(self, OdbcConvSrcGeneral)
}
pub fn fs_out_of_memory(&self) -> bool {
matches!(self, FsOutOfMemory)
}
pub fn fs_invld_cfg(&self) -> bool {
matches!(self, FsInvldCfg)
}
pub fn fs_too_many_mount(&self) -> bool {
matches!(self, FsTooManyMount)
}
pub fn fs_dup_primary(&self) -> bool {
matches!(self, FsDupPrimary)
}
pub fn fs_no_primary_disk(&self) -> bool {
matches!(self, FsNoPrimaryDisk)
}
pub fn fs_no_mount_at_tier(&self) -> bool {
matches!(self, FsNoMountAtTier)
}
pub fn fs_file_already_exists(&self) -> bool {
matches!(self, FsFileAlreadyExists)
}
pub fn fs_invld_level(&self) -> bool {
matches!(self, FsInvldLevel)
}
pub fn fs_no_valid_disk(&self) -> bool {
matches!(self, FsNoValidDisk)
}
pub fn mon_connection_invalid(&self) -> bool {
matches!(self, MonConnectionInvalid)
}
}
#[test]
fn test_code_from() {
let c = dbg!(TaosCode::from(0));
assert_eq!(c, Success);
assert!(c.success());
let c = TaosCode::from(-1);
assert_eq!(c, Unknown);
}
#[test]
fn test_codes() {
let code = TaosCode::from(0);
assert!(code.success());
assert_eq!(code, TaosCode::Success);
let c = TaosCode::from(0x0001);
assert!(c.rpc_action_in_progress());
assert_eq!(c, RpcActionInProgress);
let c = TaosCode::from(0x0002);
assert!(c.rpc_auth_required());
assert_eq!(c, RpcAuthRequired);
let c = TaosCode::from(0x0003);
assert!(c.rpc_auth_failure());
assert_eq!(c, RpcAuthFailure);
let c = TaosCode::from(0x0004);
assert!(c.rpc_redirect());
assert_eq!(c, RpcRedirect);
let c = TaosCode::from(0x0005);
assert!(c.rpc_not_ready());
assert_eq!(c, RpcNotReady);
let c = TaosCode::from(0x0006);
assert!(c.rpc_already_processed());
assert_eq!(c, RpcAlreadyProcessed);
let c = TaosCode::from(0x0007);
assert!(c.rpc_last_session_not_finished());
assert_eq!(c, RpcLastSessionNotFinished);
let c = TaosCode::from(0x0008);
assert!(c.rpc_mismatched_link_id());
assert_eq!(c, RpcMismatchedLinkId);
let c = TaosCode::from(0x0009);
assert!(c.rpc_too_slow());
assert_eq!(c, RpcTooSlow);
let c = TaosCode::from(0x000A);
assert!(c.rpc_max_sessions());
assert_eq!(c, RpcMaxSessions);
let c = TaosCode::from(0x000B);
assert!(c.rpc_network_unavail());
assert_eq!(c, RpcNetworkUnavail);
let c = TaosCode::from(0x000C);
assert!(c.rpc_app_error());
assert_eq!(c, RpcAppError);
let c = TaosCode::from(0x000D);
assert!(c.rpc_unexpected_response());
assert_eq!(c, RpcUnexpectedResponse);
let c = TaosCode::from(0x000E);
assert!(c.rpc_invalid_value());
assert_eq!(c, RpcInvalidValue);
let c = TaosCode::from(0x000F);
assert!(c.rpc_invalid_tran_id());
assert_eq!(c, RpcInvalidTranId);
let c = TaosCode::from(0x0010);
assert!(c.rpc_invalid_session_id());
assert_eq!(c, RpcInvalidSessionId);
let c = TaosCode::from(0x0011);
assert!(c.rpc_invalid_msg_type());
assert_eq!(c, RpcInvalidMsgType);
let c = TaosCode::from(0x0012);
assert!(c.rpc_invalid_response_type());
assert_eq!(c, RpcInvalidResponseType);
let c = TaosCode::from(0x0013);
assert!(c.rpc_invalid_time_stamp());
assert_eq!(c, RpcInvalidTimeStamp);
let c = TaosCode::from(0x0014);
assert!(c.app_not_ready());
assert_eq!(c, AppNotReady);
let c = TaosCode::from(0x0015);
assert!(c.rpc_fqdn_error());
assert_eq!(c, RpcFqdnError);
let c = TaosCode::from(0x0016);
assert!(c.rpc_invalid_version());
assert_eq!(c, RpcInvalidVersion);
let c = TaosCode::from(0x0100);
assert!(c.com_ops_not_support());
assert_eq!(c, ComOpsNotSupport);
let c = TaosCode::from(0x0101);
assert!(c.com_memory_corrupted());
assert_eq!(c, ComMemoryCorrupted);
let c = TaosCode::from(0x0102);
assert!(c.com_out_of_memory());
assert_eq!(c, ComOutOfMemory);
let c = TaosCode::from(0x0103);
assert!(c.com_invalid_cfg_msg());
assert_eq!(c, ComInvalidCfgMsg);
let c = TaosCode::from(0x0104);
assert!(c.com_file_corrupted());
assert_eq!(c, ComFileCorrupted);
let c = TaosCode::from(0x0105);
assert!(c.ref_no_memory());
assert_eq!(c, RefNoMemory);
let c = TaosCode::from(0x0106);
assert!(c.ref_full());
assert_eq!(c, RefFull);
let c = TaosCode::from(0x0107);
assert!(c.ref_id_removed());
assert_eq!(c, RefIdRemoved);
let c = TaosCode::from(0x0108);
assert!(c.ref_invalid_id());
assert_eq!(c, RefInvalidId);
let c = TaosCode::from(0x0109);
assert!(c.ref_already_exist());
assert_eq!(c, RefAlreadyExist);
let c = TaosCode::from(0x010A);
assert!(c.ref_not_exist());
assert_eq!(c, RefNotExist);
let c = TaosCode::from(0x0200);
assert!(c.tsc_invalid_operation());
assert_eq!(c, TscInvalidOperation);
let c = TaosCode::from(0x0201);
assert!(c.tsc_invalid_qhandle());
assert_eq!(c, TscInvalidQhandle);
let c = TaosCode::from(0x0202);
assert!(c.tsc_invalid_time_stamp());
assert_eq!(c, TscInvalidTimeStamp);
let c = TaosCode::from(0x0203);
assert!(c.tsc_invalid_value());
assert_eq!(c, TscInvalidValue);
let c = TaosCode::from(0x0204);
assert!(c.tsc_invalid_version());
assert_eq!(c, TscInvalidVersion);
let c = TaosCode::from(0x0205);
assert!(c.tsc_invalid_ie());
assert_eq!(c, TscInvalidIe);
let c = TaosCode::from(0x0206);
assert!(c.tsc_invalid_fqdn());
assert_eq!(c, TscInvalidFqdn);
let c = TaosCode::from(0x0207);
assert!(c.tsc_invalid_user_length());
assert_eq!(c, TscInvalidUserLength);
let c = TaosCode::from(0x0208);
assert!(c.tsc_invalid_pass_length());
assert_eq!(c, TscInvalidPassLength);
let c = TaosCode::from(0x0209);
assert!(c.tsc_invalid_db_length());
assert_eq!(c, TscInvalidDbLength);
let c = TaosCode::from(0x020A);
assert!(c.tsc_invalid_table_id_length());
assert_eq!(c, TscInvalidTableIdLength);
let c = TaosCode::from(0x020B);
assert!(c.tsc_invalid_connection());
assert_eq!(c, TscInvalidConnection);
let c = TaosCode::from(0x020C);
assert!(c.tsc_out_of_memory());
assert_eq!(c, TscOutOfMemory);
let c = TaosCode::from(0x020D);
assert!(c.tsc_no_diskspace());
assert_eq!(c, TscNoDiskspace);
let c = TaosCode::from(0x020E);
assert!(c.tsc_query_cache_erased());
assert_eq!(c, TscQueryCacheErased);
let c = TaosCode::from(0x020F);
assert!(c.tsc_query_cancelled());
assert_eq!(c, TscQueryCancelled);
let c = TaosCode::from(0x0210);
assert!(c.tsc_sorted_res_too_many());
assert_eq!(c, TscSortedResTooMany);
let c = TaosCode::from(0x0211);
assert!(c.tsc_app_error());
assert_eq!(c, TscAppError);
let c = TaosCode::from(0x0212);
assert!(c.tsc_action_in_progress());
assert_eq!(c, TscActionInProgress);
let c = TaosCode::from(0x0213);
assert!(c.tsc_disconnected());
assert_eq!(c, TscDisconnected);
let c = TaosCode::from(0x0214);
assert!(c.tsc_no_write_auth());
assert_eq!(c, TscNoWriteAuth);
let c = TaosCode::from(0x0215);
assert!(c.tsc_conn_killed());
assert_eq!(c, TscConnKilled);
let c = TaosCode::from(0x0216);
assert!(c.tsc_sql_syntax_error());
assert_eq!(c, TscSqlSyntaxError);
let c = TaosCode::from(0x0217);
assert!(c.tsc_db_not_selected());
assert_eq!(c, TscDbNotSelected);
let c = TaosCode::from(0x0218);
assert!(c.tsc_invalid_table_name());
assert_eq!(c, TscInvalidTableName);
let c = TaosCode::from(0x0219);
assert!(c.tsc_exceed_sql_limit());
assert_eq!(c, TscExceedSqlLimit);
let c = TaosCode::from(0x021A);
assert!(c.tsc_file_empty());
assert_eq!(c, TscFileEmpty);
let c = TaosCode::from(0x021B);
assert!(c.tsc_line_syntax_error());
assert_eq!(c, TscLineSyntaxError);
let c = TaosCode::from(0x021C);
assert!(c.tsc_no_meta_cached());
assert_eq!(c, TscNoMetaCached);
let c = TaosCode::from(0x021D);
assert!(c.tsc_dup_col_names());
assert_eq!(c, TscDupColNames);
let c = TaosCode::from(0x021E);
assert!(c.tsc_invalid_tag_length());
assert_eq!(c, TscInvalidTagLength);
let c = TaosCode::from(0x021F);
assert!(c.tsc_invalid_column_length());
assert_eq!(c, TscInvalidColumnLength);
let c = TaosCode::from(0x0220);
assert!(c.tsc_dup_tag_names());
assert_eq!(c, TscDupTagNames);
let c = TaosCode::from(0x0221);
assert!(c.tsc_invalid_json());
assert_eq!(c, TscInvalidJson);
let c = TaosCode::from(0x0222);
assert!(c.tsc_invalid_json_type());
assert_eq!(c, TscInvalidJsonType);
let c = TaosCode::from(0x0223);
assert!(c.tsc_invalid_json_config());
assert_eq!(c, TscInvalidJsonConfig);
let c = TaosCode::from(0x0224);
assert!(c.tsc_value_out_of_range());
assert_eq!(c, TscValueOutOfRange);
let c = TaosCode::from(0x0225);
assert!(c.tsc_invalid_protocol_type());
assert_eq!(c, TscInvalidProtocolType);
let c = TaosCode::from(0x0226);
assert!(c.tsc_invalid_precision_type());
assert_eq!(c, TscInvalidPrecisionType);
let c = TaosCode::from(0x0227);
assert!(c.tsc_res_too_many());
assert_eq!(c, TscResTooMany);
let c = TaosCode::from(0x0228);
assert!(c.tsc_invalid_schema_version());
assert_eq!(c, TscInvalidSchemaVersion);
let c = TaosCode::from(0x0300);
assert!(c.mnd_msg_not_processed());
assert_eq!(c, MndMsgNotProcessed);
let c = TaosCode::from(0x0301);
assert!(c.mnd_action_in_progress());
assert_eq!(c, MndActionInProgress);
let c = TaosCode::from(0x0302);
assert!(c.mnd_action_need_reprocessed());
assert_eq!(c, MndActionNeedReprocessed);
let c = TaosCode::from(0x0303);
assert!(c.mnd_no_rights());
assert_eq!(c, MndNoRights);
let c = TaosCode::from(0x0304);
assert!(c.mnd_app_error());
assert_eq!(c, MndAppError);
let c = TaosCode::from(0x0305);
assert!(c.mnd_invalid_connection());
assert_eq!(c, MndInvalidConnection);
let c = TaosCode::from(0x0306);
assert!(c.mnd_invalid_msg_version());
assert_eq!(c, MndInvalidMsgVersion);
let c = TaosCode::from(0x0307);
assert!(c.mnd_invalid_msg_len());
assert_eq!(c, MndInvalidMsgLen);
let c = TaosCode::from(0x0308);
assert!(c.mnd_invalid_msg_type());
assert_eq!(c, MndInvalidMsgType);
let c = TaosCode::from(0x0309);
assert!(c.mnd_too_many_shell_conns());
assert_eq!(c, MndTooManyShellConns);
let c = TaosCode::from(0x030A);
assert!(c.mnd_out_of_memory());
assert_eq!(c, MndOutOfMemory);
let c = TaosCode::from(0x030B);
assert!(c.mnd_invalid_showobj());
assert_eq!(c, MndInvalidShowobj);
let c = TaosCode::from(0x030C);
assert!(c.mnd_invalid_query_id());
assert_eq!(c, MndInvalidQueryId);
let c = TaosCode::from(0x030D);
assert!(c.mnd_invalid_stream_id());
assert_eq!(c, MndInvalidStreamId);
let c = TaosCode::from(0x030E);
assert!(c.mnd_invalid_conn_id());
assert_eq!(c, MndInvalidConnId);
let c = TaosCode::from(0x0310);
assert!(c.mnd_mnode_is_running());
assert_eq!(c, MndMnodeIsRunning);
let c = TaosCode::from(0x0311);
assert!(c.mnd_failed_to_config_sync());
assert_eq!(c, MndFailedToConfigSync);
let c = TaosCode::from(0x0312);
assert!(c.mnd_failed_to_start_sync());
assert_eq!(c, MndFailedToStartSync);
let c = TaosCode::from(0x0313);
assert!(c.mnd_failed_to_create_dir());
assert_eq!(c, MndFailedToCreateDir);
let c = TaosCode::from(0x0314);
assert!(c.mnd_failed_to_init_step());
assert_eq!(c, MndFailedToInitStep);
let c = TaosCode::from(0x0320);
assert!(c.mnd_sdb_obj_already_there());
assert_eq!(c, MndSdbObjAlreadyThere);
let c = TaosCode::from(0x0321);
assert!(c.mnd_sdb_error());
assert_eq!(c, MndSdbError);
let c = TaosCode::from(0x0322);
assert!(c.mnd_sdb_invalid_table_type());
assert_eq!(c, MndSdbInvalidTableType);
let c = TaosCode::from(0x0323);
assert!(c.mnd_sdb_obj_not_there());
assert_eq!(c, MndSdbObjNotThere);
let c = TaosCode::from(0x0324);
assert!(c.mnd_sdb_invaid_meta_row());
assert_eq!(c, MndSdbInvaidMetaRow);
let c = TaosCode::from(0x0325);
assert!(c.mnd_sdb_invaid_key_type());
assert_eq!(c, MndSdbInvaidKeyType);
let c = TaosCode::from(0x0330);
assert!(c.mnd_dnode_already_exist());
assert_eq!(c, MndDnodeAlreadyExist);
let c = TaosCode::from(0x0331);
assert!(c.mnd_dnode_not_exist());
assert_eq!(c, MndDnodeNotExist);
let c = TaosCode::from(0x0332);
assert!(c.mnd_vgroup_not_exist());
assert_eq!(c, MndVgroupNotExist);
let c = TaosCode::from(0x0333);
assert!(c.mnd_no_remove_master());
assert_eq!(c, MndNoRemoveMaster);
let c = TaosCode::from(0x0334);
assert!(c.mnd_no_enough_dnodes());
assert_eq!(c, MndNoEnoughDnodes);
let c = TaosCode::from(0x0335);
assert!(c.mnd_cluster_cfg_inconsistent());
assert_eq!(c, MndClusterCfgInconsistent);
let c = TaosCode::from(0x0336);
assert!(c.mnd_invalid_dnode_cfg_option());
assert_eq!(c, MndInvalidDnodeCfgOption);
let c = TaosCode::from(0x0337);
assert!(c.mnd_balance_enabled());
assert_eq!(c, MndBalanceEnabled);
let c = TaosCode::from(0x0338);
assert!(c.mnd_vgroup_not_in_dnode());
assert_eq!(c, MndVgroupNotInDnode);
let c = TaosCode::from(0x0339);
assert!(c.mnd_vgroup_already_in_dnode());
assert_eq!(c, MndVgroupAlreadyInDnode);
let c = TaosCode::from(0x033A);
assert!(c.mnd_dnode_not_free());
assert_eq!(c, MndDnodeNotFree);
let c = TaosCode::from(0x033B);
assert!(c.mnd_invalid_cluster_id());
assert_eq!(c, MndInvalidClusterId);
let c = TaosCode::from(0x033C);
assert!(c.mnd_not_ready());
assert_eq!(c, MndNotReady);
let c = TaosCode::from(0x033D);
assert!(c.mnd_dnode_id_not_configured());
assert_eq!(c, MndDnodeIdNotConfigured);
let c = TaosCode::from(0x033E);
assert!(c.mnd_dnode_ep_not_configured());
assert_eq!(c, MndDnodeEpNotConfigured);
let c = TaosCode::from(0x0340);
assert!(c.mnd_acct_already_exist());
assert_eq!(c, MndAcctAlreadyExist);
let c = TaosCode::from(0x0341);
assert!(c.mnd_invalid_acct());
assert_eq!(c, MndInvalidAcct);
let c = TaosCode::from(0x0342);
assert!(c.mnd_invalid_acct_option());
assert_eq!(c, MndInvalidAcctOption);
let c = TaosCode::from(0x0343);
assert!(c.mnd_acct_expired());
assert_eq!(c, MndAcctExpired);
let c = TaosCode::from(0x0350);
assert!(c.mnd_user_already_exist());
assert_eq!(c, MndUserAlreadyExist);
let c = TaosCode::from(0x0351);
assert!(c.mnd_invalid_user());
assert_eq!(c, MndInvalidUser);
let c = TaosCode::from(0x0352);
assert!(c.mnd_invalid_user_format());
assert_eq!(c, MndInvalidUserFormat);
let c = TaosCode::from(0x0353);
assert!(c.mnd_invalid_pass_format());
assert_eq!(c, MndInvalidPassFormat);
let c = TaosCode::from(0x0354);
assert!(c.mnd_no_user_from_conn());
assert_eq!(c, MndNoUserFromConn);
let c = TaosCode::from(0x0355);
assert!(c.mnd_too_many_users());
assert_eq!(c, MndTooManyUsers);
let c = TaosCode::from(0x0360);
assert!(c.mnd_table_already_exist());
assert_eq!(c, MndTableAlreadyExist);
let c = TaosCode::from(0x0361);
assert!(c.mnd_invalid_table_id());
assert_eq!(c, MndInvalidTableId);
let c = TaosCode::from(0x0362);
assert!(c.mnd_invalid_table_name());
assert_eq!(c, MndInvalidTableName);
let c = TaosCode::from(0x0363);
assert!(c.mnd_invalid_table_type());
assert_eq!(c, MndInvalidTableType);
let c = TaosCode::from(0x0364);
assert!(c.mnd_too_many_tags());
assert_eq!(c, MndTooManyTags);
let c = TaosCode::from(0x0365);
assert!(c.mnd_too_many_columns());
assert_eq!(c, MndTooManyColumns);
let c = TaosCode::from(0x0366);
assert!(c.mnd_too_many_timeseries());
assert_eq!(c, MndTooManyTimeseries);
let c = TaosCode::from(0x0367);
assert!(c.mnd_not_super_table());
assert_eq!(c, MndNotSuperTable);
let c = TaosCode::from(0x0368);
assert!(c.mnd_col_name_too_long());
assert_eq!(c, MndColNameTooLong);
let c = TaosCode::from(0x0369);
assert!(c.mnd_tag_alreay_exist());
assert_eq!(c, MndTagAlreayExist);
let c = TaosCode::from(0x036A);
assert!(c.mnd_tag_not_exist());
assert_eq!(c, MndTagNotExist);
let c = TaosCode::from(0x036B);
assert!(c.mnd_field_alreay_exist());
assert_eq!(c, MndFieldAlreayExist);
let c = TaosCode::from(0x036C);
assert!(c.mnd_field_not_exist());
assert_eq!(c, MndFieldNotExist);
let c = TaosCode::from(0x036D);
assert!(c.mnd_invalid_stable_name());
assert_eq!(c, MndInvalidStableName);
let c = TaosCode::from(0x036E);
assert!(c.mnd_invalid_create_table_msg());
assert_eq!(c, MndInvalidCreateTableMsg);
let c = TaosCode::from(0x036F);
assert!(c.mnd_exceed_max_row_bytes());
assert_eq!(c, MndExceedMaxRowBytes);
let c = TaosCode::from(0x0370);
assert!(c.mnd_invalid_func_name());
assert_eq!(c, MndInvalidFuncName);
let c = TaosCode::from(0x0371);
assert!(c.mnd_invalid_func_len());
assert_eq!(c, MndInvalidFuncLen);
let c = TaosCode::from(0x0372);
assert!(c.mnd_invalid_func_code());
assert_eq!(c, MndInvalidFuncCode);
let c = TaosCode::from(0x0373);
assert!(c.mnd_func_already_exist());
assert_eq!(c, MndFuncAlreadyExist);
let c = TaosCode::from(0x0374);
assert!(c.mnd_invalid_func());
assert_eq!(c, MndInvalidFunc);
let c = TaosCode::from(0x0375);
assert!(c.mnd_invalid_func_bufsize());
assert_eq!(c, MndInvalidFuncBufsize);
let c = TaosCode::from(0x0376);
assert!(c.mnd_invalid_tag_length());
assert_eq!(c, MndInvalidTagLength);
let c = TaosCode::from(0x0377);
assert!(c.mnd_invalid_column_length());
assert_eq!(c, MndInvalidColumnLength);
let c = TaosCode::from(0x0380);
assert!(c.mnd_db_not_selected());
assert_eq!(c, MndDbNotSelected);
let c = TaosCode::from(0x0381);
assert!(c.mnd_db_already_exist());
assert_eq!(c, MndDbAlreadyExist);
let c = TaosCode::from(0x0382);
assert!(c.mnd_invalid_db_option());
assert_eq!(c, MndInvalidDbOption);
let c = TaosCode::from(0x0383);
assert!(c.mnd_invalid_db());
assert_eq!(c, MndInvalidDb);
let c = TaosCode::from(0x0384);
assert!(c.mnd_monitor_db_forbidden());
assert_eq!(c, MndMonitorDbForbidden);
let c = TaosCode::from(0x0385);
assert!(c.mnd_too_many_databases());
assert_eq!(c, MndTooManyDatabases);
let c = TaosCode::from(0x0386);
assert!(c.mnd_db_in_dropping());
assert_eq!(c, MndDbInDropping);
let c = TaosCode::from(0x0387);
assert!(c.mnd_vgroup_not_ready());
assert_eq!(c, MndVgroupNotReady);
let c = TaosCode::from(0x0390);
assert!(c.mnd_invalid_db_option_days());
assert_eq!(c, MndInvalidDbOptionDays);
let c = TaosCode::from(0x0391);
assert!(c.mnd_invalid_db_option_keep());
assert_eq!(c, MndInvalidDbOptionKeep);
let c = TaosCode::from(0x0392);
assert!(c.mnd_invalid_topic());
assert_eq!(c, MndInvalidTopic);
let c = TaosCode::from(0x0393);
assert!(c.mnd_invalid_topic_option());
assert_eq!(c, MndInvalidTopicOption);
let c = TaosCode::from(0x0394);
assert!(c.mnd_invalid_topic_partitons());
assert_eq!(c, MndInvalidTopicPartitons);
let c = TaosCode::from(0x0395);
assert!(c.mnd_topic_already_exist());
assert_eq!(c, MndTopicAlreadyExist);
let c = TaosCode::from(0x0400);
assert!(c.dnd_msg_not_processed());
assert_eq!(c, DndMsgNotProcessed);
let c = TaosCode::from(0x0401);
assert!(c.dnd_out_of_memory());
assert_eq!(c, DndOutOfMemory);
let c = TaosCode::from(0x0402);
assert!(c.dnd_no_write_access());
assert_eq!(c, DndNoWriteAccess);
let c = TaosCode::from(0x0403);
assert!(c.dnd_invalid_msg_len());
assert_eq!(c, DndInvalidMsgLen);
let c = TaosCode::from(0x0404);
assert!(c.dnd_action_in_progress());
assert_eq!(c, DndActionInProgress);
let c = TaosCode::from(0x0405);
assert!(c.dnd_too_many_vnodes());
assert_eq!(c, DndTooManyVnodes);
let c = TaosCode::from(0x0406);
assert!(c.dnd_exiting());
assert_eq!(c, DndExiting);
let c = TaosCode::from(0x0407);
assert!(c.dnd_vnode_open_failed());
assert_eq!(c, DndVnodeOpenFailed);
let c = TaosCode::from(0x0500);
assert!(c.vnd_action_in_progress());
assert_eq!(c, VndActionInProgress);
let c = TaosCode::from(0x0501);
assert!(c.vnd_msg_not_processed());
assert_eq!(c, VndMsgNotProcessed);
let c = TaosCode::from(0x0502);
assert!(c.vnd_action_need_reprocessed());
assert_eq!(c, VndActionNeedReprocessed);
let c = TaosCode::from(0x0503);
assert!(c.vnd_invalid_vgroup_id());
assert_eq!(c, VndInvalidVgroupId);
let c = TaosCode::from(0x0504);
assert!(c.vnd_init_failed());
assert_eq!(c, VndInitFailed);
let c = TaosCode::from(0x0505);
assert!(c.vnd_no_diskspace());
assert_eq!(c, VndNoDiskspace);
let c = TaosCode::from(0x0506);
assert!(c.vnd_no_disk_permissions());
assert_eq!(c, VndNoDiskPermissions);
let c = TaosCode::from(0x0507);
assert!(c.vnd_no_such_file_or_dir());
assert_eq!(c, VndNoSuchFileOrDir);
let c = TaosCode::from(0x0508);
assert!(c.vnd_out_of_memory());
assert_eq!(c, VndOutOfMemory);
let c = TaosCode::from(0x0509);
assert!(c.vnd_app_error());
assert_eq!(c, VndAppError);
let c = TaosCode::from(0x050A);
assert!(c.vnd_invalid_vresion_file());
assert_eq!(c, VndInvalidVresionFile);
let c = TaosCode::from(0x050B);
assert!(c.vnd_is_full());
assert_eq!(c, VndIsFull);
let c = TaosCode::from(0x050C);
assert!(c.vnd_is_flowctrl());
assert_eq!(c, VndIsFlowctrl);
let c = TaosCode::from(0x050D);
assert!(c.vnd_is_dropping());
assert_eq!(c, VndIsDropping);
let c = TaosCode::from(0x050E);
assert!(c.vnd_is_balancing());
assert_eq!(c, VndIsBalancing);
let c = TaosCode::from(0x0510);
assert!(c.vnd_is_closing());
assert_eq!(c, VndIsClosing);
let c = TaosCode::from(0x0511);
assert!(c.vnd_not_synced());
assert_eq!(c, VndNotSynced);
let c = TaosCode::from(0x0512);
assert!(c.vnd_no_write_auth());
assert_eq!(c, VndNoWriteAuth);
let c = TaosCode::from(0x0513);
assert!(c.vnd_is_syncing());
assert_eq!(c, VndIsSyncing);
let c = TaosCode::from(0x0514);
assert!(c.vnd_invalid_tsdb_state());
assert_eq!(c, VndInvalidTsdbState);
let c = TaosCode::from(0x0515);
assert!(c.wait_thread_too_many());
assert_eq!(c, WaitThreadTooMany);
let c = TaosCode::from(0x0600);
assert!(c.tdb_invalid_table_id());
assert_eq!(c, TdbInvalidTableId);
let c = TaosCode::from(0x0601);
assert!(c.tdb_invalid_table_type());
assert_eq!(c, TdbInvalidTableType);
let c = TaosCode::from(0x0602);
assert!(c.tdb_ivd_tb_schema_version());
assert_eq!(c, TdbIvdTbSchemaVersion);
let c = TaosCode::from(0x0603);
assert!(c.tdb_table_already_exist());
assert_eq!(c, TdbTableAlreadyExist);
let c = TaosCode::from(0x0604);
assert!(c.tdb_invalid_config());
assert_eq!(c, TdbInvalidConfig);
let c = TaosCode::from(0x0605);
assert!(c.tdb_init_failed());
assert_eq!(c, TdbInitFailed);
let c = TaosCode::from(0x0606);
assert!(c.tdb_no_diskspace());
assert_eq!(c, TdbNoDiskspace);
let c = TaosCode::from(0x0607);
assert!(c.tdb_no_disk_permissions());
assert_eq!(c, TdbNoDiskPermissions);
let c = TaosCode::from(0x0608);
assert!(c.tdb_file_corrupted());
assert_eq!(c, TdbFileCorrupted);
let c = TaosCode::from(0x0609);
assert!(c.tdb_out_of_memory());
assert_eq!(c, TdbOutOfMemory);
let c = TaosCode::from(0x060A);
assert!(c.tdb_tag_ver_out_of_date());
assert_eq!(c, TdbTagVerOutOfDate);
let c = TaosCode::from(0x060B);
assert!(c.tdb_timestamp_out_of_range());
assert_eq!(c, TdbTimestampOutOfRange);
let c = TaosCode::from(0x060C);
assert!(c.tdb_submit_msg_mssed_up());
assert_eq!(c, TdbSubmitMsgMssedUp);
let c = TaosCode::from(0x060D);
assert!(c.tdb_invalid_action());
assert_eq!(c, TdbInvalidAction);
let c = TaosCode::from(0x060E);
assert!(c.tdb_invalid_create_tb_msg());
assert_eq!(c, TdbInvalidCreateTbMsg);
let c = TaosCode::from(0x060F);
assert!(c.tdb_no_table_data_in_mem());
assert_eq!(c, TdbNoTableDataInMem);
let c = TaosCode::from(0x0610);
assert!(c.tdb_file_already_exists());
assert_eq!(c, TdbFileAlreadyExists);
let c = TaosCode::from(0x0611);
assert!(c.tdb_table_reconfigure());
assert_eq!(c, TdbTableReconfigure);
let c = TaosCode::from(0x0612);
assert!(c.tdb_ivd_create_table_info());
assert_eq!(c, TdbIvdCreateTableInfo);
let c = TaosCode::from(0x0613);
assert!(c.tdb_no_avail_disk());
assert_eq!(c, TdbNoAvailDisk);
let c = TaosCode::from(0x0614);
assert!(c.tdb_messed_msg());
assert_eq!(c, TdbMessedMsg);
let c = TaosCode::from(0x0615);
assert!(c.tdb_ivld_tag_val());
assert_eq!(c, TdbIvldTagVal);
let c = TaosCode::from(0x0616);
assert!(c.tdb_no_cache_last_row());
assert_eq!(c, TdbNoCacheLastRow);
let c = TaosCode::from(0x0617);
assert!(c.tdb_incomplete_dfileset());
assert_eq!(c, TdbIncompleteDfileset);
let c = TaosCode::from(0x0700);
assert!(c.qry_invalid_qhandle());
assert_eq!(c, QryInvalidQhandle);
let c = TaosCode::from(0x0701);
assert!(c.qry_invalid_msg());
assert_eq!(c, QryInvalidMsg);
let c = TaosCode::from(0x0702);
assert!(c.qry_no_diskspace());
assert_eq!(c, QryNoDiskspace);
let c = TaosCode::from(0x0703);
assert!(c.qry_out_of_memory());
assert_eq!(c, QryOutOfMemory);
let c = TaosCode::from(0x0704);
assert!(c.qry_app_error());
assert_eq!(c, QryAppError);
let c = TaosCode::from(0x0705);
assert!(c.qry_dup_join_key());
assert_eq!(c, QryDupJoinKey);
let c = TaosCode::from(0x0706);
assert!(c.qry_exceed_tags_limit());
assert_eq!(c, QryExceedTagsLimit);
let c = TaosCode::from(0x0707);
assert!(c.qry_not_ready());
assert_eq!(c, QryNotReady);
let c = TaosCode::from(0x0708);
assert!(c.qry_has_rsp());
assert_eq!(c, QryHasRsp);
let c = TaosCode::from(0x0709);
assert!(c.qry_in_exec());
assert_eq!(c, QryInExec);
let c = TaosCode::from(0x070A);
assert!(c.qry_too_many_timewindow());
assert_eq!(c, QryTooManyTimewindow);
let c = TaosCode::from(0x070B);
assert!(c.qry_not_enough_buffer());
assert_eq!(c, QryNotEnoughBuffer);
let c = TaosCode::from(0x070C);
assert!(c.qry_inconsistan());
assert_eq!(c, QryInconsistan);
let c = TaosCode::from(0x070D);
assert!(c.qry_sys_error());
assert_eq!(c, QrySysError);
let c = TaosCode::from(0x070E);
assert!(c.qry_invalid_time_condition());
assert_eq!(c, QryInvalidTimeCondition);
let c = TaosCode::from(0x0710);
assert!(c.qry_invalid_schema_version());
assert_eq!(c, QryInvalidSchemaVersion);
let c = TaosCode::from(0x0711);
assert!(c.qry_result_too_large());
assert_eq!(c, QryResultTooLarge);
let c = TaosCode::from(0x0800);
assert!(c.grant_expired());
assert_eq!(c, GrantExpired);
let c = TaosCode::from(0x0801);
assert!(c.grant_dnode_limited());
assert_eq!(c, GrantDnodeLimited);
let c = TaosCode::from(0x0802);
assert!(c.grant_acct_limited());
assert_eq!(c, GrantAcctLimited);
let c = TaosCode::from(0x0803);
assert!(c.grant_timeseries_limited());
assert_eq!(c, GrantTimeseriesLimited);
let c = TaosCode::from(0x0804);
assert!(c.grant_db_limited());
assert_eq!(c, GrantDbLimited);
let c = TaosCode::from(0x0805);
assert!(c.grant_user_limited());
assert_eq!(c, GrantUserLimited);
let c = TaosCode::from(0x0806);
assert!(c.grant_conn_limited());
assert_eq!(c, GrantConnLimited);
let c = TaosCode::from(0x0807);
assert!(c.grant_stream_limited());
assert_eq!(c, GrantStreamLimited);
let c = TaosCode::from(0x0808);
assert!(c.grant_speed_limited());
assert_eq!(c, GrantSpeedLimited);
let c = TaosCode::from(0x0809);
assert!(c.grant_storage_limited());
assert_eq!(c, GrantStorageLimited);
let c = TaosCode::from(0x080A);
assert!(c.grant_querytime_limited());
assert_eq!(c, GrantQuerytimeLimited);
let c = TaosCode::from(0x080B);
assert!(c.grant_cpu_limited());
assert_eq!(c, GrantCpuLimited);
let c = TaosCode::from(0x0900);
assert!(c.syn_invalid_config());
assert_eq!(c, SynInvalidConfig);
let c = TaosCode::from(0x0901);
assert!(c.syn_not_enabled());
assert_eq!(c, SynNotEnabled);
let c = TaosCode::from(0x0902);
assert!(c.syn_invalid_version());
assert_eq!(c, SynInvalidVersion);
let c = TaosCode::from(0x0903);
assert!(c.syn_confirm_expired());
assert_eq!(c, SynConfirmExpired);
let c = TaosCode::from(0x0904);
assert!(c.syn_too_many_fwdinfo());
assert_eq!(c, SynTooManyFwdinfo);
let c = TaosCode::from(0x0905);
assert!(c.syn_mismatched_protocol());
assert_eq!(c, SynMismatchedProtocol);
let c = TaosCode::from(0x0906);
assert!(c.syn_mismatched_clusterid());
assert_eq!(c, SynMismatchedClusterid);
let c = TaosCode::from(0x0907);
assert!(c.syn_mismatched_signature());
assert_eq!(c, SynMismatchedSignature);
let c = TaosCode::from(0x0908);
assert!(c.syn_invalid_checksum());
assert_eq!(c, SynInvalidChecksum);
let c = TaosCode::from(0x0909);
assert!(c.syn_invalid_msglen());
assert_eq!(c, SynInvalidMsglen);
let c = TaosCode::from(0x090A);
assert!(c.syn_invalid_msgtype());
assert_eq!(c, SynInvalidMsgtype);
let c = TaosCode::from(0x1000);
assert!(c.wal_app_error());
assert_eq!(c, WalAppError);
let c = TaosCode::from(0x1001);
assert!(c.wal_file_corrupted());
assert_eq!(c, WalFileCorrupted);
let c = TaosCode::from(0x1002);
assert!(c.wal_size_limit());
assert_eq!(c, WalSizeLimit);
let c = TaosCode::from(0x1100);
assert!(c.http_server_offline());
assert_eq!(c, HttpServerOffline);
let c = TaosCode::from(0x1101);
assert!(c.http_unsupport_url());
assert_eq!(c, HttpUnsupportUrl);
let c = TaosCode::from(0x1102);
assert!(c.http_invalid_url());
assert_eq!(c, HttpInvalidUrl);
let c = TaosCode::from(0x1103);
assert!(c.http_no_enough_memory());
assert_eq!(c, HttpNoEnoughMemory);
let c = TaosCode::from(0x1104);
assert!(c.http_requset_too_big());
assert_eq!(c, HttpRequsetTooBig);
let c = TaosCode::from(0x1105);
assert!(c.http_no_auth_info());
assert_eq!(c, HttpNoAuthInfo);
let c = TaosCode::from(0x1106);
assert!(c.http_no_msg_input());
assert_eq!(c, HttpNoMsgInput);
let c = TaosCode::from(0x1107);
assert!(c.http_no_sql_input());
assert_eq!(c, HttpNoSqlInput);
let c = TaosCode::from(0x1108);
assert!(c.http_no_exec_usedb());
assert_eq!(c, HttpNoExecUsedb);
let c = TaosCode::from(0x1109);
assert!(c.http_session_full());
assert_eq!(c, HttpSessionFull);
let c = TaosCode::from(0x110A);
assert!(c.http_gen_taosd_token_err());
assert_eq!(c, HttpGenTaosdTokenErr);
let c = TaosCode::from(0x110B);
assert!(c.http_invalid_multi_request());
assert_eq!(c, HttpInvalidMultiRequest);
let c = TaosCode::from(0x110C);
assert!(c.http_create_gzip_failed());
assert_eq!(c, HttpCreateGzipFailed);
let c = TaosCode::from(0x110D);
assert!(c.http_finish_gzip_failed());
assert_eq!(c, HttpFinishGzipFailed);
let c = TaosCode::from(0x110E);
assert!(c.http_login_failed());
assert_eq!(c, HttpLoginFailed);
let c = TaosCode::from(0x1120);
assert!(c.http_invalid_version());
assert_eq!(c, HttpInvalidVersion);
let c = TaosCode::from(0x1121);
assert!(c.http_invalid_content_length());
assert_eq!(c, HttpInvalidContentLength);
let c = TaosCode::from(0x1122);
assert!(c.http_invalid_auth_type());
assert_eq!(c, HttpInvalidAuthType);
let c = TaosCode::from(0x1123);
assert!(c.http_invalid_auth_format());
assert_eq!(c, HttpInvalidAuthFormat);
let c = TaosCode::from(0x1124);
assert!(c.http_invalid_basic_auth());
assert_eq!(c, HttpInvalidBasicAuth);
let c = TaosCode::from(0x1125);
assert!(c.http_invalid_taosd_auth());
assert_eq!(c, HttpInvalidTaosdAuth);
let c = TaosCode::from(0x1126);
assert!(c.http_parse_method_failed());
assert_eq!(c, HttpParseMethodFailed);
let c = TaosCode::from(0x1127);
assert!(c.http_parse_target_failed());
assert_eq!(c, HttpParseTargetFailed);
let c = TaosCode::from(0x1128);
assert!(c.http_parse_version_failed());
assert_eq!(c, HttpParseVersionFailed);
let c = TaosCode::from(0x1129);
assert!(c.http_parse_sp_failed());
assert_eq!(c, HttpParseSpFailed);
let c = TaosCode::from(0x112A);
assert!(c.http_parse_status_failed());
assert_eq!(c, HttpParseStatusFailed);
let c = TaosCode::from(0x112B);
assert!(c.http_parse_phrase_failed());
assert_eq!(c, HttpParsePhraseFailed);
let c = TaosCode::from(0x112C);
assert!(c.http_parse_crlf_failed());
assert_eq!(c, HttpParseCrlfFailed);
let c = TaosCode::from(0x112D);
assert!(c.http_parse_header_failed());
assert_eq!(c, HttpParseHeaderFailed);
let c = TaosCode::from(0x112E);
assert!(c.http_parse_header_key_failed());
assert_eq!(c, HttpParseHeaderKeyFailed);
let c = TaosCode::from(0x112F);
assert!(c.http_parse_header_val_failed());
assert_eq!(c, HttpParseHeaderValFailed);
let c = TaosCode::from(0x1130);
assert!(c.http_parse_chunk_size_failed());
assert_eq!(c, HttpParseChunkSizeFailed);
let c = TaosCode::from(0x1131);
assert!(c.http_parse_chunk_failed());
assert_eq!(c, HttpParseChunkFailed);
let c = TaosCode::from(0x1132);
assert!(c.http_parse_end_failed());
assert_eq!(c, HttpParseEndFailed);
let c = TaosCode::from(0x1134);
assert!(c.http_parse_invalid_state());
assert_eq!(c, HttpParseInvalidState);
let c = TaosCode::from(0x1135);
assert!(c.http_parse_error_state());
assert_eq!(c, HttpParseErrorState);
let c = TaosCode::from(0x1150);
assert!(c.http_gc_query_null());
assert_eq!(c, HttpGcQueryNull);
let c = TaosCode::from(0x1151);
assert!(c.http_gc_query_size());
assert_eq!(c, HttpGcQuerySize);
let c = TaosCode::from(0x1152);
assert!(c.http_gc_req_parse_error());
assert_eq!(c, HttpGcReqParseError);
let c = TaosCode::from(0x1160);
assert!(c.http_tg_db_not_input());
assert_eq!(c, HttpTgDbNotInput);
let c = TaosCode::from(0x1161);
assert!(c.http_tg_db_too_long());
assert_eq!(c, HttpTgDbTooLong);
let c = TaosCode::from(0x1162);
assert!(c.http_tg_invalid_json());
assert_eq!(c, HttpTgInvalidJson);
let c = TaosCode::from(0x1163);
assert!(c.http_tg_metrics_null());
assert_eq!(c, HttpTgMetricsNull);
let c = TaosCode::from(0x1164);
assert!(c.http_tg_metrics_size());
assert_eq!(c, HttpTgMetricsSize);
let c = TaosCode::from(0x1165);
assert!(c.http_tg_metric_null());
assert_eq!(c, HttpTgMetricNull);
let c = TaosCode::from(0x1166);
assert!(c.http_tg_metric_type());
assert_eq!(c, HttpTgMetricType);
let c = TaosCode::from(0x1167);
assert!(c.http_tg_metric_name_null());
assert_eq!(c, HttpTgMetricNameNull);
let c = TaosCode::from(0x1168);
assert!(c.http_tg_metric_name_long());
assert_eq!(c, HttpTgMetricNameLong);
let c = TaosCode::from(0x1169);
assert!(c.http_tg_timestamp_null());
assert_eq!(c, HttpTgTimestampNull);
let c = TaosCode::from(0x116A);
assert!(c.http_tg_timestamp_type());
assert_eq!(c, HttpTgTimestampType);
let c = TaosCode::from(0x116B);
assert!(c.http_tg_timestamp_val_null());
assert_eq!(c, HttpTgTimestampValNull);
let c = TaosCode::from(0x116C);
assert!(c.http_tg_tags_null());
assert_eq!(c, HttpTgTagsNull);
let c = TaosCode::from(0x116D);
assert!(c.http_tg_tags_size_0());
assert_eq!(c, HttpTgTagsSize0);
let c = TaosCode::from(0x116E);
assert!(c.http_tg_tags_size_long());
assert_eq!(c, HttpTgTagsSizeLong);
let c = TaosCode::from(0x116F);
assert!(c.http_tg_tag_null());
assert_eq!(c, HttpTgTagNull);
let c = TaosCode::from(0x1170);
assert!(c.http_tg_tag_name_null());
assert_eq!(c, HttpTgTagNameNull);
let c = TaosCode::from(0x1171);
assert!(c.http_tg_tag_name_size());
assert_eq!(c, HttpTgTagNameSize);
let c = TaosCode::from(0x1172);
assert!(c.http_tg_tag_value_type());
assert_eq!(c, HttpTgTagValueType);
let c = TaosCode::from(0x1173);
assert!(c.http_tg_tag_value_null());
assert_eq!(c, HttpTgTagValueNull);
let c = TaosCode::from(0x1174);
assert!(c.http_tg_table_null());
assert_eq!(c, HttpTgTableNull);
let c = TaosCode::from(0x1175);
assert!(c.http_tg_table_size());
assert_eq!(c, HttpTgTableSize);
let c = TaosCode::from(0x1176);
assert!(c.http_tg_fields_null());
assert_eq!(c, HttpTgFieldsNull);
let c = TaosCode::from(0x1177);
assert!(c.http_tg_fields_size_0());
assert_eq!(c, HttpTgFieldsSize0);
let c = TaosCode::from(0x1178);
assert!(c.http_tg_fields_size_long());
assert_eq!(c, HttpTgFieldsSizeLong);
let c = TaosCode::from(0x1179);
assert!(c.http_tg_field_null());
assert_eq!(c, HttpTgFieldNull);
let c = TaosCode::from(0x117A);
assert!(c.http_tg_field_name_null());
assert_eq!(c, HttpTgFieldNameNull);
let c = TaosCode::from(0x117B);
assert!(c.http_tg_field_name_size());
assert_eq!(c, HttpTgFieldNameSize);
let c = TaosCode::from(0x117C);
assert!(c.http_tg_field_value_type());
assert_eq!(c, HttpTgFieldValueType);
let c = TaosCode::from(0x117D);
assert!(c.http_tg_field_value_null());
assert_eq!(c, HttpTgFieldValueNull);
let c = TaosCode::from(0x117E);
assert!(c.http_tg_host_not_string());
assert_eq!(c, HttpTgHostNotString);
let c = TaosCode::from(0x117F);
assert!(c.http_tg_stable_not_exist());
assert_eq!(c, HttpTgStableNotExist);
let c = TaosCode::from(0x1190);
assert!(c.http_op_db_not_input());
assert_eq!(c, HttpOpDbNotInput);
let c = TaosCode::from(0x1191);
assert!(c.http_op_db_too_long());
assert_eq!(c, HttpOpDbTooLong);
let c = TaosCode::from(0x1192);
assert!(c.http_op_invalid_json());
assert_eq!(c, HttpOpInvalidJson);
let c = TaosCode::from(0x1193);
assert!(c.http_op_metrics_null());
assert_eq!(c, HttpOpMetricsNull);
let c = TaosCode::from(0x1194);
assert!(c.http_op_metrics_size());
assert_eq!(c, HttpOpMetricsSize);
let c = TaosCode::from(0x1195);
assert!(c.http_op_metric_null());
assert_eq!(c, HttpOpMetricNull);
let c = TaosCode::from(0x1196);
assert!(c.http_op_metric_type());
assert_eq!(c, HttpOpMetricType);
let c = TaosCode::from(0x1197);
assert!(c.http_op_metric_name_null());
assert_eq!(c, HttpOpMetricNameNull);
let c = TaosCode::from(0x1198);
assert!(c.http_op_metric_name_long());
assert_eq!(c, HttpOpMetricNameLong);
let c = TaosCode::from(0x1199);
assert!(c.http_op_timestamp_null());
assert_eq!(c, HttpOpTimestampNull);
let c = TaosCode::from(0x119A);
assert!(c.http_op_timestamp_type());
assert_eq!(c, HttpOpTimestampType);
let c = TaosCode::from(0x119B);
assert!(c.http_op_timestamp_val_null());
assert_eq!(c, HttpOpTimestampValNull);
let c = TaosCode::from(0x119C);
assert!(c.http_op_tags_null());
assert_eq!(c, HttpOpTagsNull);
let c = TaosCode::from(0x119D);
assert!(c.http_op_tags_size_0());
assert_eq!(c, HttpOpTagsSize0);
let c = TaosCode::from(0x119E);
assert!(c.http_op_tags_size_long());
assert_eq!(c, HttpOpTagsSizeLong);
let c = TaosCode::from(0x119F);
assert!(c.http_op_tag_null());
assert_eq!(c, HttpOpTagNull);
let c = TaosCode::from(0x11A0);
assert!(c.http_op_tag_name_null());
assert_eq!(c, HttpOpTagNameNull);
let c = TaosCode::from(0x11A1);
assert!(c.http_op_tag_name_size());
assert_eq!(c, HttpOpTagNameSize);
let c = TaosCode::from(0x11A2);
assert!(c.http_op_tag_value_type());
assert_eq!(c, HttpOpTagValueType);
let c = TaosCode::from(0x11A3);
assert!(c.http_op_tag_value_null());
assert_eq!(c, HttpOpTagValueNull);
let c = TaosCode::from(0x11A4);
assert!(c.http_op_tag_value_too_long());
assert_eq!(c, HttpOpTagValueTooLong);
let c = TaosCode::from(0x11A5);
assert!(c.http_op_value_null());
assert_eq!(c, HttpOpValueNull);
let c = TaosCode::from(0x11A6);
assert!(c.http_op_value_type());
assert_eq!(c, HttpOpValueType);
let c = TaosCode::from(0x1F00);
assert!(c.http_request_json_error());
assert_eq!(c, HttpRequestJsonError);
let c = TaosCode::from(0x2100);
assert!(c.odbc_oom());
assert_eq!(c, OdbcOom);
let c = TaosCode::from(0x2101);
assert!(c.odbc_conv_char_not_num());
assert_eq!(c, OdbcConvCharNotNum);
let c = TaosCode::from(0x2102);
assert!(c.odbc_conv_undef());
assert_eq!(c, OdbcConvUndef);
let c = TaosCode::from(0x2103);
assert!(c.odbc_conv_trunc_frac());
assert_eq!(c, OdbcConvTruncFrac);
let c = TaosCode::from(0x2104);
assert!(c.odbc_conv_trunc());
assert_eq!(c, OdbcConvTrunc);
let c = TaosCode::from(0x2105);
assert!(c.odbc_conv_not_support());
assert_eq!(c, OdbcConvNotSupport);
let c = TaosCode::from(0x2106);
assert!(c.odbc_conv_oor());
assert_eq!(c, OdbcConvOor);
let c = TaosCode::from(0x2107);
assert!(c.odbc_out_of_range());
assert_eq!(c, OdbcOutOfRange);
let c = TaosCode::from(0x2108);
assert!(c.odbc_not_support());
assert_eq!(c, OdbcNotSupport);
let c = TaosCode::from(0x2109);
assert!(c.odbc_invalid_handle());
assert_eq!(c, OdbcInvalidHandle);
let c = TaosCode::from(0x210a);
assert!(c.odbc_no_result());
assert_eq!(c, OdbcNoResult);
let c = TaosCode::from(0x210b);
assert!(c.odbc_no_fields());
assert_eq!(c, OdbcNoFields);
let c = TaosCode::from(0x210c);
assert!(c.odbc_invalid_cursor());
assert_eq!(c, OdbcInvalidCursor);
let c = TaosCode::from(0x210d);
assert!(c.odbc_statement_not_ready());
assert_eq!(c, OdbcStatementNotReady);
let c = TaosCode::from(0x210e);
assert!(c.odbc_connection_busy());
assert_eq!(c, OdbcConnectionBusy);
let c = TaosCode::from(0x210f);
assert!(c.odbc_bad_connstr());
assert_eq!(c, OdbcBadConnstr);
let c = TaosCode::from(0x2110);
assert!(c.odbc_bad_arg());
assert_eq!(c, OdbcBadArg);
let c = TaosCode::from(0x2111);
assert!(c.odbc_conv_not_valid_ts());
assert_eq!(c, OdbcConvNotValidTs);
let c = TaosCode::from(0x2112);
assert!(c.odbc_conv_src_too_large());
assert_eq!(c, OdbcConvSrcTooLarge);
let c = TaosCode::from(0x2113);
assert!(c.odbc_conv_src_bad_seq());
assert_eq!(c, OdbcConvSrcBadSeq);
let c = TaosCode::from(0x2114);
assert!(c.odbc_conv_src_incomplete());
assert_eq!(c, OdbcConvSrcIncomplete);
let c = TaosCode::from(0x2115);
assert!(c.odbc_conv_src_general());
assert_eq!(c, OdbcConvSrcGeneral);
let c = TaosCode::from(0x2200);
assert!(c.fs_out_of_memory());
assert_eq!(c, FsOutOfMemory);
let c = TaosCode::from(0x2201);
assert!(c.fs_invld_cfg());
assert_eq!(c, FsInvldCfg);
let c = TaosCode::from(0x2202);
assert!(c.fs_too_many_mount());
assert_eq!(c, FsTooManyMount);
let c = TaosCode::from(0x2203);
assert!(c.fs_dup_primary());
assert_eq!(c, FsDupPrimary);
let c = TaosCode::from(0x2204);
assert!(c.fs_no_primary_disk());
assert_eq!(c, FsNoPrimaryDisk);
let c = TaosCode::from(0x2205);
assert!(c.fs_no_mount_at_tier());
assert_eq!(c, FsNoMountAtTier);
let c = TaosCode::from(0x2206);
assert!(c.fs_file_already_exists());
assert_eq!(c, FsFileAlreadyExists);
let c = TaosCode::from(0x2207);
assert!(c.fs_invld_level());
assert_eq!(c, FsInvldLevel);
let c = TaosCode::from(0x2208);
assert!(c.fs_no_valid_disk());
assert_eq!(c, FsNoValidDisk);
let c = TaosCode::from(0x2300);
assert!(c.mon_connection_invalid());
assert_eq!(c, MonConnectionInvalid);
}