Skip to content

Commit

Permalink
Use parseUnsignedInt in OID Codec
Browse files Browse the repository at this point in the history
  • Loading branch information
armanbilge authored Jun 3, 2024
1 parent 18d91be commit e66ae4f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion modules/core/shared/src/main/scala/util/Typer.scala
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ object Typer {
//Note Postgres defines oids as *unsigned* Ints https://www.postgresql.org/docs/current/datatype-oid.html
//Since Scala currently lacks a built-in unsigned Int type, if the oid exceeds `Int.MaxValue`
//it will be converted to/from a negative Int by this Codec (only observed in CockroachDB)
val oid: Codec[Int] = Codec.simple(java.lang.Integer.toUnsignedLong(_).toString, _.toLong.toInt.asRight, Type.oid)
val oid: Codec[Int] = Codec.simple(java.lang.Integer.toUnsignedLong(_).toString, java.lang.Integer.parseUnsignedInt(_).asRight, Type.oid)

val typeInfoMap: F[Map[Int, TypeInfo]] = {

Expand Down

0 comments on commit e66ae4f

Please sign in to comment.