From 4b81fff457a2628f42071eaf8f49abbc7a58cd51 Mon Sep 17 00:00:00 2001 From: everpcpc Date: Fri, 14 Apr 2023 20:23:03 +0800 Subject: [PATCH] feat(dirver): add handler type for connection info --- driver/src/conn.rs | 1 + driver/src/flight_sql.rs | 1 + driver/src/rest_api.rs | 1 + 3 files changed, 3 insertions(+) diff --git a/driver/src/conn.rs b/driver/src/conn.rs index 8be5a101..6934b23d 100644 --- a/driver/src/conn.rs +++ b/driver/src/conn.rs @@ -25,6 +25,7 @@ use crate::rows::{Row, RowIterator, RowProgressIterator}; use crate::schema::Schema; pub struct ConnectionInfo { + pub handler: String, pub host: String, pub port: u16, pub user: String, diff --git a/driver/src/flight_sql.rs b/driver/src/flight_sql.rs index 4b5e6688..78b2fa1e 100644 --- a/driver/src/flight_sql.rs +++ b/driver/src/flight_sql.rs @@ -44,6 +44,7 @@ pub struct FlightSQLConnection { impl Connection for FlightSQLConnection { fn info(&self) -> ConnectionInfo { ConnectionInfo { + handler: "FlightSQL".to_string(), host: self.args.host.clone(), port: self.args.port, user: self.args.user.clone(), diff --git a/driver/src/rest_api.rs b/driver/src/rest_api.rs index 407f47e4..c70ebeed 100644 --- a/driver/src/rest_api.rs +++ b/driver/src/rest_api.rs @@ -38,6 +38,7 @@ pub struct RestAPIConnection { impl Connection for RestAPIConnection { fn info(&self) -> ConnectionInfo { ConnectionInfo { + handler: "RestAPI".to_string(), host: self.client.host.clone(), port: self.client.port, user: self.client.user.clone(),