@@ -30,7 +30,7 @@ pub struct PgDumpBuilder {
3030 verbose : bool ,
3131 version : bool ,
3232 no_privileges : bool ,
33- compression : Option < OsString > ,
33+ compress : Option < OsString > ,
3434 binary_upgrade : bool ,
3535 column_inserts : bool ,
3636 attribute_inserts : bool ,
@@ -243,10 +243,10 @@ impl PgDumpBuilder {
243243 self
244244 }
245245
246- /// Set the compression level to use
246+ /// Set the compress level to use
247247 #[ 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 ( ) ) ;
250250 self
251251 }
252252
@@ -638,9 +638,9 @@ impl CommandBuilder for PgDumpBuilder {
638638 args. push ( "--no-privileges" . into ( ) ) ;
639639 }
640640
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 ( ) ) ;
644644 }
645645
646646 if self . binary_upgrade {
@@ -887,7 +887,7 @@ mod tests {
887887 . verbose ( )
888888 . version ( )
889889 . no_privileges ( )
890- . compression ( "compression ")
890+ . compress ( "compress ")
891891 . binary_upgrade ( )
892892 . column_inserts ( )
893893 . attribute_inserts ( )
@@ -935,7 +935,7 @@ mod tests {
935935
936936 assert_eq ! (
937937 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" "compress" "--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""#
939939 ) ,
940940 command. to_command_string( )
941941 ) ;
0 commit comments