mirror of
https://github.com/debezium/postgres-decoderbufs.git
synced 2026-02-04 06:56:22 +00:00
Use oneof for different datum field types
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
package decoderbufs;
|
||||
|
||||
option java_package="decoderbufs.proto";
|
||||
option java_outer_classname = "PgldProto";
|
||||
option java_outer_classname = "PgldProtos";
|
||||
option optimize_for = SPEED;
|
||||
|
||||
enum Op {
|
||||
@@ -18,20 +18,23 @@ message Point {
|
||||
message DatumMessage {
|
||||
optional string column_name = 1;
|
||||
optional int64 column_type = 2;
|
||||
optional int32 datum_int32 = 3;
|
||||
optional int64 datum_int64 = 4;
|
||||
optional float datum_float = 5;
|
||||
optional double datum_double = 6;
|
||||
optional bool datum_bool = 7;
|
||||
optional string datum_string = 8;
|
||||
optional bytes datum_bytes = 9;
|
||||
optional Point datum_point = 10;
|
||||
oneof datum {
|
||||
int32 datum_int32 = 3;
|
||||
int64 datum_int64 = 4;
|
||||
float datum_float = 5;
|
||||
double datum_double = 6;
|
||||
bool datum_bool = 7;
|
||||
string datum_string = 8;
|
||||
bytes datum_bytes = 9;
|
||||
Point datum_point = 10;
|
||||
}
|
||||
}
|
||||
|
||||
message RowMessage {
|
||||
optional sint64 commit_time = 1;
|
||||
optional string table = 2;
|
||||
optional Op op = 3;
|
||||
repeated DatumMessage new_tuple = 4;
|
||||
repeated DatumMessage old_tuple = 5;
|
||||
optional uint32 transaction_id = 1;
|
||||
optional uint64 commit_time = 2;
|
||||
optional string table = 3;
|
||||
optional Op op = 4;
|
||||
repeated DatumMessage new_tuple = 5;
|
||||
repeated DatumMessage old_tuple = 6;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user