Multiple query in one request?

it looks we can use such syntax to do multiple insert ?

but can i do something like this?

my usecase is

  1. readonly scheme icv built into archtypes
  2. the kg editor built base on 1.
  3. other app and service might consume knowledge from 2.

i used too use some in-memory javascript owl reasoner, but the problem is it should reload rdf file in each request the performance is bad when rdf grow.

and after some research it looks there's no way to runtime ABOX(don't know if its the right term). assertion then dropped(still can't figure out how to undo commit that @jess metioned with stardog.js-client).

so should i use two or three separate query to work with such situation?

1 insert assertion tripples
2 query and get fact
3 remove temporal tripples(sometimes its okay to insert it to other namespace, but don't know if its right way)

what is the best practice?

It's not possible to do this through Stardog Studio because each statement is executed in a separate transaction and committed if successful. However, it's possible to do this in your client application by beginning a transaction, inserting and querying data and then rolling back the transaction. The query will be over the data in the database and the newly added transient data. The rollback of the transaction means the data will never be visible to any other transaction.

can i do rolling back with GitHub - stardog-union/stardog.js: Stardog JavaScript Framework for node.js and the browser

i've check the doc there's such api but don't know how to use

db.transaction.rollback(conn, database, transactionId, params)

where's the transactionId?

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.