pub struct CreateSubscriptionOptions<'a> {
pub subscription_name: &'a str,
pub connection_string: &'a str,
pub publication: &'a str,
pub slot_name: &'a str,
pub create_slot: bool,
pub enabled: bool,
pub copy_data: bool,
}Expand description
Options for building a CREATE SUBSCRIPTION SQL statement.
All fields borrow from the caller — no allocation or cloning required.
Use Default for the WITH-clause flags to get the typical migration
defaults (create_slot = false, enabled = true, copy_data = false).
§Example
use pg_walstream::sql_builder::CreateSubscriptionOptions;
let opts = CreateSubscriptionOptions {
subscription_name: "my_sub",
connection_string: "host=localhost dbname=source",
publication: "my_pub",
slot_name: "my_slot",
..Default::default()
};Fields§
§subscription_name: &'a str§connection_string: &'a str§publication: &'a str§slot_name: &'a str§create_slot: bool§enabled: bool§copy_data: boolTrait Implementations§
Source§impl<'a> Clone for CreateSubscriptionOptions<'a>
impl<'a> Clone for CreateSubscriptionOptions<'a>
Source§fn clone(&self) -> CreateSubscriptionOptions<'a>
fn clone(&self) -> CreateSubscriptionOptions<'a>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl<'a> Copy for CreateSubscriptionOptions<'a>
Source§impl<'a> Debug for CreateSubscriptionOptions<'a>
impl<'a> Debug for CreateSubscriptionOptions<'a>
Auto Trait Implementations§
impl<'a> Freeze for CreateSubscriptionOptions<'a>
impl<'a> RefUnwindSafe for CreateSubscriptionOptions<'a>
impl<'a> Send for CreateSubscriptionOptions<'a>
impl<'a> Sync for CreateSubscriptionOptions<'a>
impl<'a> Unpin for CreateSubscriptionOptions<'a>
impl<'a> UnsafeUnpin for CreateSubscriptionOptions<'a>
impl<'a> UnwindSafe for CreateSubscriptionOptions<'a>
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
Mutably borrows from an owned value. Read more