Skip to content

Commit

Permalink
Add FlightSqlServiceClient::new_from_inner
Browse files Browse the repository at this point in the history
  • Loading branch information
lewiszlw committed Jul 4, 2024
1 parent 1f0b000 commit af647bb
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions arrow-flight/src/sql/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -69,10 +69,14 @@ pub struct FlightSqlServiceClient<T> {
impl FlightSqlServiceClient<Channel> {
/// Creates a new FlightSql client that connects to a server over an arbitrary tonic `Channel`
pub fn new(channel: Channel) -> Self {
let flight_client = FlightServiceClient::new(channel);
FlightSqlServiceClient {
Self::new_from_inner(FlightServiceClient::new(channel))
}

/// Creates a new higher level client with the provided lower level client
pub fn new_from_inner(inner: FlightServiceClient<Channel>) -> Self {
Self {
token: None,
flight_client,
flight_client: inner,
headers: HashMap::default(),
}
}
Expand Down

0 comments on commit af647bb

Please sign in to comment.