Repository navigation
Geometry Support - #3828
Geometry Support#3828mikeringrose wants to merge 15 commits into
Conversation
There was a problem hiding this comment.
Not sure parsing belongs in the QG. Perhaps in dialects/X/geojson.js? With a parse and stringify function similar to how PG range works https://github.com/sequelize/sequelize/blob/master/lib/dialects/postgres/range.js
|
Looking good so far! Give me shout when you have something more, or if you have issues with WKT support :) |
|
Any news @mikeringrose |
|
jan, here's the issue that i'm currently running into. when sequelize performs INSERT INTO "tablename" ("id","geom") VALUES this causes an issue since we're not generating the select clause here, the Mike Ringrose On Sun, Jun 14, 2015 at 8:36 AM, Jan Aagaard Meier <[email protected]
|
|
@mikeringrose Agreed, the right solution would definitely be to generate the correct select statement. However, I can fully understand that you don't want to undertake that now - and since this is the only case where this has been a problem up to now it would be a lot of work just for this feature :). We would be fine with merging 1 for now. |
|
Awesome. Thanks Jan. I update my PR in the morning and then I wouldn't mind Mike Ringrose On Wed, Jun 17, 2015 at 11:41 AM, Jan Aagaard Meier <
|
|
I added a few tests, moved the parsing out of query-generator, and i'm now using the raw value returned from postgresql instead of converting it to GeoJSON. The new way I read the value in as binary, then as WKB, and finally to GeoJSON. |
|
@mikeringrose Sounds very good! If everything is passing locally for you you should rebase so we can run the tests on travis :) |
There was a problem hiding this comment.
I believe this should be just POINT in the general case (for mysql at least)
|
Cool. I'll make that change. I was thinking that since this PR has been going on for a while, I'd add the postgis implementation first followed by the msyql implementation. I have a lot more experience with postgis but a mysql implemenation should follow fairly fast. |
There was a problem hiding this comment.
We don't need the && value !== null && value !== undefined && !value._isSequelizeMethod part, when we check isString right after :)
There was a problem hiding this comment.
This function is never overridden by dialects, so it could just be inlined, right?
|
Very clean and readable code @mikeringrose - good work so far! |
|
Are you cool if I just re-branch off of the latest code and apply my changes? I'm running into some painful merge conflicts. |
|
Yep, thats fine |
|
All code has been moved to the following PR: #4013. |
This was originally based on #3641, however, I fixed some bugs and hopefully made the code more extensible. If you're happy with the path that I am on, I'll add support for MySQL (and more tests).