pub trait QueryTx {
fn all_statements(
&self
) -> Box<dyn Iterator<Item = Result<Statement, LigatureError>>>;
fn match_statements(
&self,
source: Option<Identifier>,
arrow: Option<Identifier>,
target: Option<Value>
) -> Box<dyn Iterator<Item = Result<Statement, LigatureError>>>;
fn match_statements_range(
&self,
source: Option<Identifier>,
arrow: Option<Identifier>,
target: Range
) -> Box<dyn Iterator<Item = Result<Statement, LigatureError>>>;
fn statement_for_context(
&self,
context: &Identifier
) -> Result<Option<Statement>, LigatureError>;
}
Expand description
Represents a QueryTx within the context of a Ligature instance and a single Dataset
Required methods
fn all_statements(
&self
) -> Box<dyn Iterator<Item = Result<Statement, LigatureError>>>
fn all_statements(
&self
) -> Box<dyn Iterator<Item = Result<Statement, LigatureError>>>
Returns all Statements in this Dataset.
fn match_statements(
&self,
source: Option<Identifier>,
arrow: Option<Identifier>,
target: Option<Value>
) -> Box<dyn Iterator<Item = Result<Statement, LigatureError>>>
fn match_statements(
&self,
source: Option<Identifier>,
arrow: Option<Identifier>,
target: Option<Value>
) -> Box<dyn Iterator<Item = Result<Statement, LigatureError>>>
Returns all Statements that match the given criteria. If a parameter is None then it matches all, so passing all Nones is the same as calling all_statements.
fn match_statements_range(
&self,
source: Option<Identifier>,
arrow: Option<Identifier>,
target: Range
) -> Box<dyn Iterator<Item = Result<Statement, LigatureError>>>
fn match_statements_range(
&self,
source: Option<Identifier>,
arrow: Option<Identifier>,
target: Range
) -> Box<dyn Iterator<Item = Result<Statement, LigatureError>>>
Returns all Statements that match the given criteria. If a parameter is None then it matches all.
fn statement_for_context(
&self,
context: &Identifier
) -> Result<Option<Statement>, LigatureError>
fn statement_for_context(
&self,
context: &Identifier
) -> Result<Option<Statement>, LigatureError>
Returns the Statement for the given context.