Skip to content

Commit

Permalink
feat(dirver): add handler type for connection info (#58)
Browse files Browse the repository at this point in the history
  • Loading branch information
everpcpc authored Apr 14, 2023
1 parent 22695e7 commit 1bdf232
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions driver/src/conn.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
1 change: 1 addition & 0 deletions driver/src/flight_sql.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
Expand Down
1 change: 1 addition & 0 deletions driver/src/rest_api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
Expand Down

0 comments on commit 1bdf232

Please sign in to comment.