sql-jdbc-changes.asciidoc 1.2 KB

123456789101112131415161718192021222324252627
  1. [discrete]
  2. [[breaking_80_jdbc_changes]]
  3. ==== SQL JDBC changes
  4. //NOTE: The notable-breaking-changes tagged regions are re-used in the
  5. //Installation and Upgrade Guide
  6. //tag::notable-breaking-changes[]
  7. .JDBC driver returns geometry objects as well-known-text string instead of `org.elasticsearch.geo` objects.
  8. [%collapsible]
  9. ====
  10. *Details* +
  11. To reduce the dependency of the JDBC driver onto Elasticsearch classes, the JDBC driver returns geometry data
  12. as strings using the WKT (well-known text) format instead of classes from the `org.elasticsearch.geometry`.
  13. Users can choose the geometry library desired to convert the string representation into a full-blown objects
  14. either such as the `elasticsearch-geo` library (which returned the object `org.elasticsearch.geo` as before),
  15. jts or spatial4j.
  16. *Impact* +
  17. Before upgrading, replace any `org.elasticsearch.geo` classes on the `ResultSet#getObject` or `ResultSet#setObject`
  18. Elasticsearch JDBC driver with their WKT representation by simply calling `toString` or
  19. `org.elasticsearch.geometry.utils.WellKnownText#toWKT/fromWKT` methods.
  20. This change does NOT impact users that do not use geometry classes.
  21. ====
  22. // end::notable-breaking-changes[]