{"record":{"id":"a0f3cc64d56496a1","repo":"t8y2/dbx","slug":"not-connected-a0f3cc","errorCode":null,"errorMessage":"not connected","messagePattern":"not connected","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"agents/drivers/tdengine/src/driver.rs","lineNumber":668,"sourceCode":"            Ok(rows) => rows,\n            Err(error) if token.is_cancelled() => return Err(error),\n            Err(_) => return Ok(String::new()),\n        };\n        let Some(row) = rows.first() else {\n            return Ok(String::new());\n        };\n        for value in row.iter().skip(1) {\n            if let Some(value) = json_text(value) {\n                if value.to_ascii_uppercase().contains(\"CREATE\") {\n                    return Ok(value.to_string());\n                }\n            }\n        }\n        Ok(row.last().and_then(json_text).unwrap_or_default().to_string())\n    }\n\n    fn require_connection(&self) -> Result<&Taos> {\n        self.connection.as_ref().ok_or_else(|| anyhow!(\"not connected\"))\n    }\n}\n\nimpl QueryCursor {\n    async fn next_row(&mut self, token: &CancellationToken, timeout_secs: u64) -> Result<Option<Vec<Value>>> {\n        if self.rows_read >= self.max_rows {\n            return Ok(None);\n        }\n        if let Some(row) = self.pending_row.take() {\n            self.rows_read += 1;\n            return Ok(Some(row));\n        }\n        let row = self.next_raw_row(token, timeout_secs).await?;\n        if row.is_some() {\n            self.rows_read += 1;\n        }\n        Ok(row)\n    }","sourceCodeStart":650,"sourceCodeEnd":686,"githubUrl":"https://github.com/t8y2/dbx/blob/c0390bff16418b651f4728520d99adf8ce48829a/agents/drivers/tdengine/src/driver.rs#L650-L686","documentation":"Bailed by require_connection (TDengine driver) when the operation is invoked while self.connection is None — i.e. connect has not been called or disconnect already ran. All connection-dependent entry points (validate_connection, execute_statements, use_database, cursors) funnel through this guard, so any call before connect or after disconnect fails fast.","triggerScenarios":"Thrown at agents/drivers/tdengine/src/driver.rs:668 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Call connect with valid ConnectParams before issuing operations","Check for a prior disconnect/close_session that cleared the connection","Retry the operation after re-establishing the session"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"c0390bff16418b651f4728520d99adf8ce48829a","analyzedAt":"2026-09-05T23:05:10.900Z","contentChangedAt":"2026-09-05T23:05:10.900Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}