Skip to content
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

Sqlite: Revert breaking changes to SpatialiteLoader #14821

Closed
bricelam opened this issue Feb 25, 2019 · 2 comments
Closed

Sqlite: Revert breaking changes to SpatialiteLoader #14821

bricelam opened this issue Feb 25, 2019 · 2 comments
Assignees
Labels
closed-fixed The issue has been fixed and is/will be included in the release indicated by the issue milestone. type-enhancement
Milestone

Comments

@bricelam
Copy link
Contributor

UseNetTopologySuite loads the SpatiaLite extension for open, external connections now. Applications should no longer need to use SpatialiteLoader directly.

@bricelam bricelam self-assigned this Feb 25, 2019
bricelam added a commit that referenced this issue Feb 28, 2019
This also updates EFCore.Sqlite to use the new method.

There is a breaking change in SpatialiteLoader. The methods used to take a DbConnection (I guess 'cause we could) but now take a SqliteConnection.

You no longer need to call SqliteConnection.EnableExtensions() before using SpatialiteLoader since the new LoadExtension method will bypass the connection setting. This greatly improves usability and makes EnableExtensions only apply to the load_extension SQL function. Given this, EnableExtensions should probably have been a connection string keyword.

In fact, SpatialiteLoader isn't really needed anymore since calling UseNetTopologySuite now loads the extension for open external connections. Filed #14821 to decide its fate.

LoadExtension has some unusual behavior when the connection is closed. Any exceptions will be delayed until the connection is opened. There is no way to remove an extension you tried to load, so you'll have to create a new connection object to get back in a good state.

Resolves #13826
@ajcvickers
Copy link
Member

Triage: Obsolete.

@ajcvickers ajcvickers added this to the 3.0.0 milestone Mar 1, 2019
@bricelam bricelam added the closed-fixed The issue has been fixed and is/will be included in the release indicated by the issue milestone. label Mar 23, 2019
@bricelam bricelam changed the title Sqlite: Remove (or obsolete) SpatialiteLoader Sqlite: Revert breaking changes to SpatialiteLoader Mar 25, 2019
@bricelam
Copy link
Contributor Author

This class lives in the SQLite provider, but is used by the NTS extension. Any additional spatial extension will also use it. Going to revert the breaking changes, but not mark it as obsolete.

@ajcvickers ajcvickers modified the milestones: 3.0.0, 3.0.0-preview4 Apr 15, 2019
@ajcvickers ajcvickers modified the milestones: 3.0.0-preview4, 3.0.0 Nov 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
closed-fixed The issue has been fixed and is/will be included in the release indicated by the issue milestone. type-enhancement
Projects
None yet
Development

No branches or pull requests

2 participants