Skip to content

Commit

Permalink
Fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
amigin committed Aug 6, 2024
1 parent 084f602 commit bc68c53
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 1 deletion.
2 changes: 1 addition & 1 deletion my-no-sql-data-writer/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ edition = "2021"


[features]
default = []
default = ["with-ssh"]
with-ssh = ["flurl/with-ssh"]

[dependencies]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ pub struct FlUrlFactory {
#[cfg(feature = "with-ssh")]
pub ssh_sessions_pool: Option<Arc<SshSessionsPool>>,
#[cfg(feature = "with-ssh")]
pub http_buffer_size: Option<usize>,
#[cfg(feature = "with-ssh")]
pub ssh_cert_credentials:
Option<std::collections::HashMap<String, flurl::my_ssh::SshCredentialsSettingsModel>>,
create_table_is_called: Arc<UnsafeValue<bool>>,
Expand All @@ -37,6 +39,8 @@ impl FlUrlFactory {
table_name,
#[cfg(feature = "with-ssh")]
ssh_cert_credentials: None,
#[cfg(feature = "with-ssh")]
http_buffer_size: None,
}
}
#[cfg(not(feature = "with-ssh"))]
Expand All @@ -53,6 +57,10 @@ impl FlUrlFactory {
fl_url = fl_url.set_ssh_sessions_pool(ssh_sessions_pool.clone());
}

if let Some(http_buffer_size) = self.http_buffer_size {
fl_url = fl_url.set_http_buffer_size(http_buffer_size);
}

fl_url
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,11 @@ impl<TEntity: MyNoSqlEntity + MyNoSqlEntitySerializer + Sync + Send> MyNoSqlData
self.fl_url_factory.ssh_sessions_pool = Some(ssh_sessions_pool);
}

#[cfg(feature = "with-ssh")]
pub fn set_http_buffer_size(&mut self, buffer_size: usize) {
self.fl_url_factory.http_buffer_size = Some(buffer_size);
}

pub async fn create_table_if_not_exists(
&self,
params: &CreateTableParams,
Expand Down

0 comments on commit bc68c53

Please sign in to comment.