@@ -30,7 +30,7 @@ pub struct PgDumpBuilder {
30
30
verbose : bool ,
31
31
version : bool ,
32
32
no_privileges : bool ,
33
- compression : Option < OsString > ,
33
+ compress : Option < OsString > ,
34
34
binary_upgrade : bool ,
35
35
column_inserts : bool ,
36
36
attribute_inserts : bool ,
@@ -243,10 +243,10 @@ impl PgDumpBuilder {
243
243
self
244
244
}
245
245
246
- /// Set the compression level to use
246
+ /// Set the compress level to use
247
247
#[ must_use]
248
- pub fn compression < S : AsRef < OsStr > > ( mut self , compress : S ) -> Self {
249
- self . compression = Some ( compress. as_ref ( ) . to_os_string ( ) ) ;
248
+ pub fn compress < S : AsRef < OsStr > > ( mut self , compress : S ) -> Self {
249
+ self . compress = Some ( compress. as_ref ( ) . to_os_string ( ) ) ;
250
250
self
251
251
}
252
252
@@ -638,9 +638,9 @@ impl CommandBuilder for PgDumpBuilder {
638
638
args. push ( "--no-privileges" . into ( ) ) ;
639
639
}
640
640
641
- if let Some ( compression ) = & self . compression {
642
- args. push ( "--compression " . into ( ) ) ;
643
- args. push ( compression . into ( ) ) ;
641
+ if let Some ( compress ) = & self . compress {
642
+ args. push ( "--compress " . into ( ) ) ;
643
+ args. push ( compress . into ( ) ) ;
644
644
}
645
645
646
646
if self . binary_upgrade {
@@ -887,7 +887,7 @@ mod tests {
887
887
. verbose ( )
888
888
. version ( )
889
889
. no_privileges ( )
890
- . compression ( "compression ")
890
+ . compress ( "compress ")
891
891
. binary_upgrade ( )
892
892
. column_inserts ( )
893
893
. attribute_inserts ( )
@@ -935,7 +935,7 @@ mod tests {
935
935
936
936
assert_eq ! (
937
937
format!(
938
- r#"{command_prefix}"pg_dump" "--data-only" "--large-objects" "--no-large-objects" "--clean" "--create" "--extension" "extension" "--encoding" "UTF8" "--file" "file" "--format" "format" "--jobs" "jobs" "--schema" "schema" "--exclude-schema" "exclude_schema" "--no-owner" "--no-reconnect" "--schema-only" "--superuser" "superuser" "--table" "table" "--exclude-table" "exclude_table" "--verbose" "--version" "--no-privileges" "--compression" "compression" "--binary-upgrade" "--column-inserts" "--attribute-inserts" "--disable-dollar-quoting" "--disable-triggers" "--enable-row-security" "--exclude-table-data-and-children" "exclude_table_data_and_children" "--extra-float-digits" "extra_float_digits" "--if-exists" "--include-foreign-data" "include_foreign_data" "--inserts" "--load-via-partition-root" "--lock-wait-timeout" "10" "--no-comments" "--no-publications" "--no-security-labels" "--no-subscriptions" "--no-table-access-method" "--no-tablespaces" "--no-toast-compression" "--no-unlogged-table-data" "--on-conflict-do-nothing" "--quote-all-identifiers" "--rows-per-insert" "100" "--section" "section" "--serializable-deferrable" "--snapshot" "snapshot" "--strict-names" "--table-and-children" "table_and_children" "--use-set-session-authorization" "--help" "--dbname" "dbname" "--host" "localhost" "--port" "5432" "--username" "postgres" "--no-password" "--password" "--role" "role""#
938
+ r#"{command_prefix}"pg_dump" "--data-only" "--large-objects" "--no-large-objects" "--clean" "--create" "--extension" "extension" "--encoding" "UTF8" "--file" "file" "--format" "format" "--jobs" "jobs" "--schema" "schema" "--exclude-schema" "exclude_schema" "--no-owner" "--no-reconnect" "--schema-only" "--superuser" "superuser" "--table" "table" "--exclude-table" "exclude_table" "--verbose" "--version" "--no-privileges" "--compress" "compression" "--binary-upgrade" "--column-inserts" "--attribute-inserts" "--disable-dollar-quoting" "--disable-triggers" "--enable-row-security" "--exclude-table-data-and-children" "exclude_table_data_and_children" "--extra-float-digits" "extra_float_digits" "--if-exists" "--include-foreign-data" "include_foreign_data" "--inserts" "--load-via-partition-root" "--lock-wait-timeout" "10" "--no-comments" "--no-publications" "--no-security-labels" "--no-subscriptions" "--no-table-access-method" "--no-tablespaces" "--no-toast-compression" "--no-unlogged-table-data" "--on-conflict-do-nothing" "--quote-all-identifiers" "--rows-per-insert" "100" "--section" "section" "--serializable-deferrable" "--snapshot" "snapshot" "--strict-names" "--table-and-children" "table_and_children" "--use-set-session-authorization" "--help" "--dbname" "dbname" "--host" "localhost" "--port" "5432" "--username" "postgres" "--no-password" "--password" "--role" "role""#
939
939
) ,
940
940
command. to_command_string( )
941
941
) ;
0 commit comments