Comments (1)
A transaction is committed in all of the methods. We call Engine.begin()
and pass to a context manager.
We use the 1.4 "legacy" API where the, now deprecated, nesting of begin()
/commit()
is possible. So, you can get the SQLArchemy engine from the store (or you could have passed it in to the Store's __init__
) and call begin()
around whatever calls to the store you want. So that changes the transaction boundary.
I think by "avoiding" transactions you mean not calling commit()
within the transaction within the Store methods. (My understanding of the Python DB API is that you start a transaction when you execute anything if there isn't already one in progress.) Honestly, I prefer not actually managing the transaction within the store since it becomes complicated to manage when you need the transaction boundary to be broader than the Store can manage (e.g., committing after formatting a response to a web request). I haven't taken up that change since I became maintainer, but, as always, PRs with tests are welcome.
The SQLAlchemy
store doesn't implement commit()
, so it doesn't do anything if you call it.
SQLAlchemy transactions reference: https://docs.sqlalchemy.org/en/14/core/connections.html?highlight=connect#using-transactions
from rdflib-sqlalchemy.
Related Issues (20)
- Violent deprecation warnings vs sqlalchemy 1.4.46 HOT 12
- 0.5.3: pytest is failing in 11 units HOT 3
- Maintainer Request HOT 17
- Extra "test" subdirectory in tests ? HOT 1
- Drop support for old Python versions HOT 6
- Build error for Python 2.7 for MySQL HOT 1
- Engine.has_table() method is deprecated HOT 1
- addN returns how many triples were actually added? HOT 2
- Loading a large ontology using PostgreSQL as the backend results in BTREE index error HOT 2
- How to query the database? HOT 2
- Cryptic `KeyError: LUUU` when adding an invalid triple into a graph HOT 1
- Failure when trying to search for a triple where object is a Literal with a language tag HOT 1
- 0.5.0: test suite is usimg `nose` HOT 4
- Performance warning HOT 5
- N3 Formula <-> SQLAlchemy Store error HOT 3
- 0.5.3: sphinx warnings `reference target not found` HOT 3
- N3 formula/rule persistence not idempotent HOT 7
- docstring for the `configuration` argument of `rdflib_sqlalchemy.store.SQLAlchemy` seems wrong HOT 1
- Adding graph_aware for `rdflib.Dataset`
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rdflib-sqlalchemy.