Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import RDF, Redland
- storage = RDF.Storage(...)
- model = RDF.Model(storage)
- Redland.librdf_model_transaction_start(model._model)
- try:
- # Do something
- Redland.librdf_model_transaction_commit(model._model)
- model.sync()
- except:
- Redland.librdf_model_transaction_rollback(model._model)
- class Model(object):
- ...
- def transaction_start(self):
- return Redland.librdf_model_transaction_start(self._model)
Add Comment
Please, Sign In to add comment