Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding support for java.sql.Date in JDBC to convert to String #411

Merged
merged 1 commit into from
Apr 25, 2017
Merged

Adding support for java.sql.Date in JDBC to convert to String #411

merged 1 commit into from
Apr 25, 2017

Conversation

bradnussbaum
Copy link
Contributor

No description provided.

Copy link
Member

@jexp jexp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Only the 2 small changes otherwise looks great.

@Test
public void testLoadJdbcSelect() throws Exception {
testCall(db, "CALL apoc.load.jdbc('jdbc:derby:derbyDB','SELECT * FROM PERSON')",
(row) -> assertEquals(singletonMap("NAME", "John"), row.get("row")));
(row) -> assertEquals(new HashMap<String,Object>(){{
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please use Util.map() in all these places.

@@ -140,6 +141,12 @@ private Object convert(Object value) {
if (value instanceof UUID || value instanceof BigInteger || value instanceof BigDecimal) {
return value.toString();
}
if (value instanceof java.sql.Date) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

don't need this as they all inherit from java.util.Date

@jexp jexp merged commit c86dab5 into neo4j-contrib:3.1 Apr 25, 2017
albertodelazzari pushed a commit to albertodelazzari/neo4j-apoc-procedures that referenced this pull request Jun 28, 2017
@bradnussbaum bradnussbaum deleted the feature-410-supportSqlDate branch August 23, 2017 18:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants