MCPcopy Create free account
hub / github.com/f0rr0/oliphaunt / try_clone

Method try_clone

src/pglite/client.rs:420–428  ·  view source on GitHub ↗

Clone this database into a new temporary [`Pglite`] instance.

(&mut self)

Source from the content-addressed store, hash-verified

418
419 /// Clone this database into a new temporary [`Pglite`] instance.
420 pub fn try_clone(&mut self) -> Result<Self> {
421 #[cfg(feature = "extensions")]
422 let extensions = self.bundled_extensions_in_database()?;
423 let archive = self.dump_data_dir_with_format(DataDirArchiveFormat::Tar)?;
424 let builder = Self::builder().temporary().load_data_dir_archive(archive);
425 #[cfg(feature = "extensions")]
426 let builder = builder.extensions(extensions);
427 builder.open()
428 }
429
430 /// Run the bundled WASIX `pg_dump` against this database and return SQL text.
431 #[cfg(feature = "extensions")]

Callers 4

read_atFunction · 0.80
write_atFunction · 0.80

Calls 6

load_data_dir_archiveMethod · 0.80
temporaryMethod · 0.45
extensionsMethod · 0.45
openMethod · 0.45

Tested by 1