Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
module github.com/planetscale/psdb

go 1.24
go 1.24.5

require (
connectrpc.com/connect v1.18.1
github.com/klauspost/connect-compress/v2 v2.0.0
github.com/planetscale/vitess-types v0.0.0-20250409004758-020920d5ec5a
github.com/planetscale/vtprotobuf v0.6.0
github.com/planetscale/vitess-types v0.0.0-20260313221731-c96dbf730f7d
github.com/planetscale/vtprotobuf v0.6.1-0.20241121165744-79df5c4772f2
github.com/segmentio/asm v1.2.0
github.com/stretchr/testify v1.8.4
google.golang.org/protobuf v1.35.1
google.golang.org/protobuf v1.36.5
)

require (
Expand Down
12 changes: 6 additions & 6 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ github.com/klauspost/compress v1.16.7 h1:2mk3MPGNzKyxErAw8YaohYh69+pa4sIQSC0fPGC
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-20250409004758-020920d5ec5a h1:PMzdwra0DsbjTAufVMx8OMMTdMTMMnyKexN9AqUxCko=
github.com/planetscale/vitess-types v0.0.0-20250409004758-020920d5ec5a/go.mod h1:yRbhtyT9XaBRJ9vwiC++ED8suzJkSmrW4j2XDN7+SPQ=
github.com/planetscale/vtprotobuf v0.6.0 h1:nBeETjudeJ5ZgBHUz1fVHvbqUKnYOXNhsIEabROxmNA=
github.com/planetscale/vtprotobuf v0.6.0/go.mod h1:t/avpk3KcrXxUnYOhZhMXJlSEyie6gQbtLq5NM3loB8=
github.com/planetscale/vitess-types v0.0.0-20260313221731-c96dbf730f7d h1:6r2nVRGJSg9RJ6Et6PthIjYNzMG+zJM8RmZxX8l6zTU=
github.com/planetscale/vitess-types v0.0.0-20260313221731-c96dbf730f7d/go.mod h1:TArDr1Y/xRBA4DCA8f2dY0hV+Y8E4JcCvZ61RLgXL5E=
github.com/planetscale/vtprotobuf v0.6.1-0.20241121165744-79df5c4772f2 h1:1sLMdKq4gNANTj0dUibycTLzpIEKVnLnbaEkxws78nw=
github.com/planetscale/vtprotobuf v0.6.1-0.20241121165744-79df5c4772f2/go.mod h1:t/avpk3KcrXxUnYOhZhMXJlSEyie6gQbtLq5NM3loB8=
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 All @@ -24,8 +24,8 @@ golang.org/x/sys v0.11.0 h1:eG7RXZHdqOJ1i+0lgLgCpSXAp6M3LYlAo6osgSi0xOM=
golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ=
golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU=
google.golang.org/protobuf v1.35.1 h1:m3LfL6/Ca+fqnjnlqQXNpFPABW1UD7mjh8KO2mKFytA=
google.golang.org/protobuf v1.35.1/go.mod h1:9fA7Ob0pmnwhb644+1+CVWFRbNajQ6iRojtC/QF5bRE=
google.golang.org/protobuf v1.36.5 h1:tPhr+woSbjfYvY6/GPufUoYizxw1cF/yFoxJ2fmpwlM=
google.golang.org/protobuf v1.36.5/go.mod h1:9fA7Ob0pmnwhb644+1+CVWFRbNajQ6iRojtC/QF5bRE=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
Expand Down
4 changes: 2 additions & 2 deletions proto-src/buf.lock
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ deps:
- remote: buf.build
owner: planetscale
repository: vitess
commit: 4cad49e0382a4a21a13e508cb3dbf701
digest: shake256:8c04095a096df6a86b5229a88fc9188a03f02dc7772b1a2c05c1902216cb6139139e8bd279e66f5ef2d184de12476ac78954a869a9d50db1d944abbba72163fb
commit: 5b7c5f01d66e46969fcc8b4fee3ba31c
digest: shake256:e2c076e176ffc9adc554e03d5dae5fbdea6131a888eb891072d480d0d33da2851861e55fdbcd89552550f103d3471efe7a2383e81546fb70492ea9474e8499e8
24 changes: 13 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/v21/query.proto";
import "vitess/vtgate/v21/vtgate.proto";
import "vitess/vtrpc/v21/vtrpc.proto";
import "vitess/query/v22/query.proto";
import "vitess/vtgate/v22/vtgate.proto";
import "vitess/vtrpc/v22/vtrpc.proto";

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

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

string query = 2;
map<string, vitess.query.v21.BindVariable> bind_variables = 3;
map<string, vitess.query.v22.BindVariable> bind_variables = 3;
bool prepared = 4;
}

