Skip to content

Commit

Permalink
Add changelog entry and function doc
Browse files Browse the repository at this point in the history
  • Loading branch information
michaeljones committed May 18, 2024
1 parent 9b676d1 commit aff1545
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# 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.7.0 - 2024-04-05

- The password is now optional in the `url_config` function, defaulting to no
Expand Down
1 change: 1 addition & 0 deletions src/gleam/pgo.gleam
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,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 timestamp(a: #(#(Int, Int, Int), #(Int, Int, Int))) -> Value

Expand Down

0 comments on commit aff1545

Please sign in to comment.