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

add java.time.LocalDate support to Row #72

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

wonk1132
Copy link

as the name suggests, since we are using java.time.LocalDate, we should have jdub help us out.

Copy link
Member

@vanvlack vanvlack left a comment

Choose a reason for hiding this comment

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

Looks like this is against master, which is scala 2.12.x, if you could backport to the 2.11 branch as well, that would be great.

/**
* Extract the value with the given name as an Option[LocalDate].
*/
def localDate(name: String): Option[LocalDate] = extract(rs.getDate(name).toLocalDate)
Copy link
Member

Choose a reason for hiding this comment

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

you could do:

localDateTime(name).map(_.toLocalDate)

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.

3 participants