diff --git a/CHANGELOG.md b/CHANGELOG.md index 771a313..65be773 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,14 @@ # Changelog +## Unreleased + +- Provided functions for handling timestamp values. The `timestamp` function + coerces a `#(#(Int, Int, Int), #(Int, Int, Int))` value representing + `#(#(year, month, day), #(hour, minute, second))` into a `Value`. The + `decode_timestamp` function can be used to decode a dynamic value returned from + the database as a timestamp in the same nested tuple format. + + ## v0.8.0 - 2024-05-20 - Added `array` column handling, accepting a `List` as value. diff --git a/src/gleam/pgo.gleam b/src/gleam/pgo.gleam index c3b188e..79a32ea 100644 --- a/src/gleam/pgo.gleam +++ b/src/gleam/pgo.gleam @@ -158,6 +158,7 @@ pub fn text(a: String) -> Value @external(erlang, "gleam_pgo_ffi", "coerce") pub fn bytea(a: BitArray) -> Value +/// Coerce a timestamp represented as `#(#(year, month, day), #(hour, minute, second))` into a `Value`. @external(erlang, "gleam_pgo_ffi", "coerce") pub fn array(a: List(a)) -> Value