Skip to content

Commit

Permalink
refactor(cognitarium)!: make delete triples optional and enforce wher…
Browse files Browse the repository at this point in the history
…e clause

Previously, delete triples was mandatory and the where clause optional. It was
incorrect with regards to the W3C specification of the SPARQL DELETE
query.
  • Loading branch information
ccamel committed Aug 30, 2023
1 parent 47ae927 commit 5ce531b
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions contracts/okp4-cognitarium/src/msg.rs
Original file line number Diff line number Diff line change
Expand Up @@ -67,11 +67,12 @@ pub enum ExecuteMsg {
DeleteData {
/// The prefixes used in the operation.
prefixes: Vec<Prefix>,
/// The items to delete.
/// Specifies the specific triple patterns to delete.
/// If nothing is provided, the patterns from the `where` clause are used for deletion.
delete: Vec<TriplePattern>,
/// The WHERE clause to apply.
/// If not provided, all the RDF triples are considered.
r#where: Option<WhereClause>,
/// Defines the patterns that data (RDF triples) should match in order for it to be
/// considered for deletion.
r#where: WhereClause,
},
}

Expand Down Expand Up @@ -431,7 +432,7 @@ pub struct ConstructQuery {
}

/// # Prefix
/// Represents a prefix in a [SelectQuery]. A prefix is a shortcut for a namespace used in the query.
/// Represents a prefix, i.e. a shortcut for a namespace used in a query.
#[cw_serde]
pub struct Prefix {
/// The prefix.
Expand Down

0 comments on commit 5ce531b

Please sign in to comment.