Skip to content

Commit

Permalink
Version bump v0.1.4
Browse files Browse the repository at this point in the history
  • Loading branch information
pksunkara committed Dec 14, 2023
1 parent 68486e4 commit 607fa22
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 5 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Changelog

## 0.1.4

#### Enhancements
* Added support for Postgres 16

## 0.1.3

#### Enhancements
Expand Down
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "ulid"
publish = false
version = "0.1.3"
version = "0.1.4"

edition = "2021"
rust-version = "1.70.0"
Expand Down
12 changes: 8 additions & 4 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -189,15 +189,19 @@ mod tests {

#[pg_test]
fn test_ulid_to_timestamp() {
let result =
Spi::get_one::<&str>(&format!("set timezone TO 'UTC'; SELECT '{TEXT}'::ulid::timestamp::text;")).unwrap();
let result = Spi::get_one::<&str>(&format!(
"SET TIMEZONE TO 'UTC'; SELECT '{TEXT}'::ulid::timestamp::text;"
))
.unwrap();
assert_eq!(Some(TIMESTAMP), result);
}

#[pg_test]
fn test_timestamp_to_ulid() {
let result =
Spi::get_one::<&str>(&format!("set timezone TO 'UTC'; SELECT '{TIMESTAMP}'::timestamp::ulid::text;")).unwrap();
let result = Spi::get_one::<&str>(&format!(
"SET TIMEZONE TO 'UTC'; SELECT '{TIMESTAMP}'::timestamp::ulid::text;"
))
.unwrap();
assert_eq!(Some("01GV5PA9EQ0000000000000000"), result);
}

Expand Down

0 comments on commit 607fa22

Please sign in to comment.