Skip to content

Instantly share code, notes, and snippets.

@mpellegrini
Created May 27, 2017 09:33
Show Gist options
  • Save mpellegrini/49d8a60dc4dd470171f6583ce8fd3a7f to your computer and use it in GitHub Desktop.
Save mpellegrini/49d8a60dc4dd470171f6583ce8fd3a7f to your computer and use it in GitHub Desktop.
JDBI v2 Bind Java LocalDate
public class LocalDateBinder implements Binder<Bind, LocalDate> {
@Override
public void bind(SQLStatement<?> stmt, Bind bind, LocalDate localDate) {
stmt.bind(bind.value(), localDate.format(DateTimeFormatter.ISO_LOCAL_DATE));
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment