spatial_adapter icon indicating copy to clipboard operation
spatial_adapter copied to clipboard

Support for Oracle Enhanced

Open ps2 opened this issue 14 years ago • 3 comments

I work for IPS MeteoStar (http://www.meteostar.com). We have been maintaining an internally developed patch to spatial adapter for several years that adds support for oracle spatial. I wrote the initial version and other employees have worked on it over time to support rails upgrades, etc. We've been meaning to contribute it back to the open source community for a while, but as it always depended on the newer (2.0) version of oci8, we thought it would be best to wait until that was released, along with a Rails adapter that supported oci8 2.0 (oracle enhanced).

Last week I extracted some of our extensions to spatial adapter, upgraded to the latest (we've been running on a very old version of it, since before it was on github), wrote rspec tests to match the other postgresql and mysql tests, and removed some of the patches that were no longer necessary, and then checked it in to my branch here on github.

Let me know if you have any questions or modifications you'd like to see before accepting the code.

ps2 avatar Oct 11 '10 21:10 ps2

Looks great. (Not that I have the resources to test it.) However, I'm going to hesitate in merging your commits for now. The reason is that spatial_adapter in its current form is becoming increasing problematic when it comes to managing dependencies. Because it tries to include modifications to a bunch of different database adapters at once, I can't set the appropriate gem dependencies, otherwise I would force users to have gems they aren't really using. (For example, I only use PostgreSQL, so I don't want to be required to have the MySQL gem as well.)

As a result, I am inclined to break up the plugin by database, so that these and other issues can be resolved.

pdeffendol avatar Oct 13 '10 22:10 pdeffendol

Hmm, yeah, I could see that improving the situation. Would you have a shared "core" spatial adapter library, that the specific database adapters would depend on?

ps2 avatar Oct 13 '10 22:10 ps2

I haven't thought about the details yet, but it's a possibility if there is enough common code.

pdeffendol avatar Oct 14 '10 15:10 pdeffendol