Struct postgresql_commands::pg_dump::PgDumpBuilder
source · pub struct PgDumpBuilder { /* private fields */ }
Expand description
pg_dump
dumps a database as a text file or to other formats.
Implementations§
source§impl PgDumpBuilder
impl PgDumpBuilder
sourcepub fn new() -> Self
pub fn new() -> Self
Create a new PgDumpBuilder
sourcepub fn from(settings: &dyn Settings) -> Self
pub fn from(settings: &dyn Settings) -> Self
Create a new PgDumpBuilder
from Settings
sourcepub fn program_dir<P: Into<PathBuf>>(self, path: P) -> Self
pub fn program_dir<P: Into<PathBuf>>(self, path: P) -> Self
Location of the program binary
sourcepub fn large_objects(self) -> Self
pub fn large_objects(self) -> Self
Dump large objects in binary format
sourcepub fn no_large_objects(self) -> Self
pub fn no_large_objects(self) -> Self
Do not dump large objects
sourcepub fn clean(self) -> Self
pub fn clean(self) -> Self
Output commands to clean (drop) database objects prior to outputting the commands for creating them
sourcepub fn extension<S: AsRef<OsStr>>(self, extension: S) -> Self
pub fn extension<S: AsRef<OsStr>>(self, extension: S) -> Self
Dump data for the named extension
sourcepub fn format<S: AsRef<OsStr>>(self, format: S) -> Self
pub fn format<S: AsRef<OsStr>>(self, format: S) -> Self
Set the output file format (custom, directory, tar, plain text (default))
sourcepub fn exclude_schema<S: AsRef<OsStr>>(self, exclude_schema: S) -> Self
pub fn exclude_schema<S: AsRef<OsStr>>(self, exclude_schema: S) -> Self
Do not output commands to set ownership of objects to match the original database
sourcepub fn no_owner(self) -> Self
pub fn no_owner(self) -> Self
Do not output commands to set ownership of objects to match the original database
sourcepub fn no_reconnect(self) -> Self
pub fn no_reconnect(self) -> Self
Do not reconnect to the database
sourcepub fn schema_only(self) -> Self
pub fn schema_only(self) -> Self
Dump only the schema, no data
sourcepub fn exclude_table<S: AsRef<OsStr>>(self, exclude_table: S) -> Self
pub fn exclude_table<S: AsRef<OsStr>>(self, exclude_table: S) -> Self
Do not output commands to create the table(s) containing the data
sourcepub fn no_privileges(self) -> Self
pub fn no_privileges(self) -> Self
Do not output commands to set object privileges
sourcepub fn compression<S: AsRef<OsStr>>(self, compress: S) -> Self
pub fn compression<S: AsRef<OsStr>>(self, compress: S) -> Self
Set the compression level to use
sourcepub fn binary_upgrade(self) -> Self
pub fn binary_upgrade(self) -> Self
Dump data in a format suitable for binary upgrade
sourcepub fn column_inserts(self) -> Self
pub fn column_inserts(self) -> Self
Dump data as INSERT commands with column names
sourcepub fn attribute_inserts(self) -> Self
pub fn attribute_inserts(self) -> Self
Dump data as INSERT commands with column names
sourcepub fn disable_dollar_quoting(self) -> Self
pub fn disable_dollar_quoting(self) -> Self
Disable dollar quoting, use SQL standard quoting
sourcepub fn disable_triggers(self) -> Self
pub fn disable_triggers(self) -> Self
Disable triggers during data-only restore
sourcepub fn enable_row_security(self) -> Self
pub fn enable_row_security(self) -> Self
Dump data with row security enabled
sourcepub fn exclude_table_data_and_children<S: AsRef<OsStr>>(
self,
exclude_table_data_and_children: S,
) -> Self
pub fn exclude_table_data_and_children<S: AsRef<OsStr>>( self, exclude_table_data_and_children: S, ) -> Self
Dump data for the named table(s) but exclude data for their child tables
sourcepub fn extra_float_digits<S: AsRef<OsStr>>(self, extra_float_digits: S) -> Self
pub fn extra_float_digits<S: AsRef<OsStr>>(self, extra_float_digits: S) -> Self
Set the number of digits displayed for floating-point values
sourcepub fn include_foreign_data<S: AsRef<OsStr>>(
self,
include_foreign_data: S,
) -> Self
pub fn include_foreign_data<S: AsRef<OsStr>>( self, include_foreign_data: S, ) -> Self
Include foreign-data wrappers in the dump
sourcepub fn load_via_partition_root(self) -> Self
pub fn load_via_partition_root(self) -> Self
Load data via the partition root table
sourcepub fn lock_wait_timeout(self, lock_wait_timeout: u16) -> Self
pub fn lock_wait_timeout(self, lock_wait_timeout: u16) -> Self
Fail after waiting TIMEOUT for a table lock
sourcepub fn no_comments(self) -> Self
pub fn no_comments(self) -> Self
Do not output comments
sourcepub fn no_publications(self) -> Self
pub fn no_publications(self) -> Self
Do not output publications
sourcepub fn no_security_labels(self) -> Self
pub fn no_security_labels(self) -> Self
Do not output security labels
sourcepub fn no_subscriptions(self) -> Self
pub fn no_subscriptions(self) -> Self
Do not output subscriptions
sourcepub fn no_table_access_method(self) -> Self
pub fn no_table_access_method(self) -> Self
Do not output table access method
sourcepub fn no_tablespaces(self) -> Self
pub fn no_tablespaces(self) -> Self
Do not output tablespace assignments
sourcepub fn no_toast_compression(self) -> Self
pub fn no_toast_compression(self) -> Self
Do not output TOAST table compression
sourcepub fn no_unlogged_table_data(self) -> Self
pub fn no_unlogged_table_data(self) -> Self
Do not output unlogged table data
sourcepub fn on_conflict_do_nothing(self) -> Self
pub fn on_conflict_do_nothing(self) -> Self
Use ON CONFLICT DO NOTHING for INSERTs
sourcepub fn quote_all_identifiers(self) -> Self
pub fn quote_all_identifiers(self) -> Self
Quote all identifiers, even if not key words
sourcepub fn rows_per_insert(self, rows_per_insert: u64) -> Self
pub fn rows_per_insert(self, rows_per_insert: u64) -> Self
Set the number of rows per INSERT
sourcepub fn section<S: AsRef<OsStr>>(self, section: S) -> Self
pub fn section<S: AsRef<OsStr>>(self, section: S) -> Self
Dump data for the named section(s) only
sourcepub fn serializable_deferrable(self) -> Self
pub fn serializable_deferrable(self) -> Self
Dump data as a serializable transaction
sourcepub fn snapshot<S: AsRef<OsStr>>(self, snapshot: S) -> Self
pub fn snapshot<S: AsRef<OsStr>>(self, snapshot: S) -> Self
Use a snapshot with the specified name
sourcepub fn strict_names(self) -> Self
pub fn strict_names(self) -> Self
Use strict SQL identifier syntax
sourcepub fn table_and_children<S: AsRef<OsStr>>(self, table_and_children: S) -> Self
pub fn table_and_children<S: AsRef<OsStr>>(self, table_and_children: S) -> Self
Dump data for the named table(s) and their children
Use SET SESSION AUTHORIZATION commands instead of ALTER OWNER
sourcepub fn no_password(self) -> Self
pub fn no_password(self) -> Self
never prompt for password
sourcepub fn pg_password<S: AsRef<OsStr>>(self, pg_password: S) -> Self
pub fn pg_password<S: AsRef<OsStr>>(self, pg_password: S) -> Self
user password
Trait Implementations§
source§impl Clone for PgDumpBuilder
impl Clone for PgDumpBuilder
source§fn clone(&self) -> PgDumpBuilder
fn clone(&self) -> PgDumpBuilder
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl CommandBuilder for PgDumpBuilder
impl CommandBuilder for PgDumpBuilder
source§fn get_program(&self) -> &'static OsStr
fn get_program(&self) -> &'static OsStr
Get the program name
source§fn get_program_dir(&self) -> &Option<PathBuf>
fn get_program_dir(&self) -> &Option<PathBuf>
Location of the program binary
source§fn env<S: AsRef<OsStr>>(self, key: S, value: S) -> Self
fn env<S: AsRef<OsStr>>(self, key: S, value: S) -> Self
Set an environment variable for the command
source§fn get_program_file(&self) -> PathBuf
fn get_program_file(&self) -> PathBuf
source§impl Debug for PgDumpBuilder
impl Debug for PgDumpBuilder
source§impl Default for PgDumpBuilder
impl Default for PgDumpBuilder
source§fn default() -> PgDumpBuilder
fn default() -> PgDumpBuilder
Auto Trait Implementations§
impl Freeze for PgDumpBuilder
impl RefUnwindSafe for PgDumpBuilder
impl Send for PgDumpBuilder
impl Sync for PgDumpBuilder
impl Unpin for PgDumpBuilder
impl UnwindSafe for PgDumpBuilder
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)