-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make jdbc/postgres adapter convert array type elements (e.g. date[] a…
…rrays are returned as arrays of Date instances) Before, the conversion proc would recursively map the array so that all subarrays where turned into ruby arrays. However, it would not do any value conversion, so date[] arrays would be returned as ruby arrays with Java::JavaSQL::Date instances. Refactor this to use a separate converter instance per array column, that uses the standard scalar type conversion to convert elements of the array. Refactor specs so that some basic tests of this feature are run on jdbc. Unfortunately, it looks like not all types are handled, so change the tests so that only the cases the jdbc/postgres adapter currently handles are run on jdbc/postgres. This is not backwards compatible if you were relying on the jdbc/postgres array typecasting internals.
- Loading branch information
1 parent
4d5988a
commit 938299f
Showing
3 changed files
with
86 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters