- π¦πΉAustria drunken monkey Vienna, Austria
Thanks a lot for your continued work on this! This is now looking pretty good already.
I went through the whole code and corrected some nit-picks, but nothing major.That we cannot (easily) use the proper MySQL data type is, of course, rather unfortunate, but I canβt really think of a good solution here, either. Just a wild selection of pretty bad ones:
- It would, in theory, be possible to use an
INSERT β¦ SELECT β¦
query, where itβs simple to add expressions. - Doesnβt seem like anything is stopping us from just using
$db->query('INSERT INTO β¦')
directly. - We could probably also override the database class to provide a custom workaround.
As said, all pretty bad. So, probably fine to stick with the βcleanβ way for the first version and think about improving performance later, if there is demand. (And maybe someone comes up with a better solution.)
Anyways, please give my attached patch revision a try and thorough review, and if everything looks good to you, I can finally commit this.
And, in any case, thanks a lot for your work, once again! - It would, in theory, be possible to use an
- π¦πΉAustria drunken monkey Vienna, Austria
Of course, everyone else is very welcome to test/review, too, to make sure this is a good solution.
- π¬π§United Kingdom progga
I have thoroughly tested #44 and it works okay. Even stumbled upon a new issue β with search_ap_location in the process but that's unrelated. So I am okay with #44.
-
drunken monkey β
committed b5153dab on 8.x-1.x authored by
progga β
Issue #2877319 by progga, drunken monkey, ndf, hswong3i, scothiam,...
-
drunken monkey β
committed b5153dab on 8.x-1.x authored by
progga β
- Status changed to Fixed
almost 2 years ago 9:22am 25 February 2023 - π¦πΉAustria drunken monkey Vienna, Austria
Good to hear, thanks for testing and reporting back.
Committed.
Thanks again, everyone β especially thanks a lot to ndf and progga! - π³π±Netherlands ekes
I'm going to pop this here - for the next time I think about this - I decided to take a look if it was possible for here, and for storing the geofield itself in a native geometry type.
We could probably also override the database class to provide a custom workaround.
Ooof! Drupal doesn't really have a single location with schema of all tables in the db any more. There's no way of registering that placeholders, or replacement values are to be handled differently for different types of field. The INSERT, UPDATE, SELECT queries are written deep in the conversion of their implementation of Drupal\Core\Database\Query\Query to a string. After some head scratching best I could come up with would be to extend each one of these classes, and alter that point such that it would allow changes based on the table field that is being included. But I dare not think how much work that would be, or how careful you'd have to be not to break something!
- Status changed to Fixed
almost 2 years ago 2:44pm 20 March 2023 Automatically closed - issue fixed for 2 weeks with no activity.