giacomocavalieri / squirrel

🐿️ Type safe SQL in Gleam
Apache License 2.0
203 stars 14 forks source link

Timestamps fail to decode due to microseconds #37

Closed ceedon closed 3 hours ago

ceedon commented 3 hours ago

The current implementation of the timestamp decoder fails for the timestamp field when used w/ common pg built-ins like now() as they store microseconds.

Is this intentional? Could store the last item of the second tuple as a Float and support both.

giacomocavalieri commented 3 hours ago

Hello! I think that's a bug in gleam_pgo and not squirrel itself as it's just calling pgo.decode_timestamp, I think it might be worth opening this issue in that repo

ceedon commented 3 hours ago

Fair enough!