Skip to content

wkb encoding/decoder for working with mysql/mariadb queries#85

Closed
paulmach wants to merge 3 commits intomasterfrom
encoding-mysql
Closed

wkb encoding/decoder for working with mysql/mariadb queries#85
paulmach wants to merge 3 commits intomasterfrom
encoding-mysql

Conversation

@paulmach
Copy link
Copy Markdown
Owner

@paulmach paulmach commented Feb 9, 2022

Addresses issues seen with #79 and #61

Basically, mysql/mariadb prefix the 4 byte srid. This PR adds helpers to deal with that.

For Insert you need to use WKT or prefix your binary data with that 4 bytes. wkb.MySQLValue(orb.Point{1, 1}, optionalSRID) helps with that.

For reading you can ST_asBinary or use the wkb.MySQLScanner(p)

See the readme updates in the PR for more details.

@paulmach
Copy link
Copy Markdown
Owner Author

This is superseded by #88

The helper is now ewkb.ScannerPrefixSRID

@paulmach paulmach closed this Apr 18, 2022
@paulmach paulmach deleted the encoding-mysql branch April 18, 2022 19:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant