zio / zio-quill

Compile-time Language Integrated Queries for Scala

Home Page:https://zio.dev/zio-quill

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

io.getquill.context.jdbc.Decoders#dateDecoder creates java.util.Calendar for every request

gr1ev0us opened this issue · comments

Version: v4.8.0
Module: quill-jdbc
Database: all

Expected behavior

Calendar.getInstance(dateTimeZone) is static and could be a value member of Decoders

Actual behavior

Calendar.getInstance(dateTimeZone) calculates for every Date value, which have been read from database

Code:

decoder((index, row, session) => new util.Date(row.getTimestamp(index, Calendar.getInstance(dateTimeZone)).getTime))

@getquill/maintainers

Closing as it doesn't seems to be something we can avoid. See discussion here: #2913 (comment)