pub struct ForeignTableRegistry { /* private fields */ }Expand description
Central registry: maps wrapper kinds to implementations, server names to server records, foreign table names to their definitions.
Implementations§
Source§impl ForeignTableRegistry
impl ForeignTableRegistry
Sourcepub fn with_builtins() -> Self
pub fn with_builtins() -> Self
Create an empty registry populated with Phase 3.2 built-in wrappers.
pub fn register_wrapper(&self, wrapper: Arc<dyn ForeignDataWrapper>)
pub fn create_server( &self, name: &str, wrapper_kind: &str, options: FdwOptions, ) -> Result<(), FdwError>
pub fn drop_server(&self, name: &str) -> bool
pub fn create_foreign_table(&self, table: ForeignTable) -> Result<(), FdwError>
pub fn drop_foreign_table(&self, name: &str) -> bool
pub fn is_foreign_table(&self, name: &str) -> bool
pub fn foreign_table(&self, name: &str) -> Option<ForeignTable>
pub fn server(&self, name: &str) -> Option<ForeignServer>
Sourcepub fn scan(&self, table_name: &str) -> Result<Vec<UnifiedRecord>, FdwError>
pub fn scan(&self, table_name: &str) -> Result<Vec<UnifiedRecord>, FdwError>
Scan a foreign table — called by the runtime when a SELECT references the table by name.
pub fn list_servers(&self) -> Vec<String>
pub fn list_foreign_tables(&self) -> Vec<String>
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for ForeignTableRegistry
impl !RefUnwindSafe for ForeignTableRegistry
impl Send for ForeignTableRegistry
impl Sync for ForeignTableRegistry
impl Unpin for ForeignTableRegistry
impl UnsafeUnpin for ForeignTableRegistry
impl !UnwindSafe for ForeignTableRegistry
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request