pub trait ForeignFetcher: Default {
// Required method
fn fetch(
&self,
database: &impl Database,
table: &str,
local_column: &'static str,
pk_value: Value,
) -> IcDbmsResult<TableColumns>;
}Expand description
This trait defines the behavior of a foreign fetcher, which is responsible for fetching data from foreign sources or databases.
It takes a table name and returns the values associated with that table.
Required Methods§
Sourcefn fetch(
&self,
database: &impl Database,
table: &str,
local_column: &'static str,
pk_value: Value,
) -> IcDbmsResult<TableColumns>
fn fetch( &self, database: &impl Database, table: &str, local_column: &'static str, pk_value: Value, ) -> IcDbmsResult<TableColumns>
Fetches the data for the specified table and primary key values.
§Arguments
database- The database from which to fetch the data.table- The name of the table to fetch data from.local_column- The local column that references the foreign key.pk_value- The primary key to look for.
§Returns
A result containing the fetched table columns or an error.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.