pub struct ViewDefinition {
pub id: String,
pub name: String,
pub sparql_query: String,
pub accessed_predicates: Vec<String>,
pub created_at: Instant,
}Expand description
Definition of a materialized view.
A view is identified by a unique id and backed by a SPARQL SELECT query. The
accessed_predicates list is used to decide which triple deltas can affect this view; if the
list is empty the view is considered to be affected by all changes.
Fields§
§id: StringUnique identifier for this view (e.g. a UUID or user-supplied name).
name: StringHuman-readable name.
sparql_query: StringSPARQL SELECT query whose result set defines this view.
accessed_predicates: Vec<String>Predicate IRIs that this view’s query reads. Used for selective delta propagation. If empty, the view is assumed to depend on all predicates.
created_at: InstantWhen this definition was registered.
Implementations§
Source§impl ViewDefinition
impl ViewDefinition
Sourcepub fn new(
id: impl Into<String>,
name: impl Into<String>,
sparql_query: impl Into<String>,
accessed_predicates: Vec<String>,
) -> Self
pub fn new( id: impl Into<String>, name: impl Into<String>, sparql_query: impl Into<String>, accessed_predicates: Vec<String>, ) -> Self
Create a new view definition.
accessed_predicates should list every predicate IRI that appears in the SPARQL query’s
triple patterns. An empty list means “depends on everything.”
Trait Implementations§
Source§impl Clone for ViewDefinition
impl Clone for ViewDefinition
Source§fn clone(&self) -> ViewDefinition
fn clone(&self) -> ViewDefinition
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for ViewDefinition
impl RefUnwindSafe for ViewDefinition
impl Send for ViewDefinition
impl Sync for ViewDefinition
impl Unpin for ViewDefinition
impl UnsafeUnpin for ViewDefinition
impl UnwindSafe for ViewDefinition
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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>
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>
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 more