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

Add simple MySqlGeometry type #677

Closed
bgrainger opened this issue Aug 10, 2019 · 1 comment
Closed

Add simple MySqlGeometry type #677

bgrainger opened this issue Aug 10, 2019 · 1 comment
Assignees

Comments

@bgrainger
Copy link
Member

@bgrainger bgrainger commented Aug 10, 2019

Connector/NET supports a MySqlGeometry type, but it doesn't appear to be very well designed:

  • MySqlGeometry.Value exposes the data for direct manipulation
  • The API only seems to support POINT, not any other kind of Geometry object
  • It fails when used with a lot of APIs: bugs 96498, 96499, 96500.
  • It's implemented as a struct when possibly a class would be more appropriate.

This isn't really an issue in practice as it appears to be used very infrequently: #70 (comment)

Because it's not used much, there's little backwards compatibility concern with changing its API. We should introduce a type that's suitable for use with spatial querying layers and that serves to mark a parameter value or returned result as unambiguously being a GEOMETRY value, not any arbitrary byte[].

MySqlDataReader.GetValue should still return byte[] for GEOMETRY columns, but MySqlDataReader.GetMySqlGeometry and GetFieldValue<MySqlGeometry> should be implemented.

@bgrainger
Copy link
Member Author

@bgrainger bgrainger commented Sep 24, 2019

Added in 0.57.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

1 participant