Skip to content

add support for application/sparql-update transaction requests#126

Merged
dpetran merged 3 commits intomainfrom
feature/sparql-update
Mar 22, 2025
Merged

add support for application/sparql-update transaction requests#126
dpetran merged 3 commits intomainfrom
feature/sparql-update

Conversation

@dpetran
Copy link
Contributor

@dpetran dpetran commented Mar 21, 2025

Implements the SPARQL Protocol update operation.

In lieu of pushing down sparql translation to the db api, this PR just translates the SPARQL update into fql at the first opportunity in order to minimize structural changes to transaction processing which depends on txn introspection.

Depends on fluree/db#992

https://github.com/fluree/core/issues/175

In lieu of pushing down sparql translation to the `db` api, this PR just translates the
SPARQL update into fql at the first opportunity in order to minimize structural changes
to transaction processing which depends on txn introspection.
@dpetran dpetran force-pushed the feature/sparql-update branch from f739aa8 to e2946b2 Compare March 21, 2025 16:33
@dpetran dpetran requested a review from a team March 21, 2025 16:36
Copy link
Contributor

@zonotope zonotope left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🍃

{:keys [body]} :parameters}]
(let [txn-context (ctx-util/txn-context body)
ledger-id (transact-api/extract-ledger-id body)]
(let [txn (if (= :sparql (:format opts))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you should use the function you just defined in db here.

Also, maybe not for this pr, but I think we should eventually write a function that can extract the ledger id directly from a sparql query, or move all sparql conversion outside of the db library here. (This is just a gut level thought. I haven't thought through all of the implications yet)

@dpetran dpetran merged commit ecf2b6f into main Mar 22, 2025
5 checks passed
@dpetran dpetran deleted the feature/sparql-update branch March 22, 2025 16:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants