Skip to content

Commit

Permalink
Update to using vitess v17 protos
Browse files Browse the repository at this point in the history
  • Loading branch information
mattrobenolt committed Jan 19, 2024
1 parent 6848e72 commit 0b66d49
Show file tree
Hide file tree
Showing 5 changed files with 76 additions and 73 deletions.
6 changes: 4 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
module github.com/planetscale/psdb

go 1.19
go 1.21

toolchain go1.21.6

require (
connectrpc.com/connect v1.11.0
github.com/klauspost/connect-compress/v2 v2.0.0
github.com/planetscale/vitess-types v0.0.0-20230808182149-da48f87540fa
github.com/planetscale/vitess-types v0.0.0-20231211191709-770e14433716
github.com/segmentio/asm v1.2.0
github.com/stretchr/testify v1.7.0
google.golang.org/protobuf v1.31.0
Expand Down
5 changes: 3 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,13 @@ github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSs
github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk=
github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38=
github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
github.com/klauspost/compress v1.16.7 h1:2mk3MPGNzKyxErAw8YaohYh69+pa4sIQSC0fPGCFR9I=
github.com/klauspost/compress v1.16.7/go.mod h1:ntbaceVETuRiXiv4DpjP66DpAtAGkEQskQzEyD//IeE=
github.com/klauspost/connect-compress/v2 v2.0.0 h1:L7TVsLa6Oo9Hkkb6r3DwSrhBbcWlXjneqBj7fCRXviU=
github.com/klauspost/connect-compress/v2 v2.0.0/go.mod h1:604CD9JSAjGqtVzCM4SRgM/9TFTkWBcp+2wlQfGyJ6c=
github.com/planetscale/vitess-types v0.0.0-20230808182149-da48f87540fa h1:juLtMTt8CSth379yqZZh1v8JP9UpI/wQlBpsfo/qhdE=
github.com/planetscale/vitess-types v0.0.0-20230808182149-da48f87540fa/go.mod h1:xzNXoqcNPoV2oI52AwXf+213wzzf46KSOAjGXHrju7U=
github.com/planetscale/vitess-types v0.0.0-20231211191709-770e14433716 h1:FD6vnHCirVPeyn+E6Z0HyXoAqXzjfTcRpgss/63im6w=
github.com/planetscale/vitess-types v0.0.0-20231211191709-770e14433716/go.mod h1:8KWsIjuUBs+xlbfn9wBCxicFZqV8BCPIFoqlOSs+60I=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/segmentio/asm v1.2.0 h1:9BQrFxC+YOHJlTlHGkTrFWf59nbL3XnCoFLTwDCI7ys=
Expand Down
22 changes: 11 additions & 11 deletions proto-src/psdb/v1alpha1/database.proto
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ syntax = "proto3";
package psdb.v1alpha1;

import "psdb/data/v1/data.proto";
import "vitess/query/v16/query.proto";
import "vitess/vtgate/v16/vtgate.proto";
import "vitess/vtrpc/v16/vtrpc.proto";
import "vitess/query/v17/query.proto";
import "vitess/vtgate/v17/vtgate.proto";
import "vitess/vtrpc/v17/vtrpc.proto";

option go_package = "github.com/planetscale/psdb/types/psdb/v1alpha1;psdbv1alpha1";

Expand All @@ -26,14 +26,14 @@ message ExecuteRequest {
Session session = 1;

string query = 2;
map<string, vitess.query.v16.BindVariable> bind_variables = 3;
map<string, vitess.query.v17.BindVariable> bind_variables = 3;
}

message ExecuteResponse {
Session session = 1;

vitess.query.v16.QueryResult result = 2;
vitess.vtrpc.v16.RPCError error = 3;
vitess.query.v17.QueryResult result = 2;
vitess.vtrpc.v17.RPCError error = 3;

// optional timing, in seconds, for the response, if empty or 0, this wasn't set
// does not exist in the response from a StreamExecute.
Expand All @@ -44,14 +44,14 @@ message PrepareRequest {
Session session = 1;

string query = 2;
map<string, vitess.query.v16.BindVariable> bind_variables = 3;
map<string, vitess.query.v17.BindVariable> bind_variables = 3;
}

message PrepareResponse {
Session session = 1;

repeated vitess.query.v16.Field fields = 2;
vitess.vtrpc.v16.RPCError error = 3;
repeated vitess.query.v17.Field fields = 2;
vitess.vtrpc.v17.RPCError error = 3;
}

message CloseSessionRequest {
Expand All @@ -60,12 +60,12 @@ message CloseSessionRequest {

message CloseSessionResponse {
Session session = 1;
vitess.vtrpc.v16.RPCError error = 2;
vitess.vtrpc.v17.RPCError error = 2;
}

message Session {
bytes signature = 1;
vitess.vtgate.v16.Session vitess_session = 2;
vitess.vtgate.v17.Session vitess_session = 2;
}

service Database {
Expand Down
Loading

0 comments on commit 0b66d49

Please sign in to comment.