You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/main/java/io/r2dbc/postgresql/codec/PostgresqlObjectId.java
+21
Original file line number
Diff line number
Diff line change
@@ -31,6 +31,9 @@
31
31
importjava.time.OffsetDateTime;
32
32
importjava.time.OffsetTime;
33
33
34
+
importio.r2dbc.postgresql.util.Assert;
35
+
importreactor.util.annotation.Nullable;
36
+
34
37
/**
35
38
* Object IDs for well know PostgreSQL data types.
36
39
* <p>Extension Object IDs that are provided by Postgres extensions such as PostGIS are not constants of this enumeration and must be looked up from {@code pg_type}.
@@ -573,4 +576,22 @@ public int getObjectId() {
573
576
returnthis.objectId;
574
577
}
575
578
579
+
publicstaticinttoInt(@NullableLongoid) {
580
+
Assert.requireNonNull(oid, "OID must not be null");
581
+
582
+
returntoInt(oid.longValue());
583
+
}
584
+
585
+
publicstaticinttoInt(longoid) {
586
+
if ((oid & 0xFFFFFFFF00000000L) != 0) {
587
+
thrownewIllegalArgumentException("Value is not an OID:" + oid);
0 commit comments