pub trait Scope: Send + Sync {
// Required methods
fn table(&self, collection: &str) -> String;
fn join_table(&self, table: &str) -> String;
fn bind(
&self,
collection: &str,
table: &str,
alias: &str,
) -> Result<ScopeBinding>;
// Provided method
fn error(&self, message: String) -> Error { ... }
}Expand description
How a builder’s from() reads a collection: the table it is stored
under, and the hooks that map its attributes to columns and keep its
statements to a tenant.
PHP: Utopia\Database\Builder\Scope.
Required Methods§
Sourcefn table(&self, collection: &str) -> String
fn table(&self, collection: &str) -> String
The name the collection’s table is stored under (table()).
Sourcefn join_table(&self, table: &str) -> String
fn join_table(&self, table: &str) -> String
The name a builder that read a collection through this scope joins
table under (joinTable()).
Provided Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".