Skip to content

Commit

Permalink
feat(sql): added uuid type in postgres decoder (#1375)
Browse files Browse the repository at this point in the history
Co-authored-by: Kauan Curbani <kauan.curbani@segalas.local>
Co-authored-by: Fabian-Lars <fabianlars@fabianlars.de>
  • Loading branch information
3 people authored Sep 9, 2024
1 parent 3912800 commit 0dd97d9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changes/sql-uuid-type.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"sql": patch
---

Added support for `UUID` columns to the postgres implementation.
2 changes: 1 addition & 1 deletion plugins/sql/src/decode/postgres.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ pub(crate) fn to_json(v: PgValueRef) -> Result<JsonValue, Error> {
}

let res = match v.type_info().name() {
"CHAR" | "VARCHAR" | "TEXT" | "NAME" => {
"CHAR" | "VARCHAR" | "TEXT" | "NAME" | "UUID" => {
if let Ok(v) = ValueRef::to_owned(&v).try_decode() {
JsonValue::String(v)
} else {
Expand Down

0 comments on commit 0dd97d9

Please sign in to comment.