message ExecuteResponse {
Session session = 1;

vitess.query.v21.QueryResult result = 2;
vitess.vtrpc.v21.RPCError error = 3;
vitess.query.v22.QueryResult result = 2;
vitess.vtrpc.v22.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 +45,15 @@ message PrepareRequest {
Session session = 1;

string query = 2;
map<string, vitess.query.v21.BindVariable> bind_variables = 3;
map<string, vitess.query.v22.BindVariable> bind_variables = 3;
}

message PrepareResponse {
Session session = 1;

repeated vitess.query.v21.Field fields = 2;
vitess.vtrpc.v21.RPCError error = 3;
repeated vitess.query.v22.Field fields = 2;
vitess.vtrpc.v22.RPCError error = 3;
uint32 params_count = 4;
}

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

message CloseSessionResponse {
Session session = 1;
vitess.vtrpc.v21.RPCError error = 2;
vitess.vtrpc.v22.RPCError error = 2;
}

message Session {
bytes signature = 1;
vitess.vtgate.v21.Session vitess_session = 2;
vitess.vtgate.v22.Session vitess_session = 2;
}

service Database {
Expand Down
16 changes: 8 additions & 8 deletions proto-src/psdbconnect/v1alpha1/connect.proto
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ syntax = "proto3";

package psdbconnect.v1alpha1;

import "vitess/query/v21/query.proto";
import "vitess/vtrpc/v21/vtrpc.proto";
import "vitess/query/v22/query.proto";
import "vitess/vtrpc/v22/vtrpc.proto";

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

Expand Down Expand Up @@ -46,25 +46,25 @@ message SyncRequest {
// DeletedRow denotes a row that is deleted from the table referenced in the SyncRequest
message DeletedRow {
// This result will contain only the primary keys from the deleted row.
vitess.query.v21.QueryResult result = 1;
vitess.query.v22.QueryResult result = 1;
}

// Updated denotes a row that is updated in the table referenced in the SyncRequest
message UpdatedRow {
// All values of the table before the update was made.
vitess.query.v21.QueryResult before = 1;
vitess.query.v22.QueryResult before = 1;
// All values of the table after the update was made.
vitess.query.v21.QueryResult after = 2;
vitess.query.v22.QueryResult after = 2;
}

// SyncResponse denotes a response to the SyncRequest
message SyncResponse {
// An array of rows that denote inserts into the table.
repeated vitess.query.v21.QueryResult result = 1;
repeated vitess.query.v22.QueryResult result = 1;
// A state object to use that denotes the current state of the SyncResponse.
TableCursor cursor = 2;
// Any errors encountered in streaming data from the table.
vitess.vtrpc.v21.RPCError error = 3;
vitess.vtrpc.v22.RPCError error = 3;
// An array of rows that denote deletes from the table.
repeated DeletedRow deletes = 4;
// An array of rows that denote updates to the table.
Expand All @@ -85,7 +85,7 @@ message TableCursor {
// the SyncRequest will fail.
string position = 3;
// Any known last known primary key values from the a previous session.
vitess.query.v21.QueryResult last_known_pk = 4;
vitess.query.v22.QueryResult last_known_pk = 4;
}

service Connect {
Expand Down
Empty file removed types/.done
Empty file.
14 changes: 7 additions & 7 deletions types/psdb/data/v1/data.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading