New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adds capability to have an updatable data source via ogr connection #2618
Conversation
@manisandro what do you think about this? |
@carolinux In what scenario is a writeable connection from the connection pool required? If memory serves me right, for all operations which alter the dataset, a spearate OGR handle is opened in read/write mode. The connection pool connections should only be used for read-only operations? |
I came across this when using the forceReload capability. There the handle On Mon, Jan 4, 2016 at 12:17 PM, Sandro Mani notifications@github.com
|
|
I am writing a plugin where I want to write to an OGR layer via QGIS. (But On Mon, Jan 4, 2016 at 12:55 PM, Sandro Mani notifications@github.com
|
xlsx is an ogr layer type that supports read/write btw On Mon, Jan 4, 2016 at 12:57 PM, Caroline Alexiou carolinegr@gmail.com
|
This behaviour needs to be investigated. The connections in the connection pool should remain read-only. |
Maybe it's related to calling forceReload on a layer which is currently in edit mode? |
Why should they remain read-only? On Mon, Jan 4, 2016 at 1:01 PM, Matthias Kuhn notifications@github.com
|
Because connections from the connection pool should only be used for read-only operations. Connections for altering the dataset are created separately, and the code around them ensures that the connection pool handles are invalidated when the dataset is altered. |
Alright, I misunderstood something. It indeed needs to be investigated how to re-open a datasource in r/w mode, but this PR wouldn't solve this then. Closing. |
Not doing it like this gives us a read only data source the next time we try to access it (if for some reason we invalidate the connection - for instance via forceReload )
@m-kuhn