Jelajahi Sumber

完成automigrate

yjp 4 bulan lalu
induk
melakukan
f7d01dc624

+ 58 - 0
dps.go

@@ -0,0 +1,58 @@
+package dps
+
+import (
+	"errors"
+	"git.sxidc.com/service-supports/dps-sdk/dpsv1"
+	"git.sxidc.com/service-supports/dps-sdk/ports"
+	"sync"
+)
+
+var clientMapMutex sync.Mutex
+var clientMap map[string]ports.Client
+
+func NewClient(address string, version string) (ports.Client, error) {
+	clientMapMutex.Lock()
+	defer clientMapMutex.Unlock()
+
+	if clientMap == nil {
+		clientMap = make(map[string]ports.Client)
+	}
+
+	client, ok := clientMap[version]
+	if ok {
+		return client, nil
+	}
+
+	switch version {
+	case "v1":
+		innerClient, err := dpsv1.NewClient(address)
+		if err != nil {
+			return nil, err
+		}
+
+		client = innerClient
+	default:
+		return nil, errors.New("不支持的版本")
+	}
+
+	clientMap[version] = client
+
+	return client, nil
+}
+
+func DestroyClient(version string) error {
+	clientMapMutex.Lock()
+	defer clientMapMutex.Unlock()
+
+	client, ok := clientMap[version]
+	if !ok {
+		return nil
+	}
+
+	switch version {
+	case "v1":
+		return dpsv1.DestroyClient(client.(*dpsv1.Client))
+	default:
+		return nil
+	}
+}

+ 68 - 0
dpsv1/client.go

@@ -0,0 +1,68 @@
+package dpsv1
+
+import (
+	"context"
+	"encoding/json"
+	"git.sxidc.com/service-supports/dps-sdk/pb/v1"
+	"git.sxidc.com/service-supports/dps-sdk/pb/v1/request"
+	"git.sxidc.com/service-supports/dps-sdk/ports"
+	"google.golang.org/grpc"
+	"google.golang.org/grpc/credentials/insecure"
+)
+
+type Client struct {
+	conn                 *grpc.ClientConn
+	commandServiceClient v1.CommandServiceClient
+	queryServiceClient   v1.QueryServiceClient
+}
+
+func NewClient(address string) (*Client, error) {
+	conn, err := grpc.DialContext(context.Background(), address,
+		grpc.WithTransportCredentials(insecure.NewCredentials()))
+	if err != nil {
+		return nil, err
+	}
+
+	return &Client{
+		conn:                 conn,
+		commandServiceClient: v1.NewCommandServiceClient(conn),
+		queryServiceClient:   v1.NewQueryServiceClient(conn),
+	}, nil
+}
+
+func DestroyClient(client *Client) error {
+	if client == nil {
+		return nil
+	}
+
+	err := client.conn.Close()
+	if err != nil {
+		return err
+	}
+
+	client.conn = nil
+	client.commandServiceClient = nil
+	client.queryServiceClient = nil
+	client = nil
+
+	return nil
+}
+
+func (c *Client) AutoMigrate(req *ports.AutoMigrateRequest) error {
+	modelJsonByte, err := json.Marshal(req.Model)
+	if err != nil {
+		return err
+	}
+
+	_, err = c.commandServiceClient.AutoMigrate(context.Background(), &request.AutoMigrateRequest{
+		DatabaseID:            req.DatabaseID,
+		TablePrefixWithSchema: req.TablePrefixWithSchema,
+		Version:               req.Version,
+		Model:                 modelJsonByte,
+	})
+	if err != nil {
+		return err
+	}
+
+	return nil
+}

+ 9 - 0
dpsv1/request.go

@@ -0,0 +1,9 @@
+package dpsv1
+
+type AutoMigrateRequest struct {
+	DatabaseID  string
+	Schema      string
+	TablePrefix string
+	Version     string
+	Model       []byte
+}

+ 17 - 0
go.mod

@@ -1,3 +1,20 @@
 module git.sxidc.com/service-supports/dps-sdk
 
 go 1.21.3
+
+require (
+	github.com/golang/protobuf v1.5.3
+	github.com/mwitkow/go-proto-validators v0.3.2
+	github.com/satori/go.uuid v1.2.0
+	google.golang.org/grpc v1.60.1
+	google.golang.org/protobuf v1.32.0
+)
+
+require (
+	github.com/gogo/protobuf v1.3.0 // indirect
+	golang.org/x/net v0.16.0 // indirect
+	golang.org/x/sys v0.13.0 // indirect
+	golang.org/x/text v0.13.0 // indirect
+	google.golang.org/genproto/googleapis/rpc v0.0.0-20231002182017-d307bd883b97 // indirect
+	gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect
+)

+ 42 - 0
go.sum

@@ -0,0 +1,42 @@
+github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
+github.com/gogo/protobuf v1.3.0 h1:G8O7TerXerS4F6sx9OV7/nRfJdnXgHZu/S/7F2SN+UE=
+github.com/gogo/protobuf v1.3.0/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o=
+github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
+github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk=
+github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg=
+github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY=
+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/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00=
+github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck=
+github.com/kr/pretty v0.2.1 h1:Fmg33tUaq4/8ym9TJN1x7sLJnHVwhP33CNkpYV/7rwI=
+github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI=
+github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
+github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE=
+github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
+github.com/mwitkow/go-proto-validators v0.3.2 h1:qRlmpTzm2pstMKKzTdvwPCF5QfBNURSlAgN/R+qbKos=
+github.com/mwitkow/go-proto-validators v0.3.2/go.mod h1:ej0Qp0qMgHN/KtDyUt+Q1/tA7a5VarXUOUxD+oeD30w=
+github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
+github.com/satori/go.uuid v1.2.0 h1:0uYX9dsZ2yD7q2RtLRtPSdGDWzjeM3TbMJP9utgA0ww=
+github.com/satori/go.uuid v1.2.0/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0=
+github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
+github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
+golang.org/x/net v0.16.0 h1:7eBu7KsSvFDtSXUIDbh3aqlK4DPsZ1rByC8PFfBThos=
+golang.org/x/net v0.16.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE=
+golang.org/x/sys v0.13.0 h1:Af8nKPmuFypiUBjVoU9V20FiaFXOcuZI21p0ycVYYGE=
+golang.org/x/sys v0.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
+golang.org/x/text v0.13.0 h1:ablQoSUd0tRdKxZewP80B+BaqeKJuVhuRxj/dkrun3k=
+golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE=
+golang.org/x/tools v0.0.0-20181030221726-6c7e314b6563/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
+golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
+google.golang.org/genproto/googleapis/rpc v0.0.0-20231002182017-d307bd883b97 h1:6GQBEOdGkX6MMTLT9V+TjtIRZCw9VPD5Z+yHY9wMgS0=
+google.golang.org/genproto/googleapis/rpc v0.0.0-20231002182017-d307bd883b97/go.mod h1:v7nGkzlmW8P3n/bKmWBn2WpBjpOEx8Q6gMueudAmKfY=
+google.golang.org/grpc v1.60.1 h1:26+wFr+cNqSGFcOXcabYC0lUVJVRa2Sb2ortSK7VrEU=
+google.golang.org/grpc v1.60.1/go.mod h1:OlCHIeLYqSSsLi6i49B5QGdzaMZK9+M7LXN2FKz4eGM=
+google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw=
+google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
+google.golang.org/protobuf v1.32.0 h1:pPC6BG5ex8PDFnkbrGU3EixyhKcQ2aDuBS36lqK/C7I=
+google.golang.org/protobuf v1.32.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos=
+gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk=
+gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q=

+ 120 - 0
pb/v1/command.pb.go

@@ -0,0 +1,120 @@
+// Code generated by protoc-gen-go. DO NOT EDIT.
+// versions:
+// 	protoc-gen-go v1.28.1
+// 	protoc        v3.12.4
+// source: v1/command.proto
+
+package v1
+
+import (
+	request "git.sxidc.com/service-supports/dps-sdk/pb/v1/request"
+	response "git.sxidc.com/service-supports/dps-sdk/pb/v1/response"
+	empty "github.com/golang/protobuf/ptypes/empty"
+	protoreflect "google.golang.org/protobuf/reflect/protoreflect"
+	protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+	reflect "reflect"
+)
+
+const (
+	// Verify that this generated code is sufficiently up-to-date.
+	_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
+	// Verify that runtime/protoimpl is sufficiently up-to-date.
+	_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
+)
+
+var File_v1_command_proto protoreflect.FileDescriptor
+
+var file_v1_command_proto_rawDesc = []byte{
+	0x0a, 0x10, 0x76, 0x31, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x2e, 0x70, 0x72, 0x6f,
+	0x74, 0x6f, 0x12, 0x02, 0x76, 0x31, 0x1a, 0x18, 0x76, 0x31, 0x2f, 0x72, 0x65, 0x71, 0x75, 0x65,
+	0x73, 0x74, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
+	0x1a, 0x19, 0x76, 0x31, 0x2f, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2f, 0x63, 0x6f,
+	0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1b, 0x67, 0x6f, 0x6f,
+	0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x65, 0x6d, 0x70,
+	0x74, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x32, 0xce, 0x03, 0x0a, 0x0e, 0x43, 0x6f, 0x6d,
+	0x6d, 0x61, 0x6e, 0x64, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x44, 0x0a, 0x0b, 0x41,
+	0x75, 0x74, 0x6f, 0x4d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x65, 0x12, 0x1b, 0x2e, 0x72, 0x65, 0x71,
+	0x75, 0x65, 0x73, 0x74, 0x2e, 0x41, 0x75, 0x74, 0x6f, 0x4d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x65,
+	0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65,
+	0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22,
+	0x00, 0x12, 0x56, 0x0a, 0x0b, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e,
+	0x12, 0x1d, 0x2e, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73,
+	0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x1a,
+	0x22, 0x2e, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x61,
+	0x6e, 0x64, 0x53, 0x74, 0x61, 0x74, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f,
+	0x6e, 0x73, 0x65, 0x22, 0x00, 0x28, 0x01, 0x30, 0x01, 0x12, 0x46, 0x0a, 0x06, 0x49, 0x6e, 0x73,
+	0x65, 0x72, 0x74, 0x12, 0x16, 0x2e, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x49, 0x6e,
+	0x73, 0x65, 0x72, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x72, 0x65,
+	0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x53, 0x74,
+	0x61, 0x74, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22,
+	0x00, 0x12, 0x46, 0x0a, 0x06, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x12, 0x16, 0x2e, 0x72, 0x65,
+	0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75,
+	0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x43,
+	0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x53, 0x74, 0x61, 0x74, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x52,
+	0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x46, 0x0a, 0x06, 0x55, 0x70, 0x64,
+	0x61, 0x74, 0x65, 0x12, 0x16, 0x2e, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x55, 0x70,
+	0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x72, 0x65,
+	0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x53, 0x74,
+	0x61, 0x74, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22,
+	0x00, 0x12, 0x46, 0x0a, 0x06, 0x52, 0x65, 0x70, 0x6c, 0x61, 0x79, 0x12, 0x16, 0x2e, 0x72, 0x65,
+	0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x52, 0x65, 0x70, 0x6c, 0x61, 0x79, 0x52, 0x65, 0x71, 0x75,
+	0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x43,
+	0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x53, 0x74, 0x61, 0x74, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x52,
+	0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0x18, 0x5a, 0x16, 0x64, 0x70, 0x73,
+	0x2f, 0x61, 0x70, 0x69, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x5f, 0x61, 0x70, 0x69, 0x2f, 0x70, 0x62,
+	0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
+}
+
+var file_v1_command_proto_goTypes = []interface{}{
+	(*request.AutoMigrateRequest)(nil),        // 0: request.AutoMigrateRequest
+	(*request.TransactionOperation)(nil),      // 1: request.TransactionOperation
+	(*request.InsertRequest)(nil),             // 2: request.InsertRequest
+	(*request.DeleteRequest)(nil),             // 3: request.DeleteRequest
+	(*request.UpdateRequest)(nil),             // 4: request.UpdateRequest
+	(*request.ReplayRequest)(nil),             // 5: request.ReplayRequest
+	(*empty.Empty)(nil),                       // 6: google.protobuf.Empty
+	(*response.CommandStatementResponse)(nil), // 7: response.CommandStatementResponse
+}
+var file_v1_command_proto_depIdxs = []int32{
+	0, // 0: v1.CommandService.AutoMigrate:input_type -> request.AutoMigrateRequest
+	1, // 1: v1.CommandService.Transaction:input_type -> request.TransactionOperation
+	2, // 2: v1.CommandService.Insert:input_type -> request.InsertRequest
+	3, // 3: v1.CommandService.Delete:input_type -> request.DeleteRequest
+	4, // 4: v1.CommandService.Update:input_type -> request.UpdateRequest
+	5, // 5: v1.CommandService.Replay:input_type -> request.ReplayRequest
+	6, // 6: v1.CommandService.AutoMigrate:output_type -> google.protobuf.Empty
+	7, // 7: v1.CommandService.Transaction:output_type -> response.CommandStatementResponse
+	7, // 8: v1.CommandService.Insert:output_type -> response.CommandStatementResponse
+	7, // 9: v1.CommandService.Delete:output_type -> response.CommandStatementResponse
+	7, // 10: v1.CommandService.Update:output_type -> response.CommandStatementResponse
+	7, // 11: v1.CommandService.Replay:output_type -> response.CommandStatementResponse
+	6, // [6:12] is the sub-list for method output_type
+	0, // [0:6] is the sub-list for method input_type
+	0, // [0:0] is the sub-list for extension type_name
+	0, // [0:0] is the sub-list for extension extendee
+	0, // [0:0] is the sub-list for field type_name
+}
+
+func init() { file_v1_command_proto_init() }
+func file_v1_command_proto_init() {
+	if File_v1_command_proto != nil {
+		return
+	}
+	type x struct{}
+	out := protoimpl.TypeBuilder{
+		File: protoimpl.DescBuilder{
+			GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
+			RawDescriptor: file_v1_command_proto_rawDesc,
+			NumEnums:      0,
+			NumMessages:   0,
+			NumExtensions: 0,
+			NumServices:   1,
+		},
+		GoTypes:           file_v1_command_proto_goTypes,
+		DependencyIndexes: file_v1_command_proto_depIdxs,
+	}.Build()
+	File_v1_command_proto = out.File
+	file_v1_command_proto_rawDesc = nil
+	file_v1_command_proto_goTypes = nil
+	file_v1_command_proto_depIdxs = nil
+}

+ 321 - 0
pb/v1/command_grpc.pb.go

@@ -0,0 +1,321 @@
+// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
+// versions:
+// - protoc-gen-go-grpc v1.2.0
+// - protoc             v3.12.4
+// source: v1/command.proto
+
+package v1
+
+import (
+	context "context"
+	request "git.sxidc.com/service-supports/dps-sdk/pb/v1/request"
+	response "git.sxidc.com/service-supports/dps-sdk/pb/v1/response"
+	empty "github.com/golang/protobuf/ptypes/empty"
+	grpc "google.golang.org/grpc"
+	codes "google.golang.org/grpc/codes"
+	status "google.golang.org/grpc/status"
+)
+
+// This is a compile-time assertion to ensure that this generated file
+// is compatible with the grpc package it is being compiled against.
+// Requires gRPC-Go v1.32.0 or later.
+const _ = grpc.SupportPackageIsVersion7
+
+// CommandServiceClient is the client API for CommandService service.
+//
+// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
+type CommandServiceClient interface {
+	AutoMigrate(ctx context.Context, in *request.AutoMigrateRequest, opts ...grpc.CallOption) (*empty.Empty, error)
+	Transaction(ctx context.Context, opts ...grpc.CallOption) (CommandService_TransactionClient, error)
+	Insert(ctx context.Context, in *request.InsertRequest, opts ...grpc.CallOption) (*response.CommandStatementResponse, error)
+	Delete(ctx context.Context, in *request.DeleteRequest, opts ...grpc.CallOption) (*response.CommandStatementResponse, error)
+	Update(ctx context.Context, in *request.UpdateRequest, opts ...grpc.CallOption) (*response.CommandStatementResponse, error)
+	Replay(ctx context.Context, in *request.ReplayRequest, opts ...grpc.CallOption) (*response.CommandStatementResponse, error)
+}
+
+type commandServiceClient struct {
+	cc grpc.ClientConnInterface
+}
+
+func NewCommandServiceClient(cc grpc.ClientConnInterface) CommandServiceClient {
+	return &commandServiceClient{cc}
+}
+
+func (c *commandServiceClient) AutoMigrate(ctx context.Context, in *request.AutoMigrateRequest, opts ...grpc.CallOption) (*empty.Empty, error) {
+	out := new(empty.Empty)
+	err := c.cc.Invoke(ctx, "/v1.CommandService/AutoMigrate", in, out, opts...)
+	if err != nil {
+		return nil, err
+	}
+	return out, nil
+}
+
+func (c *commandServiceClient) Transaction(ctx context.Context, opts ...grpc.CallOption) (CommandService_TransactionClient, error) {
+	stream, err := c.cc.NewStream(ctx, &CommandService_ServiceDesc.Streams[0], "/v1.CommandService/Transaction", opts...)
+	if err != nil {
+		return nil, err
+	}
+	x := &commandServiceTransactionClient{stream}
+	return x, nil
+}
+
+type CommandService_TransactionClient interface {
+	Send(*request.TransactionOperation) error
+	Recv() (*response.CommandStatementResponse, error)
+	grpc.ClientStream
+}
+
+type commandServiceTransactionClient struct {
+	grpc.ClientStream
+}
+
+func (x *commandServiceTransactionClient) Send(m *request.TransactionOperation) error {
+	return x.ClientStream.SendMsg(m)
+}
+
+func (x *commandServiceTransactionClient) Recv() (*response.CommandStatementResponse, error) {
+	m := new(response.CommandStatementResponse)
+	if err := x.ClientStream.RecvMsg(m); err != nil {
+		return nil, err
+	}
+	return m, nil
+}
+
+func (c *commandServiceClient) Insert(ctx context.Context, in *request.InsertRequest, opts ...grpc.CallOption) (*response.CommandStatementResponse, error) {
+	out := new(response.CommandStatementResponse)
+	err := c.cc.Invoke(ctx, "/v1.CommandService/Insert", in, out, opts...)
+	if err != nil {
+		return nil, err
+	}
+	return out, nil
+}
+
+func (c *commandServiceClient) Delete(ctx context.Context, in *request.DeleteRequest, opts ...grpc.CallOption) (*response.CommandStatementResponse, error) {
+	out := new(response.CommandStatementResponse)
+	err := c.cc.Invoke(ctx, "/v1.CommandService/Delete", in, out, opts...)
+	if err != nil {
+		return nil, err
+	}
+	return out, nil
+}
+
+func (c *commandServiceClient) Update(ctx context.Context, in *request.UpdateRequest, opts ...grpc.CallOption) (*response.CommandStatementResponse, error) {
+	out := new(response.CommandStatementResponse)
+	err := c.cc.Invoke(ctx, "/v1.CommandService/Update", in, out, opts...)
+	if err != nil {
+		return nil, err
+	}
+	return out, nil
+}
+
+func (c *commandServiceClient) Replay(ctx context.Context, in *request.ReplayRequest, opts ...grpc.CallOption) (*response.CommandStatementResponse, error) {
+	out := new(response.CommandStatementResponse)
+	err := c.cc.Invoke(ctx, "/v1.CommandService/Replay", in, out, opts...)
+	if err != nil {
+		return nil, err
+	}
+	return out, nil
+}
+
+// CommandServiceServer is the server API for CommandService service.
+// All implementations must embed UnimplementedCommandServiceServer
+// for forward compatibility
+type CommandServiceServer interface {
+	AutoMigrate(context.Context, *request.AutoMigrateRequest) (*empty.Empty, error)
+	Transaction(CommandService_TransactionServer) error
+	Insert(context.Context, *request.InsertRequest) (*response.CommandStatementResponse, error)
+	Delete(context.Context, *request.DeleteRequest) (*response.CommandStatementResponse, error)
+	Update(context.Context, *request.UpdateRequest) (*response.CommandStatementResponse, error)
+	Replay(context.Context, *request.ReplayRequest) (*response.CommandStatementResponse, error)
+	mustEmbedUnimplementedCommandServiceServer()
+}
+
+// UnimplementedCommandServiceServer must be embedded to have forward compatible implementations.
+type UnimplementedCommandServiceServer struct {
+}
+
+func (UnimplementedCommandServiceServer) AutoMigrate(context.Context, *request.AutoMigrateRequest) (*empty.Empty, error) {
+	return nil, status.Errorf(codes.Unimplemented, "method AutoMigrate not implemented")
+}
+func (UnimplementedCommandServiceServer) Transaction(CommandService_TransactionServer) error {
+	return status.Errorf(codes.Unimplemented, "method Transaction not implemented")
+}
+func (UnimplementedCommandServiceServer) Insert(context.Context, *request.InsertRequest) (*response.CommandStatementResponse, error) {
+	return nil, status.Errorf(codes.Unimplemented, "method Insert not implemented")
+}
+func (UnimplementedCommandServiceServer) Delete(context.Context, *request.DeleteRequest) (*response.CommandStatementResponse, error) {
+	return nil, status.Errorf(codes.Unimplemented, "method Delete not implemented")
+}
+func (UnimplementedCommandServiceServer) Update(context.Context, *request.UpdateRequest) (*response.CommandStatementResponse, error) {
+	return nil, status.Errorf(codes.Unimplemented, "method Update not implemented")
+}
+func (UnimplementedCommandServiceServer) Replay(context.Context, *request.ReplayRequest) (*response.CommandStatementResponse, error) {
+	return nil, status.Errorf(codes.Unimplemented, "method Replay not implemented")
+}
+func (UnimplementedCommandServiceServer) mustEmbedUnimplementedCommandServiceServer() {}
+
+// UnsafeCommandServiceServer may be embedded to opt out of forward compatibility for this service.
+// Use of this interface is not recommended, as added methods to CommandServiceServer will
+// result in compilation errors.
+type UnsafeCommandServiceServer interface {
+	mustEmbedUnimplementedCommandServiceServer()
+}
+
+func RegisterCommandServiceServer(s grpc.ServiceRegistrar, srv CommandServiceServer) {
+	s.RegisterService(&CommandService_ServiceDesc, srv)
+}
+
+func _CommandService_AutoMigrate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+	in := new(request.AutoMigrateRequest)
+	if err := dec(in); err != nil {
+		return nil, err
+	}
+	if interceptor == nil {
+		return srv.(CommandServiceServer).AutoMigrate(ctx, in)
+	}
+	info := &grpc.UnaryServerInfo{
+		Server:     srv,
+		FullMethod: "/v1.CommandService/AutoMigrate",
+	}
+	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+		return srv.(CommandServiceServer).AutoMigrate(ctx, req.(*request.AutoMigrateRequest))
+	}
+	return interceptor(ctx, in, info, handler)
+}
+
+func _CommandService_Transaction_Handler(srv interface{}, stream grpc.ServerStream) error {
+	return srv.(CommandServiceServer).Transaction(&commandServiceTransactionServer{stream})
+}
+
+type CommandService_TransactionServer interface {
+	Send(*response.CommandStatementResponse) error
+	Recv() (*request.TransactionOperation, error)
+	grpc.ServerStream
+}
+
+type commandServiceTransactionServer struct {
+	grpc.ServerStream
+}
+
+func (x *commandServiceTransactionServer) Send(m *response.CommandStatementResponse) error {
+	return x.ServerStream.SendMsg(m)
+}
+
+func (x *commandServiceTransactionServer) Recv() (*request.TransactionOperation, error) {
+	m := new(request.TransactionOperation)
+	if err := x.ServerStream.RecvMsg(m); err != nil {
+		return nil, err
+	}
+	return m, nil
+}
+
+func _CommandService_Insert_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+	in := new(request.InsertRequest)
+	if err := dec(in); err != nil {
+		return nil, err
+	}
+	if interceptor == nil {
+		return srv.(CommandServiceServer).Insert(ctx, in)
+	}
+	info := &grpc.UnaryServerInfo{
+		Server:     srv,
+		FullMethod: "/v1.CommandService/Insert",
+	}
+	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+		return srv.(CommandServiceServer).Insert(ctx, req.(*request.InsertRequest))
+	}
+	return interceptor(ctx, in, info, handler)
+}
+
+func _CommandService_Delete_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+	in := new(request.DeleteRequest)
+	if err := dec(in); err != nil {
+		return nil, err
+	}
+	if interceptor == nil {
+		return srv.(CommandServiceServer).Delete(ctx, in)
+	}
+	info := &grpc.UnaryServerInfo{
+		Server:     srv,
+		FullMethod: "/v1.CommandService/Delete",
+	}
+	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+		return srv.(CommandServiceServer).Delete(ctx, req.(*request.DeleteRequest))
+	}
+	return interceptor(ctx, in, info, handler)
+}
+
+func _CommandService_Update_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+	in := new(request.UpdateRequest)
+	if err := dec(in); err != nil {
+		return nil, err
+	}
+	if interceptor == nil {
+		return srv.(CommandServiceServer).Update(ctx, in)
+	}
+	info := &grpc.UnaryServerInfo{
+		Server:     srv,
+		FullMethod: "/v1.CommandService/Update",
+	}
+	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+		return srv.(CommandServiceServer).Update(ctx, req.(*request.UpdateRequest))
+	}
+	return interceptor(ctx, in, info, handler)
+}
+
+func _CommandService_Replay_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+	in := new(request.ReplayRequest)
+	if err := dec(in); err != nil {
+		return nil, err
+	}
+	if interceptor == nil {
+		return srv.(CommandServiceServer).Replay(ctx, in)
+	}
+	info := &grpc.UnaryServerInfo{
+		Server:     srv,
+		FullMethod: "/v1.CommandService/Replay",
+	}
+	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+		return srv.(CommandServiceServer).Replay(ctx, req.(*request.ReplayRequest))
+	}
+	return interceptor(ctx, in, info, handler)
+}
+
+// CommandService_ServiceDesc is the grpc.ServiceDesc for CommandService service.
+// It's only intended for direct use with grpc.RegisterService,
+// and not to be introspected or modified (even as a copy)
+var CommandService_ServiceDesc = grpc.ServiceDesc{
+	ServiceName: "v1.CommandService",
+	HandlerType: (*CommandServiceServer)(nil),
+	Methods: []grpc.MethodDesc{
+		{
+			MethodName: "AutoMigrate",
+			Handler:    _CommandService_AutoMigrate_Handler,
+		},
+		{
+			MethodName: "Insert",
+			Handler:    _CommandService_Insert_Handler,
+		},
+		{
+			MethodName: "Delete",
+			Handler:    _CommandService_Delete_Handler,
+		},
+		{
+			MethodName: "Update",
+			Handler:    _CommandService_Update_Handler,
+		},
+		{
+			MethodName: "Replay",
+			Handler:    _CommandService_Replay_Handler,
+		},
+	},
+	Streams: []grpc.StreamDesc{
+		{
+			StreamName:    "Transaction",
+			Handler:       _CommandService_Transaction_Handler,
+			ServerStreams: true,
+			ClientStreams: true,
+		},
+	},
+	Metadata: "v1/command.proto",
+}

+ 119 - 0
pb/v1/query.pb.go

@@ -0,0 +1,119 @@
+// Code generated by protoc-gen-go. DO NOT EDIT.
+// versions:
+// 	protoc-gen-go v1.28.1
+// 	protoc        v3.12.4
+// source: v1/query.proto
+
+package v1
+
+import (
+	request "git.sxidc.com/service-supports/dps-sdk/pb/v1/request"
+	response "git.sxidc.com/service-supports/dps-sdk/pb/v1/response"
+	protoreflect "google.golang.org/protobuf/reflect/protoreflect"
+	protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+	reflect "reflect"
+)
+
+const (
+	// Verify that this generated code is sufficiently up-to-date.
+	_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
+	// Verify that runtime/protoimpl is sufficiently up-to-date.
+	_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
+)
+
+var File_v1_query_proto protoreflect.FileDescriptor
+
+var file_v1_query_proto_rawDesc = []byte{
+	0x0a, 0x0e, 0x76, 0x31, 0x2f, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
+	0x12, 0x02, 0x76, 0x31, 0x1a, 0x16, 0x76, 0x31, 0x2f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
+	0x2f, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x31,
+	0x2f, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2f, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e,
+	0x70, 0x72, 0x6f, 0x74, 0x6f, 0x32, 0xe4, 0x03, 0x0a, 0x0c, 0x51, 0x75, 0x65, 0x72, 0x79, 0x53,
+	0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x5b, 0x0a, 0x16, 0x51, 0x75, 0x65, 0x72, 0x79, 0x42,
+	0x79, 0x57, 0x68, 0x65, 0x72, 0x65, 0x41, 0x6e, 0x64, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x42, 0x79,
+	0x12, 0x26, 0x2e, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79,
+	0x42, 0x79, 0x57, 0x68, 0x65, 0x72, 0x65, 0x41, 0x6e, 0x64, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x42,
+	0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x72, 0x65, 0x73, 0x70, 0x6f,
+	0x6e, 0x73, 0x65, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
+	0x65, 0x22, 0x00, 0x12, 0x45, 0x0a, 0x0b, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x51, 0x75, 0x65,
+	0x72, 0x79, 0x12, 0x1b, 0x2e, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x43, 0x6f, 0x6d,
+	0x6d, 0x6f, 0x6e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a,
+	0x17, 0x2e, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79,
+	0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x4b, 0x0a, 0x0b, 0x51, 0x75,
+	0x65, 0x72, 0x79, 0x42, 0x79, 0x4b, 0x65, 0x79, 0x73, 0x12, 0x1b, 0x2e, 0x72, 0x65, 0x71, 0x75,
+	0x65, 0x73, 0x74, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x42, 0x79, 0x4b, 0x65, 0x79, 0x73, 0x52,
+	0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
+	0x65, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x42, 0x79, 0x4b, 0x65, 0x79, 0x73, 0x52, 0x65, 0x73,
+	0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x57, 0x0a, 0x11, 0x43, 0x6f, 0x6d, 0x6d, 0x6f,
+	0x6e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x42, 0x79, 0x4b, 0x65, 0x79, 0x73, 0x12, 0x21, 0x2e, 0x72,
+	0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x51, 0x75, 0x65,
+	0x72, 0x79, 0x42, 0x79, 0x4b, 0x65, 0x79, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a,
+	0x1d, 0x2e, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79,
+	0x42, 0x79, 0x4b, 0x65, 0x79, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00,
+	0x12, 0x43, 0x0a, 0x0a, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x57, 0x68, 0x65, 0x72, 0x65, 0x12, 0x1a,
+	0x2e, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x57, 0x68,
+	0x65, 0x72, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x72, 0x65, 0x73,
+	0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f,
+	0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x45, 0x0a, 0x0b, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x43,
+	0x6f, 0x75, 0x6e, 0x74, 0x12, 0x1b, 0x2e, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x43,
+	0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
+	0x74, 0x1a, 0x17, 0x2e, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x43, 0x6f, 0x75,
+	0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0x18, 0x5a, 0x16,
+	0x64, 0x70, 0x73, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x5f, 0x61, 0x70, 0x69,
+	0x2f, 0x70, 0x62, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
+}
+
+var file_v1_query_proto_goTypes = []interface{}{
+	(*request.QueryByWhereAndOrderByRequest)(nil), // 0: request.QueryByWhereAndOrderByRequest
+	(*request.CommonQueryRequest)(nil),            // 1: request.CommonQueryRequest
+	(*request.QueryByKeysRequest)(nil),            // 2: request.QueryByKeysRequest
+	(*request.CommonQueryByKeysRequest)(nil),      // 3: request.CommonQueryByKeysRequest
+	(*request.CountWhereRequest)(nil),             // 4: request.CountWhereRequest
+	(*request.CommonCountRequest)(nil),            // 5: request.CommonCountRequest
+	(*response.QueryResponse)(nil),                // 6: response.QueryResponse
+	(*response.QueryByKeysResponse)(nil),          // 7: response.QueryByKeysResponse
+	(*response.CountResponse)(nil),                // 8: response.CountResponse
+}
+var file_v1_query_proto_depIdxs = []int32{
+	0, // 0: v1.QueryService.QueryByWhereAndOrderBy:input_type -> request.QueryByWhereAndOrderByRequest
+	1, // 1: v1.QueryService.CommonQuery:input_type -> request.CommonQueryRequest
+	2, // 2: v1.QueryService.QueryByKeys:input_type -> request.QueryByKeysRequest
+	3, // 3: v1.QueryService.CommonQueryByKeys:input_type -> request.CommonQueryByKeysRequest
+	4, // 4: v1.QueryService.CountWhere:input_type -> request.CountWhereRequest
+	5, // 5: v1.QueryService.CommonCount:input_type -> request.CommonCountRequest
+	6, // 6: v1.QueryService.QueryByWhereAndOrderBy:output_type -> response.QueryResponse
+	6, // 7: v1.QueryService.CommonQuery:output_type -> response.QueryResponse
+	7, // 8: v1.QueryService.QueryByKeys:output_type -> response.QueryByKeysResponse
+	7, // 9: v1.QueryService.CommonQueryByKeys:output_type -> response.QueryByKeysResponse
+	8, // 10: v1.QueryService.CountWhere:output_type -> response.CountResponse
+	8, // 11: v1.QueryService.CommonCount:output_type -> response.CountResponse
+	6, // [6:12] is the sub-list for method output_type
+	0, // [0:6] is the sub-list for method input_type
+	0, // [0:0] is the sub-list for extension type_name
+	0, // [0:0] is the sub-list for extension extendee
+	0, // [0:0] is the sub-list for field type_name
+}
+
+func init() { file_v1_query_proto_init() }
+func file_v1_query_proto_init() {
+	if File_v1_query_proto != nil {
+		return
+	}
+	type x struct{}
+	out := protoimpl.TypeBuilder{
+		File: protoimpl.DescBuilder{
+			GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
+			RawDescriptor: file_v1_query_proto_rawDesc,
+			NumEnums:      0,
+			NumMessages:   0,
+			NumExtensions: 0,
+			NumServices:   1,
+		},
+		GoTypes:           file_v1_query_proto_goTypes,
+		DependencyIndexes: file_v1_query_proto_depIdxs,
+	}.Build()
+	File_v1_query_proto = out.File
+	file_v1_query_proto_rawDesc = nil
+	file_v1_query_proto_goTypes = nil
+	file_v1_query_proto_depIdxs = nil
+}

+ 287 - 0
pb/v1/query_grpc.pb.go

@@ -0,0 +1,287 @@
+// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
+// versions:
+// - protoc-gen-go-grpc v1.2.0
+// - protoc             v3.12.4
+// source: v1/query.proto
+
+package v1
+
+import (
+	context "context"
+	request "git.sxidc.com/service-supports/dps-sdk/pb/v1/request"
+	response "git.sxidc.com/service-supports/dps-sdk/pb/v1/response"
+	grpc "google.golang.org/grpc"
+	codes "google.golang.org/grpc/codes"
+	status "google.golang.org/grpc/status"
+)
+
+// This is a compile-time assertion to ensure that this generated file
+// is compatible with the grpc package it is being compiled against.
+// Requires gRPC-Go v1.32.0 or later.
+const _ = grpc.SupportPackageIsVersion7
+
+// QueryServiceClient is the client API for QueryService service.
+//
+// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
+type QueryServiceClient interface {
+	QueryByWhereAndOrderBy(ctx context.Context, in *request.QueryByWhereAndOrderByRequest, opts ...grpc.CallOption) (*response.QueryResponse, error)
+	CommonQuery(ctx context.Context, in *request.CommonQueryRequest, opts ...grpc.CallOption) (*response.QueryResponse, error)
+	QueryByKeys(ctx context.Context, in *request.QueryByKeysRequest, opts ...grpc.CallOption) (*response.QueryByKeysResponse, error)
+	CommonQueryByKeys(ctx context.Context, in *request.CommonQueryByKeysRequest, opts ...grpc.CallOption) (*response.QueryByKeysResponse, error)
+	CountWhere(ctx context.Context, in *request.CountWhereRequest, opts ...grpc.CallOption) (*response.CountResponse, error)
+	CommonCount(ctx context.Context, in *request.CommonCountRequest, opts ...grpc.CallOption) (*response.CountResponse, error)
+}
+
+type queryServiceClient struct {
+	cc grpc.ClientConnInterface
+}
+
+func NewQueryServiceClient(cc grpc.ClientConnInterface) QueryServiceClient {
+	return &queryServiceClient{cc}
+}
+
+func (c *queryServiceClient) QueryByWhereAndOrderBy(ctx context.Context, in *request.QueryByWhereAndOrderByRequest, opts ...grpc.CallOption) (*response.QueryResponse, error) {
+	out := new(response.QueryResponse)
+	err := c.cc.Invoke(ctx, "/v1.QueryService/QueryByWhereAndOrderBy", in, out, opts...)
+	if err != nil {
+		return nil, err
+	}
+	return out, nil
+}
+
+func (c *queryServiceClient) CommonQuery(ctx context.Context, in *request.CommonQueryRequest, opts ...grpc.CallOption) (*response.QueryResponse, error) {
+	out := new(response.QueryResponse)
+	err := c.cc.Invoke(ctx, "/v1.QueryService/CommonQuery", in, out, opts...)
+	if err != nil {
+		return nil, err
+	}
+	return out, nil
+}
+
+func (c *queryServiceClient) QueryByKeys(ctx context.Context, in *request.QueryByKeysRequest, opts ...grpc.CallOption) (*response.QueryByKeysResponse, error) {
+	out := new(response.QueryByKeysResponse)
+	err := c.cc.Invoke(ctx, "/v1.QueryService/QueryByKeys", in, out, opts...)
+	if err != nil {
+		return nil, err
+	}
+	return out, nil
+}
+
+func (c *queryServiceClient) CommonQueryByKeys(ctx context.Context, in *request.CommonQueryByKeysRequest, opts ...grpc.CallOption) (*response.QueryByKeysResponse, error) {
+	out := new(response.QueryByKeysResponse)
+	err := c.cc.Invoke(ctx, "/v1.QueryService/CommonQueryByKeys", in, out, opts...)
+	if err != nil {
+		return nil, err
+	}
+	return out, nil
+}
+
+func (c *queryServiceClient) CountWhere(ctx context.Context, in *request.CountWhereRequest, opts ...grpc.CallOption) (*response.CountResponse, error) {
+	out := new(response.CountResponse)
+	err := c.cc.Invoke(ctx, "/v1.QueryService/CountWhere", in, out, opts...)
+	if err != nil {
+		return nil, err
+	}
+	return out, nil
+}
+
+func (c *queryServiceClient) CommonCount(ctx context.Context, in *request.CommonCountRequest, opts ...grpc.CallOption) (*response.CountResponse, error) {
+	out := new(response.CountResponse)
+	err := c.cc.Invoke(ctx, "/v1.QueryService/CommonCount", in, out, opts...)
+	if err != nil {
+		return nil, err
+	}
+	return out, nil
+}
+
+// QueryServiceServer is the server API for QueryService service.
+// All implementations must embed UnimplementedQueryServiceServer
+// for forward compatibility
+type QueryServiceServer interface {
+	QueryByWhereAndOrderBy(context.Context, *request.QueryByWhereAndOrderByRequest) (*response.QueryResponse, error)
+	CommonQuery(context.Context, *request.CommonQueryRequest) (*response.QueryResponse, error)
+	QueryByKeys(context.Context, *request.QueryByKeysRequest) (*response.QueryByKeysResponse, error)
+	CommonQueryByKeys(context.Context, *request.CommonQueryByKeysRequest) (*response.QueryByKeysResponse, error)
+	CountWhere(context.Context, *request.CountWhereRequest) (*response.CountResponse, error)
+	CommonCount(context.Context, *request.CommonCountRequest) (*response.CountResponse, error)
+	mustEmbedUnimplementedQueryServiceServer()
+}
+
+// UnimplementedQueryServiceServer must be embedded to have forward compatible implementations.
+type UnimplementedQueryServiceServer struct {
+}
+
+func (UnimplementedQueryServiceServer) QueryByWhereAndOrderBy(context.Context, *request.QueryByWhereAndOrderByRequest) (*response.QueryResponse, error) {
+	return nil, status.Errorf(codes.Unimplemented, "method QueryByWhereAndOrderBy not implemented")
+}
+func (UnimplementedQueryServiceServer) CommonQuery(context.Context, *request.CommonQueryRequest) (*response.QueryResponse, error) {
+	return nil, status.Errorf(codes.Unimplemented, "method CommonQuery not implemented")
+}
+func (UnimplementedQueryServiceServer) QueryByKeys(context.Context, *request.QueryByKeysRequest) (*response.QueryByKeysResponse, error) {
+	return nil, status.Errorf(codes.Unimplemented, "method QueryByKeys not implemented")
+}
+func (UnimplementedQueryServiceServer) CommonQueryByKeys(context.Context, *request.CommonQueryByKeysRequest) (*response.QueryByKeysResponse, error) {
+	return nil, status.Errorf(codes.Unimplemented, "method CommonQueryByKeys not implemented")
+}
+func (UnimplementedQueryServiceServer) CountWhere(context.Context, *request.CountWhereRequest) (*response.CountResponse, error) {
+	return nil, status.Errorf(codes.Unimplemented, "method CountWhere not implemented")
+}
+func (UnimplementedQueryServiceServer) CommonCount(context.Context, *request.CommonCountRequest) (*response.CountResponse, error) {
+	return nil, status.Errorf(codes.Unimplemented, "method CommonCount not implemented")
+}
+func (UnimplementedQueryServiceServer) mustEmbedUnimplementedQueryServiceServer() {}
+
+// UnsafeQueryServiceServer may be embedded to opt out of forward compatibility for this service.
+// Use of this interface is not recommended, as added methods to QueryServiceServer will
+// result in compilation errors.
+type UnsafeQueryServiceServer interface {
+	mustEmbedUnimplementedQueryServiceServer()
+}
+
+func RegisterQueryServiceServer(s grpc.ServiceRegistrar, srv QueryServiceServer) {
+	s.RegisterService(&QueryService_ServiceDesc, srv)
+}
+
+func _QueryService_QueryByWhereAndOrderBy_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+	in := new(request.QueryByWhereAndOrderByRequest)
+	if err := dec(in); err != nil {
+		return nil, err
+	}
+	if interceptor == nil {
+		return srv.(QueryServiceServer).QueryByWhereAndOrderBy(ctx, in)
+	}
+	info := &grpc.UnaryServerInfo{
+		Server:     srv,
+		FullMethod: "/v1.QueryService/QueryByWhereAndOrderBy",
+	}
+	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+		return srv.(QueryServiceServer).QueryByWhereAndOrderBy(ctx, req.(*request.QueryByWhereAndOrderByRequest))
+	}
+	return interceptor(ctx, in, info, handler)
+}
+
+func _QueryService_CommonQuery_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+	in := new(request.CommonQueryRequest)
+	if err := dec(in); err != nil {
+		return nil, err
+	}
+	if interceptor == nil {
+		return srv.(QueryServiceServer).CommonQuery(ctx, in)
+	}
+	info := &grpc.UnaryServerInfo{
+		Server:     srv,
+		FullMethod: "/v1.QueryService/CommonQuery",
+	}
+	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+		return srv.(QueryServiceServer).CommonQuery(ctx, req.(*request.CommonQueryRequest))
+	}
+	return interceptor(ctx, in, info, handler)
+}
+
+func _QueryService_QueryByKeys_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+	in := new(request.QueryByKeysRequest)
+	if err := dec(in); err != nil {
+		return nil, err
+	}
+	if interceptor == nil {
+		return srv.(QueryServiceServer).QueryByKeys(ctx, in)
+	}
+	info := &grpc.UnaryServerInfo{
+		Server:     srv,
+		FullMethod: "/v1.QueryService/QueryByKeys",
+	}
+	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+		return srv.(QueryServiceServer).QueryByKeys(ctx, req.(*request.QueryByKeysRequest))
+	}
+	return interceptor(ctx, in, info, handler)
+}
+
+func _QueryService_CommonQueryByKeys_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+	in := new(request.CommonQueryByKeysRequest)
+	if err := dec(in); err != nil {
+		return nil, err
+	}
+	if interceptor == nil {
+		return srv.(QueryServiceServer).CommonQueryByKeys(ctx, in)
+	}
+	info := &grpc.UnaryServerInfo{
+		Server:     srv,
+		FullMethod: "/v1.QueryService/CommonQueryByKeys",
+	}
+	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+		return srv.(QueryServiceServer).CommonQueryByKeys(ctx, req.(*request.CommonQueryByKeysRequest))
+	}
+	return interceptor(ctx, in, info, handler)
+}
+
+func _QueryService_CountWhere_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+	in := new(request.CountWhereRequest)
+	if err := dec(in); err != nil {
+		return nil, err
+	}
+	if interceptor == nil {
+		return srv.(QueryServiceServer).CountWhere(ctx, in)
+	}
+	info := &grpc.UnaryServerInfo{
+		Server:     srv,
+		FullMethod: "/v1.QueryService/CountWhere",
+	}
+	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+		return srv.(QueryServiceServer).CountWhere(ctx, req.(*request.CountWhereRequest))
+	}
+	return interceptor(ctx, in, info, handler)
+}
+
+func _QueryService_CommonCount_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+	in := new(request.CommonCountRequest)
+	if err := dec(in); err != nil {
+		return nil, err
+	}
+	if interceptor == nil {
+		return srv.(QueryServiceServer).CommonCount(ctx, in)
+	}
+	info := &grpc.UnaryServerInfo{
+		Server:     srv,
+		FullMethod: "/v1.QueryService/CommonCount",
+	}
+	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+		return srv.(QueryServiceServer).CommonCount(ctx, req.(*request.CommonCountRequest))
+	}
+	return interceptor(ctx, in, info, handler)
+}
+
+// QueryService_ServiceDesc is the grpc.ServiceDesc for QueryService service.
+// It's only intended for direct use with grpc.RegisterService,
+// and not to be introspected or modified (even as a copy)
+var QueryService_ServiceDesc = grpc.ServiceDesc{
+	ServiceName: "v1.QueryService",
+	HandlerType: (*QueryServiceServer)(nil),
+	Methods: []grpc.MethodDesc{
+		{
+			MethodName: "QueryByWhereAndOrderBy",
+			Handler:    _QueryService_QueryByWhereAndOrderBy_Handler,
+		},
+		{
+			MethodName: "CommonQuery",
+			Handler:    _QueryService_CommonQuery_Handler,
+		},
+		{
+			MethodName: "QueryByKeys",
+			Handler:    _QueryService_QueryByKeys_Handler,
+		},
+		{
+			MethodName: "CommonQueryByKeys",
+			Handler:    _QueryService_CommonQueryByKeys_Handler,
+		},
+		{
+			MethodName: "CountWhere",
+			Handler:    _QueryService_CountWhere_Handler,
+		},
+		{
+			MethodName: "CommonCount",
+			Handler:    _QueryService_CommonCount_Handler,
+		},
+	},
+	Streams:  []grpc.StreamDesc{},
+	Metadata: "v1/query.proto",
+}

+ 930 - 0
pb/v1/request/command.pb.go

@@ -0,0 +1,930 @@
+// Code generated by protoc-gen-go. DO NOT EDIT.
+// versions:
+// 	protoc-gen-go v1.28.1
+// 	protoc        v3.12.4
+// source: v1/request/command.proto
+
+package request
+
+import (
+	_ "github.com/mwitkow/go-proto-validators"
+	protoreflect "google.golang.org/protobuf/reflect/protoreflect"
+	protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+	reflect "reflect"
+	sync "sync"
+)
+
+const (
+	// Verify that this generated code is sufficiently up-to-date.
+	_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
+	// Verify that runtime/protoimpl is sufficiently up-to-date.
+	_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
+)
+
+type AutoMigrateRequest struct {
+	state         protoimpl.MessageState
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
+
+	DatabaseID            string `protobuf:"bytes,1,opt,name=DatabaseID,proto3" json:"DatabaseID,omitempty"`
+	TablePrefixWithSchema string `protobuf:"bytes,2,opt,name=TablePrefixWithSchema,proto3" json:"TablePrefixWithSchema,omitempty"`
+	Version               string `protobuf:"bytes,3,opt,name=Version,proto3" json:"Version,omitempty"`
+	Model                 []byte `protobuf:"bytes,4,opt,name=Model,proto3" json:"Model,omitempty"`
+}
+
+func (x *AutoMigrateRequest) Reset() {
+	*x = AutoMigrateRequest{}
+	if protoimpl.UnsafeEnabled {
+		mi := &file_v1_request_command_proto_msgTypes[0]
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		ms.StoreMessageInfo(mi)
+	}
+}
+
+func (x *AutoMigrateRequest) String() string {
+	return protoimpl.X.MessageStringOf(x)
+}
+
+func (*AutoMigrateRequest) ProtoMessage() {}
+
+func (x *AutoMigrateRequest) ProtoReflect() protoreflect.Message {
+	mi := &file_v1_request_command_proto_msgTypes[0]
+	if protoimpl.UnsafeEnabled && x != nil {
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		if ms.LoadMessageInfo() == nil {
+			ms.StoreMessageInfo(mi)
+		}
+		return ms
+	}
+	return mi.MessageOf(x)
+}
+
+// Deprecated: Use AutoMigrateRequest.ProtoReflect.Descriptor instead.
+func (*AutoMigrateRequest) Descriptor() ([]byte, []int) {
+	return file_v1_request_command_proto_rawDescGZIP(), []int{0}
+}
+
+func (x *AutoMigrateRequest) GetDatabaseID() string {
+	if x != nil {
+		return x.DatabaseID
+	}
+	return ""
+}
+
+func (x *AutoMigrateRequest) GetTablePrefixWithSchema() string {
+	if x != nil {
+		return x.TablePrefixWithSchema
+	}
+	return ""
+}
+
+func (x *AutoMigrateRequest) GetVersion() string {
+	if x != nil {
+		return x.Version
+	}
+	return ""
+}
+
+func (x *AutoMigrateRequest) GetModel() []byte {
+	if x != nil {
+		return x.Model
+	}
+	return nil
+}
+
+type TransactionOperation struct {
+	state         protoimpl.MessageState
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
+
+	// Types that are assignable to Request:
+	//
+	//	*TransactionOperation_TransactionBeginRequest
+	//	*TransactionOperation_InsertRequest
+	//	*TransactionOperation_DeleteRequest
+	//	*TransactionOperation_UpdateRequest
+	//	*TransactionOperation_TransactionEndRequest
+	Request isTransactionOperation_Request `protobuf_oneof:"Request"`
+}
+
+func (x *TransactionOperation) Reset() {
+	*x = TransactionOperation{}
+	if protoimpl.UnsafeEnabled {
+		mi := &file_v1_request_command_proto_msgTypes[1]
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		ms.StoreMessageInfo(mi)
+	}
+}
+
+func (x *TransactionOperation) String() string {
+	return protoimpl.X.MessageStringOf(x)
+}
+
+func (*TransactionOperation) ProtoMessage() {}
+
+func (x *TransactionOperation) ProtoReflect() protoreflect.Message {
+	mi := &file_v1_request_command_proto_msgTypes[1]
+	if protoimpl.UnsafeEnabled && x != nil {
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		if ms.LoadMessageInfo() == nil {
+			ms.StoreMessageInfo(mi)
+		}
+		return ms
+	}
+	return mi.MessageOf(x)
+}
+
+// Deprecated: Use TransactionOperation.ProtoReflect.Descriptor instead.
+func (*TransactionOperation) Descriptor() ([]byte, []int) {
+	return file_v1_request_command_proto_rawDescGZIP(), []int{1}
+}
+
+func (m *TransactionOperation) GetRequest() isTransactionOperation_Request {
+	if m != nil {
+		return m.Request
+	}
+	return nil
+}
+
+func (x *TransactionOperation) GetTransactionBeginRequest() *TransactionBeginRequest {
+	if x, ok := x.GetRequest().(*TransactionOperation_TransactionBeginRequest); ok {
+		return x.TransactionBeginRequest
+	}
+	return nil
+}
+
+func (x *TransactionOperation) GetInsertRequest() *InsertRequest {
+	if x, ok := x.GetRequest().(*TransactionOperation_InsertRequest); ok {
+		return x.InsertRequest
+	}
+	return nil
+}
+
+func (x *TransactionOperation) GetDeleteRequest() *DeleteRequest {
+	if x, ok := x.GetRequest().(*TransactionOperation_DeleteRequest); ok {
+		return x.DeleteRequest
+	}
+	return nil
+}
+
+func (x *TransactionOperation) GetUpdateRequest() *UpdateRequest {
+	if x, ok := x.GetRequest().(*TransactionOperation_UpdateRequest); ok {
+		return x.UpdateRequest
+	}
+	return nil
+}
+
+func (x *TransactionOperation) GetTransactionEndRequest() *TransactionEndRequest {
+	if x, ok := x.GetRequest().(*TransactionOperation_TransactionEndRequest); ok {
+		return x.TransactionEndRequest
+	}
+	return nil
+}
+
+type isTransactionOperation_Request interface {
+	isTransactionOperation_Request()
+}
+
+type TransactionOperation_TransactionBeginRequest struct {
+	TransactionBeginRequest *TransactionBeginRequest `protobuf:"bytes,1,opt,name=TransactionBeginRequest,proto3,oneof"`
+}
+
+type TransactionOperation_InsertRequest struct {
+	InsertRequest *InsertRequest `protobuf:"bytes,2,opt,name=InsertRequest,proto3,oneof"`
+}
+
+type TransactionOperation_DeleteRequest struct {
+	DeleteRequest *DeleteRequest `protobuf:"bytes,3,opt,name=DeleteRequest,proto3,oneof"`
+}
+
+type TransactionOperation_UpdateRequest struct {
+	UpdateRequest *UpdateRequest `protobuf:"bytes,4,opt,name=UpdateRequest,proto3,oneof"`
+}
+
+type TransactionOperation_TransactionEndRequest struct {
+	TransactionEndRequest *TransactionEndRequest `protobuf:"bytes,5,opt,name=TransactionEndRequest,proto3,oneof"`
+}
+
+func (*TransactionOperation_TransactionBeginRequest) isTransactionOperation_Request() {}
+
+func (*TransactionOperation_InsertRequest) isTransactionOperation_Request() {}
+
+func (*TransactionOperation_DeleteRequest) isTransactionOperation_Request() {}
+
+func (*TransactionOperation_UpdateRequest) isTransactionOperation_Request() {}
+
+func (*TransactionOperation_TransactionEndRequest) isTransactionOperation_Request() {}
+
+type InsertRequest struct {
+	state         protoimpl.MessageState
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
+
+	DatabaseID            string `protobuf:"bytes,1,opt,name=DatabaseID,proto3" json:"DatabaseID,omitempty"`
+	TablePrefixWithSchema string `protobuf:"bytes,2,opt,name=TablePrefixWithSchema,proto3" json:"TablePrefixWithSchema,omitempty"`
+	Version               string `protobuf:"bytes,3,opt,name=Version,proto3" json:"Version,omitempty"`
+	Keys                  []byte `protobuf:"bytes,4,opt,name=Keys,proto3" json:"Keys,omitempty"`
+	Models                []byte `protobuf:"bytes,5,opt,name=Models,proto3" json:"Models,omitempty"`
+	UserID                string `protobuf:"bytes,6,opt,name=UserID,proto3" json:"UserID,omitempty"`
+}
+
+func (x *InsertRequest) Reset() {
+	*x = InsertRequest{}
+	if protoimpl.UnsafeEnabled {
+		mi := &file_v1_request_command_proto_msgTypes[2]
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		ms.StoreMessageInfo(mi)
+	}
+}
+
+func (x *InsertRequest) String() string {
+	return protoimpl.X.MessageStringOf(x)
+}
+
+func (*InsertRequest) ProtoMessage() {}
+
+func (x *InsertRequest) ProtoReflect() protoreflect.Message {
+	mi := &file_v1_request_command_proto_msgTypes[2]
+	if protoimpl.UnsafeEnabled && x != nil {
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		if ms.LoadMessageInfo() == nil {
+			ms.StoreMessageInfo(mi)
+		}
+		return ms
+	}
+	return mi.MessageOf(x)
+}
+
+// Deprecated: Use InsertRequest.ProtoReflect.Descriptor instead.
+func (*InsertRequest) Descriptor() ([]byte, []int) {
+	return file_v1_request_command_proto_rawDescGZIP(), []int{2}
+}
+
+func (x *InsertRequest) GetDatabaseID() string {
+	if x != nil {
+		return x.DatabaseID
+	}
+	return ""
+}
+
+func (x *InsertRequest) GetTablePrefixWithSchema() string {
+	if x != nil {
+		return x.TablePrefixWithSchema
+	}
+	return ""
+}
+
+func (x *InsertRequest) GetVersion() string {
+	if x != nil {
+		return x.Version
+	}
+	return ""
+}
+
+func (x *InsertRequest) GetKeys() []byte {
+	if x != nil {
+		return x.Keys
+	}
+	return nil
+}
+
+func (x *InsertRequest) GetModels() []byte {
+	if x != nil {
+		return x.Models
+	}
+	return nil
+}
+
+func (x *InsertRequest) GetUserID() string {
+	if x != nil {
+		return x.UserID
+	}
+	return ""
+}
+
+type DeleteRequest struct {
+	state         protoimpl.MessageState
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
+
+	DatabaseID            string `protobuf:"bytes,1,opt,name=DatabaseID,proto3" json:"DatabaseID,omitempty"`
+	TablePrefixWithSchema string `protobuf:"bytes,2,opt,name=TablePrefixWithSchema,proto3" json:"TablePrefixWithSchema,omitempty"`
+	Version               string `protobuf:"bytes,3,opt,name=Version,proto3" json:"Version,omitempty"`
+	Keys                  []byte `protobuf:"bytes,4,opt,name=Keys,proto3" json:"Keys,omitempty"`
+	Where                 []byte `protobuf:"bytes,5,opt,name=Where,proto3" json:"Where,omitempty"`
+	UserID                string `protobuf:"bytes,6,opt,name=UserID,proto3" json:"UserID,omitempty"`
+}
+
+func (x *DeleteRequest) Reset() {
+	*x = DeleteRequest{}
+	if protoimpl.UnsafeEnabled {
+		mi := &file_v1_request_command_proto_msgTypes[3]
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		ms.StoreMessageInfo(mi)
+	}
+}
+
+func (x *DeleteRequest) String() string {
+	return protoimpl.X.MessageStringOf(x)
+}
+
+func (*DeleteRequest) ProtoMessage() {}
+
+func (x *DeleteRequest) ProtoReflect() protoreflect.Message {
+	mi := &file_v1_request_command_proto_msgTypes[3]
+	if protoimpl.UnsafeEnabled && x != nil {
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		if ms.LoadMessageInfo() == nil {
+			ms.StoreMessageInfo(mi)
+		}
+		return ms
+	}
+	return mi.MessageOf(x)
+}
+
+// Deprecated: Use DeleteRequest.ProtoReflect.Descriptor instead.
+func (*DeleteRequest) Descriptor() ([]byte, []int) {
+	return file_v1_request_command_proto_rawDescGZIP(), []int{3}
+}
+
+func (x *DeleteRequest) GetDatabaseID() string {
+	if x != nil {
+		return x.DatabaseID
+	}
+	return ""
+}
+
+func (x *DeleteRequest) GetTablePrefixWithSchema() string {
+	if x != nil {
+		return x.TablePrefixWithSchema
+	}
+	return ""
+}
+
+func (x *DeleteRequest) GetVersion() string {
+	if x != nil {
+		return x.Version
+	}
+	return ""
+}
+
+func (x *DeleteRequest) GetKeys() []byte {
+	if x != nil {
+		return x.Keys
+	}
+	return nil
+}
+
+func (x *DeleteRequest) GetWhere() []byte {
+	if x != nil {
+		return x.Where
+	}
+	return nil
+}
+
+func (x *DeleteRequest) GetUserID() string {
+	if x != nil {
+		return x.UserID
+	}
+	return ""
+}
+
+type UpdateRequest struct {
+	state         protoimpl.MessageState
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
+
+	DatabaseID            string `protobuf:"bytes,1,opt,name=DatabaseID,proto3" json:"DatabaseID,omitempty"`
+	TablePrefixWithSchema string `protobuf:"bytes,2,opt,name=TablePrefixWithSchema,proto3" json:"TablePrefixWithSchema,omitempty"`
+	Version               string `protobuf:"bytes,3,opt,name=Version,proto3" json:"Version,omitempty"`
+	Keys                  []byte `protobuf:"bytes,4,opt,name=Keys,proto3" json:"Keys,omitempty"`
+	Where                 []byte `protobuf:"bytes,5,opt,name=Where,proto3" json:"Where,omitempty"`
+	NewModel              []byte `protobuf:"bytes,6,opt,name=NewModel,proto3" json:"NewModel,omitempty"`
+	UserID                string `protobuf:"bytes,7,opt,name=UserID,proto3" json:"UserID,omitempty"`
+}
+
+func (x *UpdateRequest) Reset() {
+	*x = UpdateRequest{}
+	if protoimpl.UnsafeEnabled {
+		mi := &file_v1_request_command_proto_msgTypes[4]
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		ms.StoreMessageInfo(mi)
+	}
+}
+
+func (x *UpdateRequest) String() string {
+	return protoimpl.X.MessageStringOf(x)
+}
+
+func (*UpdateRequest) ProtoMessage() {}
+
+func (x *UpdateRequest) ProtoReflect() protoreflect.Message {
+	mi := &file_v1_request_command_proto_msgTypes[4]
+	if protoimpl.UnsafeEnabled && x != nil {
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		if ms.LoadMessageInfo() == nil {
+			ms.StoreMessageInfo(mi)
+		}
+		return ms
+	}
+	return mi.MessageOf(x)
+}
+
+// Deprecated: Use UpdateRequest.ProtoReflect.Descriptor instead.
+func (*UpdateRequest) Descriptor() ([]byte, []int) {
+	return file_v1_request_command_proto_rawDescGZIP(), []int{4}
+}
+
+func (x *UpdateRequest) GetDatabaseID() string {
+	if x != nil {
+		return x.DatabaseID
+	}
+	return ""
+}
+
+func (x *UpdateRequest) GetTablePrefixWithSchema() string {
+	if x != nil {
+		return x.TablePrefixWithSchema
+	}
+	return ""
+}
+
+func (x *UpdateRequest) GetVersion() string {
+	if x != nil {
+		return x.Version
+	}
+	return ""
+}
+
+func (x *UpdateRequest) GetKeys() []byte {
+	if x != nil {
+		return x.Keys
+	}
+	return nil
+}
+
+func (x *UpdateRequest) GetWhere() []byte {
+	if x != nil {
+		return x.Where
+	}
+	return nil
+}
+
+func (x *UpdateRequest) GetNewModel() []byte {
+	if x != nil {
+		return x.NewModel
+	}
+	return nil
+}
+
+func (x *UpdateRequest) GetUserID() string {
+	if x != nil {
+		return x.UserID
+	}
+	return ""
+}
+
+type ReplayRequest struct {
+	state         protoimpl.MessageState
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
+
+	DatabaseID            string `protobuf:"bytes,1,opt,name=DatabaseID,proto3" json:"DatabaseID,omitempty"`
+	TablePrefixWithSchema string `protobuf:"bytes,2,opt,name=TablePrefixWithSchema,proto3" json:"TablePrefixWithSchema,omitempty"`
+	Version               string `protobuf:"bytes,3,opt,name=Version,proto3" json:"Version,omitempty"`
+	Keys                  []byte `protobuf:"bytes,4,opt,name=Keys,proto3" json:"Keys,omitempty"`
+	UserID                string `protobuf:"bytes,5,opt,name=UserID,proto3" json:"UserID,omitempty"`
+}
+
+func (x *ReplayRequest) Reset() {
+	*x = ReplayRequest{}
+	if protoimpl.UnsafeEnabled {
+		mi := &file_v1_request_command_proto_msgTypes[5]
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		ms.StoreMessageInfo(mi)
+	}
+}
+
+func (x *ReplayRequest) String() string {
+	return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ReplayRequest) ProtoMessage() {}
+
+func (x *ReplayRequest) ProtoReflect() protoreflect.Message {
+	mi := &file_v1_request_command_proto_msgTypes[5]
+	if protoimpl.UnsafeEnabled && x != nil {
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		if ms.LoadMessageInfo() == nil {
+			ms.StoreMessageInfo(mi)
+		}
+		return ms
+	}
+	return mi.MessageOf(x)
+}
+
+// Deprecated: Use ReplayRequest.ProtoReflect.Descriptor instead.
+func (*ReplayRequest) Descriptor() ([]byte, []int) {
+	return file_v1_request_command_proto_rawDescGZIP(), []int{5}
+}
+
+func (x *ReplayRequest) GetDatabaseID() string {
+	if x != nil {
+		return x.DatabaseID
+	}
+	return ""
+}
+
+func (x *ReplayRequest) GetTablePrefixWithSchema() string {
+	if x != nil {
+		return x.TablePrefixWithSchema
+	}
+	return ""
+}
+
+func (x *ReplayRequest) GetVersion() string {
+	if x != nil {
+		return x.Version
+	}
+	return ""
+}
+
+func (x *ReplayRequest) GetKeys() []byte {
+	if x != nil {
+		return x.Keys
+	}
+	return nil
+}
+
+func (x *ReplayRequest) GetUserID() string {
+	if x != nil {
+		return x.UserID
+	}
+	return ""
+}
+
+type TransactionBeginRequest struct {
+	state         protoimpl.MessageState
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
+
+	DatabaseID string `protobuf:"bytes,1,opt,name=DatabaseID,proto3" json:"DatabaseID,omitempty"`
+}
+
+func (x *TransactionBeginRequest) Reset() {
+	*x = TransactionBeginRequest{}
+	if protoimpl.UnsafeEnabled {
+		mi := &file_v1_request_command_proto_msgTypes[6]
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		ms.StoreMessageInfo(mi)
+	}
+}
+
+func (x *TransactionBeginRequest) String() string {
+	return protoimpl.X.MessageStringOf(x)
+}
+
+func (*TransactionBeginRequest) ProtoMessage() {}
+
+func (x *TransactionBeginRequest) ProtoReflect() protoreflect.Message {
+	mi := &file_v1_request_command_proto_msgTypes[6]
+	if protoimpl.UnsafeEnabled && x != nil {
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		if ms.LoadMessageInfo() == nil {
+			ms.StoreMessageInfo(mi)
+		}
+		return ms
+	}
+	return mi.MessageOf(x)
+}
+
+// Deprecated: Use TransactionBeginRequest.ProtoReflect.Descriptor instead.
+func (*TransactionBeginRequest) Descriptor() ([]byte, []int) {
+	return file_v1_request_command_proto_rawDescGZIP(), []int{6}
+}
+
+func (x *TransactionBeginRequest) GetDatabaseID() string {
+	if x != nil {
+		return x.DatabaseID
+	}
+	return ""
+}
+
+type TransactionEndRequest struct {
+	state         protoimpl.MessageState
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
+}
+
+func (x *TransactionEndRequest) Reset() {
+	*x = TransactionEndRequest{}
+	if protoimpl.UnsafeEnabled {
+		mi := &file_v1_request_command_proto_msgTypes[7]
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		ms.StoreMessageInfo(mi)
+	}
+}
+
+func (x *TransactionEndRequest) String() string {
+	return protoimpl.X.MessageStringOf(x)
+}
+
+func (*TransactionEndRequest) ProtoMessage() {}
+
+func (x *TransactionEndRequest) ProtoReflect() protoreflect.Message {
+	mi := &file_v1_request_command_proto_msgTypes[7]
+	if protoimpl.UnsafeEnabled && x != nil {
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		if ms.LoadMessageInfo() == nil {
+			ms.StoreMessageInfo(mi)
+		}
+		return ms
+	}
+	return mi.MessageOf(x)
+}
+
+// Deprecated: Use TransactionEndRequest.ProtoReflect.Descriptor instead.
+func (*TransactionEndRequest) Descriptor() ([]byte, []int) {
+	return file_v1_request_command_proto_rawDescGZIP(), []int{7}
+}
+
+var File_v1_request_command_proto protoreflect.FileDescriptor
+
+var file_v1_request_command_proto_rawDesc = []byte{
+	0x0a, 0x18, 0x76, 0x31, 0x2f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2f, 0x63, 0x6f, 0x6d,
+	0x6d, 0x61, 0x6e, 0x64, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x07, 0x72, 0x65, 0x71, 0x75,
+	0x65, 0x73, 0x74, 0x1a, 0x36, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f,
+	0x6d, 0x77, 0x69, 0x74, 0x6b, 0x6f, 0x77, 0x2f, 0x67, 0x6f, 0x2d, 0x70, 0x72, 0x6f, 0x74, 0x6f,
+	0x2d, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x2f, 0x76, 0x61, 0x6c, 0x69,
+	0x64, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xba, 0x01, 0x0a, 0x12,
+	0x41, 0x75, 0x74, 0x6f, 0x4d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65,
+	0x73, 0x74, 0x12, 0x26, 0x0a, 0x0a, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x49, 0x44,
+	0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x06, 0xe2, 0xdf, 0x1f, 0x02, 0x58, 0x01, 0x52, 0x0a,
+	0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x49, 0x44, 0x12, 0x3c, 0x0a, 0x15, 0x54, 0x61,
+	0x62, 0x6c, 0x65, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x57, 0x69, 0x74, 0x68, 0x53, 0x63, 0x68,
+	0x65, 0x6d, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x06, 0xe2, 0xdf, 0x1f, 0x02, 0x58,
+	0x01, 0x52, 0x15, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x57, 0x69,
+	0x74, 0x68, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x12, 0x20, 0x0a, 0x07, 0x56, 0x65, 0x72, 0x73,
+	0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x06, 0xe2, 0xdf, 0x1f, 0x02, 0x58,
+	0x01, 0x52, 0x07, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1c, 0x0a, 0x05, 0x4d, 0x6f,
+	0x64, 0x65, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x06, 0xe2, 0xdf, 0x1f, 0x02, 0x70,
+	0x00, 0x52, 0x05, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x22, 0x97, 0x03, 0x0a, 0x14, 0x54, 0x72, 0x61,
+	0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f,
+	0x6e, 0x12, 0x5c, 0x0a, 0x17, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e,
+	0x42, 0x65, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x18, 0x01, 0x20, 0x01,
+	0x28, 0x0b, 0x32, 0x20, 0x2e, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x54, 0x72, 0x61,
+	0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x65, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x71,
+	0x75, 0x65, 0x73, 0x74, 0x48, 0x00, 0x52, 0x17, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74,
+	0x69, 0x6f, 0x6e, 0x42, 0x65, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12,
+	0x3e, 0x0a, 0x0d, 0x49, 0x6e, 0x73, 0x65, 0x72, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
+	0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
+	0x2e, 0x49, 0x6e, 0x73, 0x65, 0x72, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x48, 0x00,
+	0x52, 0x0d, 0x49, 0x6e, 0x73, 0x65, 0x72, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12,
+	0x3e, 0x0a, 0x0d, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
+	0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
+	0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x48, 0x00,
+	0x52, 0x0d, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12,
+	0x3e, 0x0a, 0x0d, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
+	0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
+	0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x48, 0x00,
+	0x52, 0x0d, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12,
+	0x56, 0x0a, 0x15, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x6e,
+	0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e,
+	0x2e, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63,
+	0x74, 0x69, 0x6f, 0x6e, 0x45, 0x6e, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x48, 0x00,
+	0x52, 0x15, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x6e, 0x64,
+	0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x42, 0x09, 0x0a, 0x07, 0x52, 0x65, 0x71, 0x75, 0x65,
+	0x73, 0x74, 0x22, 0xeb, 0x01, 0x0a, 0x0d, 0x49, 0x6e, 0x73, 0x65, 0x72, 0x74, 0x52, 0x65, 0x71,
+	0x75, 0x65, 0x73, 0x74, 0x12, 0x26, 0x0a, 0x0a, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65,
+	0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x06, 0xe2, 0xdf, 0x1f, 0x02, 0x58, 0x01,
+	0x52, 0x0a, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x49, 0x44, 0x12, 0x3c, 0x0a, 0x15,
+	0x54, 0x61, 0x62, 0x6c, 0x65, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x57, 0x69, 0x74, 0x68, 0x53,
+	0x63, 0x68, 0x65, 0x6d, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x06, 0xe2, 0xdf, 0x1f,
+	0x02, 0x58, 0x01, 0x52, 0x15, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78,
+	0x57, 0x69, 0x74, 0x68, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x12, 0x20, 0x0a, 0x07, 0x56, 0x65,
+	0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x06, 0xe2, 0xdf, 0x1f,
+	0x02, 0x58, 0x01, 0x52, 0x07, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1a, 0x0a, 0x04,
+	0x4b, 0x65, 0x79, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x06, 0xe2, 0xdf, 0x1f, 0x02,
+	0x70, 0x00, 0x52, 0x04, 0x4b, 0x65, 0x79, 0x73, 0x12, 0x1e, 0x0a, 0x06, 0x4d, 0x6f, 0x64, 0x65,
+	0x6c, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x06, 0xe2, 0xdf, 0x1f, 0x02, 0x70, 0x00,
+	0x52, 0x06, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x55, 0x73, 0x65, 0x72,
+	0x49, 0x44, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x55, 0x73, 0x65, 0x72, 0x49, 0x44,
+	0x22, 0xe1, 0x01, 0x0a, 0x0d, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65,
+	0x73, 0x74, 0x12, 0x26, 0x0a, 0x0a, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x49, 0x44,
+	0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x06, 0xe2, 0xdf, 0x1f, 0x02, 0x58, 0x01, 0x52, 0x0a,
+	0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x49, 0x44, 0x12, 0x3c, 0x0a, 0x15, 0x54, 0x61,
+	0x62, 0x6c, 0x65, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x57, 0x69, 0x74, 0x68, 0x53, 0x63, 0x68,
+	0x65, 0x6d, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x06, 0xe2, 0xdf, 0x1f, 0x02, 0x58,
+	0x01, 0x52, 0x15, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x57, 0x69,
+	0x74, 0x68, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x12, 0x20, 0x0a, 0x07, 0x56, 0x65, 0x72, 0x73,
+	0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x06, 0xe2, 0xdf, 0x1f, 0x02, 0x58,
+	0x01, 0x52, 0x07, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1a, 0x0a, 0x04, 0x4b, 0x65,
+	0x79, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x06, 0xe2, 0xdf, 0x1f, 0x02, 0x70, 0x00,
+	0x52, 0x04, 0x4b, 0x65, 0x79, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x57, 0x68, 0x65, 0x72, 0x65, 0x18,
+	0x05, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x57, 0x68, 0x65, 0x72, 0x65, 0x12, 0x16, 0x0a, 0x06,
+	0x55, 0x73, 0x65, 0x72, 0x49, 0x44, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x55, 0x73,
+	0x65, 0x72, 0x49, 0x44, 0x22, 0x85, 0x02, 0x0a, 0x0d, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52,
+	0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x26, 0x0a, 0x0a, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61,
+	0x73, 0x65, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x06, 0xe2, 0xdf, 0x1f, 0x02,
+	0x58, 0x01, 0x52, 0x0a, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x49, 0x44, 0x12, 0x3c,
+	0x0a, 0x15, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x57, 0x69, 0x74,
+	0x68, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x06, 0xe2,
+	0xdf, 0x1f, 0x02, 0x58, 0x01, 0x52, 0x15, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x50, 0x72, 0x65, 0x66,
+	0x69, 0x78, 0x57, 0x69, 0x74, 0x68, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x12, 0x20, 0x0a, 0x07,
+	0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x06, 0xe2,
+	0xdf, 0x1f, 0x02, 0x58, 0x01, 0x52, 0x07, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1a,
+	0x0a, 0x04, 0x4b, 0x65, 0x79, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x06, 0xe2, 0xdf,
+	0x1f, 0x02, 0x70, 0x00, 0x52, 0x04, 0x4b, 0x65, 0x79, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x57, 0x68,
+	0x65, 0x72, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x57, 0x68, 0x65, 0x72, 0x65,
+	0x12, 0x22, 0x0a, 0x08, 0x4e, 0x65, 0x77, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x18, 0x06, 0x20, 0x01,
+	0x28, 0x0c, 0x42, 0x06, 0xe2, 0xdf, 0x1f, 0x02, 0x70, 0x00, 0x52, 0x08, 0x4e, 0x65, 0x77, 0x4d,
+	0x6f, 0x64, 0x65, 0x6c, 0x12, 0x16, 0x0a, 0x06, 0x55, 0x73, 0x65, 0x72, 0x49, 0x44, 0x18, 0x07,
+	0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x55, 0x73, 0x65, 0x72, 0x49, 0x44, 0x22, 0xcb, 0x01, 0x0a,
+	0x0d, 0x52, 0x65, 0x70, 0x6c, 0x61, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x26,
+	0x0a, 0x0a, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01,
+	0x28, 0x09, 0x42, 0x06, 0xe2, 0xdf, 0x1f, 0x02, 0x58, 0x01, 0x52, 0x0a, 0x44, 0x61, 0x74, 0x61,
+	0x62, 0x61, 0x73, 0x65, 0x49, 0x44, 0x12, 0x3c, 0x0a, 0x15, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x50,
+	0x72, 0x65, 0x66, 0x69, 0x78, 0x57, 0x69, 0x74, 0x68, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x18,
+	0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x06, 0xe2, 0xdf, 0x1f, 0x02, 0x58, 0x01, 0x52, 0x15, 0x54,
+	0x61, 0x62, 0x6c, 0x65, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x57, 0x69, 0x74, 0x68, 0x53, 0x63,
+	0x68, 0x65, 0x6d, 0x61, 0x12, 0x20, 0x0a, 0x07, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18,
+	0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x06, 0xe2, 0xdf, 0x1f, 0x02, 0x58, 0x01, 0x52, 0x07, 0x56,
+	0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1a, 0x0a, 0x04, 0x4b, 0x65, 0x79, 0x73, 0x18, 0x04,
+	0x20, 0x01, 0x28, 0x0c, 0x42, 0x06, 0xe2, 0xdf, 0x1f, 0x02, 0x70, 0x00, 0x52, 0x04, 0x4b, 0x65,
+	0x79, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x55, 0x73, 0x65, 0x72, 0x49, 0x44, 0x18, 0x05, 0x20, 0x01,
+	0x28, 0x09, 0x52, 0x06, 0x55, 0x73, 0x65, 0x72, 0x49, 0x44, 0x22, 0x41, 0x0a, 0x17, 0x54, 0x72,
+	0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x65, 0x67, 0x69, 0x6e, 0x52, 0x65,
+	0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x26, 0x0a, 0x0a, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73,
+	0x65, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x06, 0xe2, 0xdf, 0x1f, 0x02, 0x58,
+	0x01, 0x52, 0x0a, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x49, 0x44, 0x22, 0x17, 0x0a,
+	0x15, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x6e, 0x64, 0x52,
+	0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x42, 0x20, 0x5a, 0x1e, 0x64, 0x70, 0x73, 0x2f, 0x61, 0x70,
+	0x69, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x5f, 0x61, 0x70, 0x69, 0x2f, 0x70, 0x62, 0x2f, 0x76, 0x31,
+	0x2f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
+}
+
+var (
+	file_v1_request_command_proto_rawDescOnce sync.Once
+	file_v1_request_command_proto_rawDescData = file_v1_request_command_proto_rawDesc
+)
+
+func file_v1_request_command_proto_rawDescGZIP() []byte {
+	file_v1_request_command_proto_rawDescOnce.Do(func() {
+		file_v1_request_command_proto_rawDescData = protoimpl.X.CompressGZIP(file_v1_request_command_proto_rawDescData)
+	})
+	return file_v1_request_command_proto_rawDescData
+}
+
+var file_v1_request_command_proto_msgTypes = make([]protoimpl.MessageInfo, 8)
+var file_v1_request_command_proto_goTypes = []interface{}{
+	(*AutoMigrateRequest)(nil),      // 0: request.AutoMigrateRequest
+	(*TransactionOperation)(nil),    // 1: request.TransactionOperation
+	(*InsertRequest)(nil),           // 2: request.InsertRequest
+	(*DeleteRequest)(nil),           // 3: request.DeleteRequest
+	(*UpdateRequest)(nil),           // 4: request.UpdateRequest
+	(*ReplayRequest)(nil),           // 5: request.ReplayRequest
+	(*TransactionBeginRequest)(nil), // 6: request.TransactionBeginRequest
+	(*TransactionEndRequest)(nil),   // 7: request.TransactionEndRequest
+}
+var file_v1_request_command_proto_depIdxs = []int32{
+	6, // 0: request.TransactionOperation.TransactionBeginRequest:type_name -> request.TransactionBeginRequest
+	2, // 1: request.TransactionOperation.InsertRequest:type_name -> request.InsertRequest
+	3, // 2: request.TransactionOperation.DeleteRequest:type_name -> request.DeleteRequest
+	4, // 3: request.TransactionOperation.UpdateRequest:type_name -> request.UpdateRequest
+	7, // 4: request.TransactionOperation.TransactionEndRequest:type_name -> request.TransactionEndRequest
+	5, // [5:5] is the sub-list for method output_type
+	5, // [5:5] is the sub-list for method input_type
+	5, // [5:5] is the sub-list for extension type_name
+	5, // [5:5] is the sub-list for extension extendee
+	0, // [0:5] is the sub-list for field type_name
+}
+
+func init() { file_v1_request_command_proto_init() }
+func file_v1_request_command_proto_init() {
+	if File_v1_request_command_proto != nil {
+		return
+	}
+	if !protoimpl.UnsafeEnabled {
+		file_v1_request_command_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*AutoMigrateRequest); i {
+			case 0:
+				return &v.state
+			case 1:
+				return &v.sizeCache
+			case 2:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_v1_request_command_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*TransactionOperation); i {
+			case 0:
+				return &v.state
+			case 1:
+				return &v.sizeCache
+			case 2:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_v1_request_command_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*InsertRequest); i {
+			case 0:
+				return &v.state
+			case 1:
+				return &v.sizeCache
+			case 2:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_v1_request_command_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*DeleteRequest); i {
+			case 0:
+				return &v.state
+			case 1:
+				return &v.sizeCache
+			case 2:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_v1_request_command_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*UpdateRequest); i {
+			case 0:
+				return &v.state
+			case 1:
+				return &v.sizeCache
+			case 2:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_v1_request_command_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*ReplayRequest); i {
+			case 0:
+				return &v.state
+			case 1:
+				return &v.sizeCache
+			case 2:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_v1_request_command_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*TransactionBeginRequest); i {
+			case 0:
+				return &v.state
+			case 1:
+				return &v.sizeCache
+			case 2:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_v1_request_command_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*TransactionEndRequest); i {
+			case 0:
+				return &v.state
+			case 1:
+				return &v.sizeCache
+			case 2:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+	}
+	file_v1_request_command_proto_msgTypes[1].OneofWrappers = []interface{}{
+		(*TransactionOperation_TransactionBeginRequest)(nil),
+		(*TransactionOperation_InsertRequest)(nil),
+		(*TransactionOperation_DeleteRequest)(nil),
+		(*TransactionOperation_UpdateRequest)(nil),
+		(*TransactionOperation_TransactionEndRequest)(nil),
+	}
+	type x struct{}
+	out := protoimpl.TypeBuilder{
+		File: protoimpl.DescBuilder{
+			GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
+			RawDescriptor: file_v1_request_command_proto_rawDesc,
+			NumEnums:      0,
+			NumMessages:   8,
+			NumExtensions: 0,
+			NumServices:   0,
+		},
+		GoTypes:           file_v1_request_command_proto_goTypes,
+		DependencyIndexes: file_v1_request_command_proto_depIdxs,
+		MessageInfos:      file_v1_request_command_proto_msgTypes,
+	}.Build()
+	File_v1_request_command_proto = out.File
+	file_v1_request_command_proto_rawDesc = nil
+	file_v1_request_command_proto_goTypes = nil
+	file_v1_request_command_proto_depIdxs = nil
+}

+ 146 - 0
pb/v1/request/command.validator.pb.go

@@ -0,0 +1,146 @@
+// Code generated by protoc-gen-gogo. DO NOT EDIT.
+// source: v1/request/command.proto
+
+package request
+
+import (
+	fmt "fmt"
+	math "math"
+	proto "github.com/golang/protobuf/proto"
+	_ "github.com/mwitkow/go-proto-validators"
+	github_com_mwitkow_go_proto_validators "github.com/mwitkow/go-proto-validators"
+)
+
+// Reference imports to suppress errors if they are not otherwise used.
+var _ = proto.Marshal
+var _ = fmt.Errorf
+var _ = math.Inf
+
+func (this *AutoMigrateRequest) Validate() error {
+	if this.DatabaseID == "" {
+		return github_com_mwitkow_go_proto_validators.FieldError("DatabaseID", fmt.Errorf(`value '%v' must not be an empty string`, this.DatabaseID))
+	}
+	if this.TablePrefixWithSchema == "" {
+		return github_com_mwitkow_go_proto_validators.FieldError("TablePrefixWithSchema", fmt.Errorf(`value '%v' must not be an empty string`, this.TablePrefixWithSchema))
+	}
+	if this.Version == "" {
+		return github_com_mwitkow_go_proto_validators.FieldError("Version", fmt.Errorf(`value '%v' must not be an empty string`, this.Version))
+	}
+	if !(len(this.Model) > 0) {
+		return github_com_mwitkow_go_proto_validators.FieldError("Model", fmt.Errorf(`value '%v' must have a length greater than '0'`, this.Model))
+	}
+	return nil
+}
+func (this *TransactionOperation) Validate() error {
+	if oneOfNester, ok := this.GetRequest().(*TransactionOperation_TransactionBeginRequest); ok {
+		if oneOfNester.TransactionBeginRequest != nil {
+			if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(oneOfNester.TransactionBeginRequest); err != nil {
+				return github_com_mwitkow_go_proto_validators.FieldError("TransactionBeginRequest", err)
+			}
+		}
+	}
+	if oneOfNester, ok := this.GetRequest().(*TransactionOperation_InsertRequest); ok {
+		if oneOfNester.InsertRequest != nil {
+			if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(oneOfNester.InsertRequest); err != nil {
+				return github_com_mwitkow_go_proto_validators.FieldError("InsertRequest", err)
+			}
+		}
+	}
+	if oneOfNester, ok := this.GetRequest().(*TransactionOperation_DeleteRequest); ok {
+		if oneOfNester.DeleteRequest != nil {
+			if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(oneOfNester.DeleteRequest); err != nil {
+				return github_com_mwitkow_go_proto_validators.FieldError("DeleteRequest", err)
+			}
+		}
+	}
+	if oneOfNester, ok := this.GetRequest().(*TransactionOperation_UpdateRequest); ok {
+		if oneOfNester.UpdateRequest != nil {
+			if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(oneOfNester.UpdateRequest); err != nil {
+				return github_com_mwitkow_go_proto_validators.FieldError("UpdateRequest", err)
+			}
+		}
+	}
+	if oneOfNester, ok := this.GetRequest().(*TransactionOperation_TransactionEndRequest); ok {
+		if oneOfNester.TransactionEndRequest != nil {
+			if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(oneOfNester.TransactionEndRequest); err != nil {
+				return github_com_mwitkow_go_proto_validators.FieldError("TransactionEndRequest", err)
+			}
+		}
+	}
+	return nil
+}
+func (this *InsertRequest) Validate() error {
+	if this.DatabaseID == "" {
+		return github_com_mwitkow_go_proto_validators.FieldError("DatabaseID", fmt.Errorf(`value '%v' must not be an empty string`, this.DatabaseID))
+	}
+	if this.TablePrefixWithSchema == "" {
+		return github_com_mwitkow_go_proto_validators.FieldError("TablePrefixWithSchema", fmt.Errorf(`value '%v' must not be an empty string`, this.TablePrefixWithSchema))
+	}
+	if this.Version == "" {
+		return github_com_mwitkow_go_proto_validators.FieldError("Version", fmt.Errorf(`value '%v' must not be an empty string`, this.Version))
+	}
+	if !(len(this.Keys) > 0) {
+		return github_com_mwitkow_go_proto_validators.FieldError("Keys", fmt.Errorf(`value '%v' must have a length greater than '0'`, this.Keys))
+	}
+	if !(len(this.Models) > 0) {
+		return github_com_mwitkow_go_proto_validators.FieldError("Models", fmt.Errorf(`value '%v' must have a length greater than '0'`, this.Models))
+	}
+	return nil
+}
+func (this *DeleteRequest) Validate() error {
+	if this.DatabaseID == "" {
+		return github_com_mwitkow_go_proto_validators.FieldError("DatabaseID", fmt.Errorf(`value '%v' must not be an empty string`, this.DatabaseID))
+	}
+	if this.TablePrefixWithSchema == "" {
+		return github_com_mwitkow_go_proto_validators.FieldError("TablePrefixWithSchema", fmt.Errorf(`value '%v' must not be an empty string`, this.TablePrefixWithSchema))
+	}
+	if this.Version == "" {
+		return github_com_mwitkow_go_proto_validators.FieldError("Version", fmt.Errorf(`value '%v' must not be an empty string`, this.Version))
+	}
+	if !(len(this.Keys) > 0) {
+		return github_com_mwitkow_go_proto_validators.FieldError("Keys", fmt.Errorf(`value '%v' must have a length greater than '0'`, this.Keys))
+	}
+	return nil
+}
+func (this *UpdateRequest) Validate() error {
+	if this.DatabaseID == "" {
+		return github_com_mwitkow_go_proto_validators.FieldError("DatabaseID", fmt.Errorf(`value '%v' must not be an empty string`, this.DatabaseID))
+	}
+	if this.TablePrefixWithSchema == "" {
+		return github_com_mwitkow_go_proto_validators.FieldError("TablePrefixWithSchema", fmt.Errorf(`value '%v' must not be an empty string`, this.TablePrefixWithSchema))
+	}
+	if this.Version == "" {
+		return github_com_mwitkow_go_proto_validators.FieldError("Version", fmt.Errorf(`value '%v' must not be an empty string`, this.Version))
+	}
+	if !(len(this.Keys) > 0) {
+		return github_com_mwitkow_go_proto_validators.FieldError("Keys", fmt.Errorf(`value '%v' must have a length greater than '0'`, this.Keys))
+	}
+	if !(len(this.NewModel) > 0) {
+		return github_com_mwitkow_go_proto_validators.FieldError("NewModel", fmt.Errorf(`value '%v' must have a length greater than '0'`, this.NewModel))
+	}
+	return nil
+}
+func (this *ReplayRequest) Validate() error {
+	if this.DatabaseID == "" {
+		return github_com_mwitkow_go_proto_validators.FieldError("DatabaseID", fmt.Errorf(`value '%v' must not be an empty string`, this.DatabaseID))
+	}
+	if this.TablePrefixWithSchema == "" {
+		return github_com_mwitkow_go_proto_validators.FieldError("TablePrefixWithSchema", fmt.Errorf(`value '%v' must not be an empty string`, this.TablePrefixWithSchema))
+	}
+	if this.Version == "" {
+		return github_com_mwitkow_go_proto_validators.FieldError("Version", fmt.Errorf(`value '%v' must not be an empty string`, this.Version))
+	}
+	if !(len(this.Keys) > 0) {
+		return github_com_mwitkow_go_proto_validators.FieldError("Keys", fmt.Errorf(`value '%v' must have a length greater than '0'`, this.Keys))
+	}
+	return nil
+}
+func (this *TransactionBeginRequest) Validate() error {
+	if this.DatabaseID == "" {
+		return github_com_mwitkow_go_proto_validators.FieldError("DatabaseID", fmt.Errorf(`value '%v' must not be an empty string`, this.DatabaseID))
+	}
+	return nil
+}
+func (this *TransactionEndRequest) Validate() error {
+	return nil
+}

+ 895 - 0
pb/v1/request/query.pb.go

@@ -0,0 +1,895 @@
+// Code generated by protoc-gen-go. DO NOT EDIT.
+// versions:
+// 	protoc-gen-go v1.28.1
+// 	protoc        v3.12.4
+// source: v1/request/query.proto
+
+package request
+
+import (
+	_ "github.com/mwitkow/go-proto-validators"
+	protoreflect "google.golang.org/protobuf/reflect/protoreflect"
+	protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+	reflect "reflect"
+	sync "sync"
+)
+
+const (
+	// Verify that this generated code is sufficiently up-to-date.
+	_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
+	// Verify that runtime/protoimpl is sufficiently up-to-date.
+	_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
+)
+
+type QueryByWhereAndOrderByRequest struct {
+	state         protoimpl.MessageState
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
+
+	DatabaseID            string   `protobuf:"bytes,1,opt,name=DatabaseID,proto3" json:"DatabaseID,omitempty"`
+	TablePrefixWithSchema string   `protobuf:"bytes,2,opt,name=TablePrefixWithSchema,proto3" json:"TablePrefixWithSchema,omitempty"`
+	Version               string   `protobuf:"bytes,3,opt,name=Version,proto3" json:"Version,omitempty"`
+	Select                string   `protobuf:"bytes,4,opt,name=Select,proto3" json:"Select,omitempty"`
+	Where                 []byte   `protobuf:"bytes,5,opt,name=Where,proto3" json:"Where,omitempty"`
+	OrderBy               []string `protobuf:"bytes,6,rep,name=OrderBy,proto3" json:"OrderBy,omitempty"`
+	PageNo                int32    `protobuf:"varint,7,opt,name=PageNo,proto3" json:"PageNo,omitempty"`
+	PageSize              int32    `protobuf:"varint,8,opt,name=PageSize,proto3" json:"PageSize,omitempty"`
+}
+
+func (x *QueryByWhereAndOrderByRequest) Reset() {
+	*x = QueryByWhereAndOrderByRequest{}
+	if protoimpl.UnsafeEnabled {
+		mi := &file_v1_request_query_proto_msgTypes[0]
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		ms.StoreMessageInfo(mi)
+	}
+}
+
+func (x *QueryByWhereAndOrderByRequest) String() string {
+	return protoimpl.X.MessageStringOf(x)
+}
+
+func (*QueryByWhereAndOrderByRequest) ProtoMessage() {}
+
+func (x *QueryByWhereAndOrderByRequest) ProtoReflect() protoreflect.Message {
+	mi := &file_v1_request_query_proto_msgTypes[0]
+	if protoimpl.UnsafeEnabled && x != nil {
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		if ms.LoadMessageInfo() == nil {
+			ms.StoreMessageInfo(mi)
+		}
+		return ms
+	}
+	return mi.MessageOf(x)
+}
+
+// Deprecated: Use QueryByWhereAndOrderByRequest.ProtoReflect.Descriptor instead.
+func (*QueryByWhereAndOrderByRequest) Descriptor() ([]byte, []int) {
+	return file_v1_request_query_proto_rawDescGZIP(), []int{0}
+}
+
+func (x *QueryByWhereAndOrderByRequest) GetDatabaseID() string {
+	if x != nil {
+		return x.DatabaseID
+	}
+	return ""
+}
+
+func (x *QueryByWhereAndOrderByRequest) GetTablePrefixWithSchema() string {
+	if x != nil {
+		return x.TablePrefixWithSchema
+	}
+	return ""
+}
+
+func (x *QueryByWhereAndOrderByRequest) GetVersion() string {
+	if x != nil {
+		return x.Version
+	}
+	return ""
+}
+
+func (x *QueryByWhereAndOrderByRequest) GetSelect() string {
+	if x != nil {
+		return x.Select
+	}
+	return ""
+}
+
+func (x *QueryByWhereAndOrderByRequest) GetWhere() []byte {
+	if x != nil {
+		return x.Where
+	}
+	return nil
+}
+
+func (x *QueryByWhereAndOrderByRequest) GetOrderBy() []string {
+	if x != nil {
+		return x.OrderBy
+	}
+	return nil
+}
+
+func (x *QueryByWhereAndOrderByRequest) GetPageNo() int32 {
+	if x != nil {
+		return x.PageNo
+	}
+	return 0
+}
+
+func (x *QueryByWhereAndOrderByRequest) GetPageSize() int32 {
+	if x != nil {
+		return x.PageSize
+	}
+	return 0
+}
+
+type CommonQueryRequest struct {
+	state         protoimpl.MessageState
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
+
+	DatabaseID            string   `protobuf:"bytes,1,opt,name=DatabaseID,proto3" json:"DatabaseID,omitempty"`
+	TablePrefixWithSchema string   `protobuf:"bytes,2,opt,name=TablePrefixWithSchema,proto3" json:"TablePrefixWithSchema,omitempty"`
+	Version               string   `protobuf:"bytes,3,opt,name=Version,proto3" json:"Version,omitempty"`
+	Select                string   `protobuf:"bytes,4,opt,name=Select,proto3" json:"Select,omitempty"`
+	Where                 []byte   `protobuf:"bytes,5,opt,name=Where,proto3" json:"Where,omitempty"`
+	OrderBy               []string `protobuf:"bytes,6,rep,name=OrderBy,proto3" json:"OrderBy,omitempty"`
+	Or                    []byte   `protobuf:"bytes,7,opt,name=Or,proto3" json:"Or,omitempty"`
+	GroupBy               []string `protobuf:"bytes,8,rep,name=GroupBy,proto3" json:"GroupBy,omitempty"`
+	Join                  string   `protobuf:"bytes,9,opt,name=Join,proto3" json:"Join,omitempty"`
+	Having                []byte   `protobuf:"bytes,10,opt,name=Having,proto3" json:"Having,omitempty"`
+	PageNo                int32    `protobuf:"varint,11,opt,name=PageNo,proto3" json:"PageNo,omitempty"`
+	PageSize              int32    `protobuf:"varint,12,opt,name=PageSize,proto3" json:"PageSize,omitempty"`
+}
+
+func (x *CommonQueryRequest) Reset() {
+	*x = CommonQueryRequest{}
+	if protoimpl.UnsafeEnabled {
+		mi := &file_v1_request_query_proto_msgTypes[1]
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		ms.StoreMessageInfo(mi)
+	}
+}
+
+func (x *CommonQueryRequest) String() string {
+	return protoimpl.X.MessageStringOf(x)
+}
+
+func (*CommonQueryRequest) ProtoMessage() {}
+
+func (x *CommonQueryRequest) ProtoReflect() protoreflect.Message {
+	mi := &file_v1_request_query_proto_msgTypes[1]
+	if protoimpl.UnsafeEnabled && x != nil {
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		if ms.LoadMessageInfo() == nil {
+			ms.StoreMessageInfo(mi)
+		}
+		return ms
+	}
+	return mi.MessageOf(x)
+}
+
+// Deprecated: Use CommonQueryRequest.ProtoReflect.Descriptor instead.
+func (*CommonQueryRequest) Descriptor() ([]byte, []int) {
+	return file_v1_request_query_proto_rawDescGZIP(), []int{1}
+}
+
+func (x *CommonQueryRequest) GetDatabaseID() string {
+	if x != nil {
+		return x.DatabaseID
+	}
+	return ""
+}
+
+func (x *CommonQueryRequest) GetTablePrefixWithSchema() string {
+	if x != nil {
+		return x.TablePrefixWithSchema
+	}
+	return ""
+}
+
+func (x *CommonQueryRequest) GetVersion() string {
+	if x != nil {
+		return x.Version
+	}
+	return ""
+}
+
+func (x *CommonQueryRequest) GetSelect() string {
+	if x != nil {
+		return x.Select
+	}
+	return ""
+}
+
+func (x *CommonQueryRequest) GetWhere() []byte {
+	if x != nil {
+		return x.Where
+	}
+	return nil
+}
+
+func (x *CommonQueryRequest) GetOrderBy() []string {
+	if x != nil {
+		return x.OrderBy
+	}
+	return nil
+}
+
+func (x *CommonQueryRequest) GetOr() []byte {
+	if x != nil {
+		return x.Or
+	}
+	return nil
+}
+
+func (x *CommonQueryRequest) GetGroupBy() []string {
+	if x != nil {
+		return x.GroupBy
+	}
+	return nil
+}
+
+func (x *CommonQueryRequest) GetJoin() string {
+	if x != nil {
+		return x.Join
+	}
+	return ""
+}
+
+func (x *CommonQueryRequest) GetHaving() []byte {
+	if x != nil {
+		return x.Having
+	}
+	return nil
+}
+
+func (x *CommonQueryRequest) GetPageNo() int32 {
+	if x != nil {
+		return x.PageNo
+	}
+	return 0
+}
+
+func (x *CommonQueryRequest) GetPageSize() int32 {
+	if x != nil {
+		return x.PageSize
+	}
+	return 0
+}
+
+type QueryByKeysRequest struct {
+	state         protoimpl.MessageState
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
+
+	DatabaseID            string `protobuf:"bytes,1,opt,name=DatabaseID,proto3" json:"DatabaseID,omitempty"`
+	TablePrefixWithSchema string `protobuf:"bytes,2,opt,name=TablePrefixWithSchema,proto3" json:"TablePrefixWithSchema,omitempty"`
+	Version               string `protobuf:"bytes,3,opt,name=Version,proto3" json:"Version,omitempty"`
+	Select                string `protobuf:"bytes,4,opt,name=Select,proto3" json:"Select,omitempty"`
+	Keys                  []byte `protobuf:"bytes,5,opt,name=Keys,proto3" json:"Keys,omitempty"`
+	Where                 []byte `protobuf:"bytes,6,opt,name=Where,proto3" json:"Where,omitempty"`
+}
+
+func (x *QueryByKeysRequest) Reset() {
+	*x = QueryByKeysRequest{}
+	if protoimpl.UnsafeEnabled {
+		mi := &file_v1_request_query_proto_msgTypes[2]
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		ms.StoreMessageInfo(mi)
+	}
+}
+
+func (x *QueryByKeysRequest) String() string {
+	return protoimpl.X.MessageStringOf(x)
+}
+
+func (*QueryByKeysRequest) ProtoMessage() {}
+
+func (x *QueryByKeysRequest) ProtoReflect() protoreflect.Message {
+	mi := &file_v1_request_query_proto_msgTypes[2]
+	if protoimpl.UnsafeEnabled && x != nil {
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		if ms.LoadMessageInfo() == nil {
+			ms.StoreMessageInfo(mi)
+		}
+		return ms
+	}
+	return mi.MessageOf(x)
+}
+
+// Deprecated: Use QueryByKeysRequest.ProtoReflect.Descriptor instead.
+func (*QueryByKeysRequest) Descriptor() ([]byte, []int) {
+	return file_v1_request_query_proto_rawDescGZIP(), []int{2}
+}
+
+func (x *QueryByKeysRequest) GetDatabaseID() string {
+	if x != nil {
+		return x.DatabaseID
+	}
+	return ""
+}
+
+func (x *QueryByKeysRequest) GetTablePrefixWithSchema() string {
+	if x != nil {
+		return x.TablePrefixWithSchema
+	}
+	return ""
+}
+
+func (x *QueryByKeysRequest) GetVersion() string {
+	if x != nil {
+		return x.Version
+	}
+	return ""
+}
+
+func (x *QueryByKeysRequest) GetSelect() string {
+	if x != nil {
+		return x.Select
+	}
+	return ""
+}
+
+func (x *QueryByKeysRequest) GetKeys() []byte {
+	if x != nil {
+		return x.Keys
+	}
+	return nil
+}
+
+func (x *QueryByKeysRequest) GetWhere() []byte {
+	if x != nil {
+		return x.Where
+	}
+	return nil
+}
+
+type CommonQueryByKeysRequest struct {
+	state         protoimpl.MessageState
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
+
+	DatabaseID            string `protobuf:"bytes,1,opt,name=DatabaseID,proto3" json:"DatabaseID,omitempty"`
+	TablePrefixWithSchema string `protobuf:"bytes,2,opt,name=TablePrefixWithSchema,proto3" json:"TablePrefixWithSchema,omitempty"`
+	Version               string `protobuf:"bytes,3,opt,name=Version,proto3" json:"Version,omitempty"`
+	Select                string `protobuf:"bytes,4,opt,name=Select,proto3" json:"Select,omitempty"`
+	Keys                  []byte `protobuf:"bytes,5,opt,name=Keys,proto3" json:"Keys,omitempty"`
+	Where                 []byte `protobuf:"bytes,6,opt,name=Where,proto3" json:"Where,omitempty"`
+	Or                    []byte `protobuf:"bytes,7,opt,name=Or,proto3" json:"Or,omitempty"`
+}
+
+func (x *CommonQueryByKeysRequest) Reset() {
+	*x = CommonQueryByKeysRequest{}
+	if protoimpl.UnsafeEnabled {
+		mi := &file_v1_request_query_proto_msgTypes[3]
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		ms.StoreMessageInfo(mi)
+	}
+}
+
+func (x *CommonQueryByKeysRequest) String() string {
+	return protoimpl.X.MessageStringOf(x)
+}
+
+func (*CommonQueryByKeysRequest) ProtoMessage() {}
+
+func (x *CommonQueryByKeysRequest) ProtoReflect() protoreflect.Message {
+	mi := &file_v1_request_query_proto_msgTypes[3]
+	if protoimpl.UnsafeEnabled && x != nil {
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		if ms.LoadMessageInfo() == nil {
+			ms.StoreMessageInfo(mi)
+		}
+		return ms
+	}
+	return mi.MessageOf(x)
+}
+
+// Deprecated: Use CommonQueryByKeysRequest.ProtoReflect.Descriptor instead.
+func (*CommonQueryByKeysRequest) Descriptor() ([]byte, []int) {
+	return file_v1_request_query_proto_rawDescGZIP(), []int{3}
+}
+
+func (x *CommonQueryByKeysRequest) GetDatabaseID() string {
+	if x != nil {
+		return x.DatabaseID
+	}
+	return ""
+}
+
+func (x *CommonQueryByKeysRequest) GetTablePrefixWithSchema() string {
+	if x != nil {
+		return x.TablePrefixWithSchema
+	}
+	return ""
+}
+
+func (x *CommonQueryByKeysRequest) GetVersion() string {
+	if x != nil {
+		return x.Version
+	}
+	return ""
+}
+
+func (x *CommonQueryByKeysRequest) GetSelect() string {
+	if x != nil {
+		return x.Select
+	}
+	return ""
+}
+
+func (x *CommonQueryByKeysRequest) GetKeys() []byte {
+	if x != nil {
+		return x.Keys
+	}
+	return nil
+}
+
+func (x *CommonQueryByKeysRequest) GetWhere() []byte {
+	if x != nil {
+		return x.Where
+	}
+	return nil
+}
+
+func (x *CommonQueryByKeysRequest) GetOr() []byte {
+	if x != nil {
+		return x.Or
+	}
+	return nil
+}
+
+type CountWhereRequest struct {
+	state         protoimpl.MessageState
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
+
+	DatabaseID            string `protobuf:"bytes,1,opt,name=DatabaseID,proto3" json:"DatabaseID,omitempty"`
+	TablePrefixWithSchema string `protobuf:"bytes,2,opt,name=TablePrefixWithSchema,proto3" json:"TablePrefixWithSchema,omitempty"`
+	Version               string `protobuf:"bytes,3,opt,name=Version,proto3" json:"Version,omitempty"`
+	Where                 []byte `protobuf:"bytes,4,opt,name=Where,proto3" json:"Where,omitempty"`
+	PageNo                int32  `protobuf:"varint,5,opt,name=PageNo,proto3" json:"PageNo,omitempty"`
+	PageSize              int32  `protobuf:"varint,6,opt,name=PageSize,proto3" json:"PageSize,omitempty"`
+}
+
+func (x *CountWhereRequest) Reset() {
+	*x = CountWhereRequest{}
+	if protoimpl.UnsafeEnabled {
+		mi := &file_v1_request_query_proto_msgTypes[4]
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		ms.StoreMessageInfo(mi)
+	}
+}
+
+func (x *CountWhereRequest) String() string {
+	return protoimpl.X.MessageStringOf(x)
+}
+
+func (*CountWhereRequest) ProtoMessage() {}
+
+func (x *CountWhereRequest) ProtoReflect() protoreflect.Message {
+	mi := &file_v1_request_query_proto_msgTypes[4]
+	if protoimpl.UnsafeEnabled && x != nil {
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		if ms.LoadMessageInfo() == nil {
+			ms.StoreMessageInfo(mi)
+		}
+		return ms
+	}
+	return mi.MessageOf(x)
+}
+
+// Deprecated: Use CountWhereRequest.ProtoReflect.Descriptor instead.
+func (*CountWhereRequest) Descriptor() ([]byte, []int) {
+	return file_v1_request_query_proto_rawDescGZIP(), []int{4}
+}
+
+func (x *CountWhereRequest) GetDatabaseID() string {
+	if x != nil {
+		return x.DatabaseID
+	}
+	return ""
+}
+
+func (x *CountWhereRequest) GetTablePrefixWithSchema() string {
+	if x != nil {
+		return x.TablePrefixWithSchema
+	}
+	return ""
+}
+
+func (x *CountWhereRequest) GetVersion() string {
+	if x != nil {
+		return x.Version
+	}
+	return ""
+}
+
+func (x *CountWhereRequest) GetWhere() []byte {
+	if x != nil {
+		return x.Where
+	}
+	return nil
+}
+
+func (x *CountWhereRequest) GetPageNo() int32 {
+	if x != nil {
+		return x.PageNo
+	}
+	return 0
+}
+
+func (x *CountWhereRequest) GetPageSize() int32 {
+	if x != nil {
+		return x.PageSize
+	}
+	return 0
+}
+
+type CommonCountRequest struct {
+	state         protoimpl.MessageState
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
+
+	DatabaseID            string   `protobuf:"bytes,1,opt,name=DatabaseID,proto3" json:"DatabaseID,omitempty"`
+	TablePrefixWithSchema string   `protobuf:"bytes,2,opt,name=TablePrefixWithSchema,proto3" json:"TablePrefixWithSchema,omitempty"`
+	Version               string   `protobuf:"bytes,3,opt,name=Version,proto3" json:"Version,omitempty"`
+	Where                 []byte   `protobuf:"bytes,4,opt,name=Where,proto3" json:"Where,omitempty"`
+	Or                    []byte   `protobuf:"bytes,5,opt,name=Or,proto3" json:"Or,omitempty"`
+	GroupBy               []string `protobuf:"bytes,6,rep,name=GroupBy,proto3" json:"GroupBy,omitempty"`
+	Join                  string   `protobuf:"bytes,7,opt,name=Join,proto3" json:"Join,omitempty"`
+	Having                []byte   `protobuf:"bytes,8,opt,name=Having,proto3" json:"Having,omitempty"`
+	PageNo                int32    `protobuf:"varint,9,opt,name=PageNo,proto3" json:"PageNo,omitempty"`
+	PageSize              int32    `protobuf:"varint,10,opt,name=PageSize,proto3" json:"PageSize,omitempty"`
+}
+
+func (x *CommonCountRequest) Reset() {
+	*x = CommonCountRequest{}
+	if protoimpl.UnsafeEnabled {
+		mi := &file_v1_request_query_proto_msgTypes[5]
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		ms.StoreMessageInfo(mi)
+	}
+}
+
+func (x *CommonCountRequest) String() string {
+	return protoimpl.X.MessageStringOf(x)
+}
+
+func (*CommonCountRequest) ProtoMessage() {}
+
+func (x *CommonCountRequest) ProtoReflect() protoreflect.Message {
+	mi := &file_v1_request_query_proto_msgTypes[5]
+	if protoimpl.UnsafeEnabled && x != nil {
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		if ms.LoadMessageInfo() == nil {
+			ms.StoreMessageInfo(mi)
+		}
+		return ms
+	}
+	return mi.MessageOf(x)
+}
+
+// Deprecated: Use CommonCountRequest.ProtoReflect.Descriptor instead.
+func (*CommonCountRequest) Descriptor() ([]byte, []int) {
+	return file_v1_request_query_proto_rawDescGZIP(), []int{5}
+}
+
+func (x *CommonCountRequest) GetDatabaseID() string {
+	if x != nil {
+		return x.DatabaseID
+	}
+	return ""
+}
+
+func (x *CommonCountRequest) GetTablePrefixWithSchema() string {
+	if x != nil {
+		return x.TablePrefixWithSchema
+	}
+	return ""
+}
+
+func (x *CommonCountRequest) GetVersion() string {
+	if x != nil {
+		return x.Version
+	}
+	return ""
+}
+
+func (x *CommonCountRequest) GetWhere() []byte {
+	if x != nil {
+		return x.Where
+	}
+	return nil
+}
+
+func (x *CommonCountRequest) GetOr() []byte {
+	if x != nil {
+		return x.Or
+	}
+	return nil
+}
+
+func (x *CommonCountRequest) GetGroupBy() []string {
+	if x != nil {
+		return x.GroupBy
+	}
+	return nil
+}
+
+func (x *CommonCountRequest) GetJoin() string {
+	if x != nil {
+		return x.Join
+	}
+	return ""
+}
+
+func (x *CommonCountRequest) GetHaving() []byte {
+	if x != nil {
+		return x.Having
+	}
+	return nil
+}
+
+func (x *CommonCountRequest) GetPageNo() int32 {
+	if x != nil {
+		return x.PageNo
+	}
+	return 0
+}
+
+func (x *CommonCountRequest) GetPageSize() int32 {
+	if x != nil {
+		return x.PageSize
+	}
+	return 0
+}
+
+var File_v1_request_query_proto protoreflect.FileDescriptor
+
+var file_v1_request_query_proto_rawDesc = []byte{
+	0x0a, 0x16, 0x76, 0x31, 0x2f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2f, 0x71, 0x75, 0x65,
+	0x72, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x07, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73,
+	0x74, 0x1a, 0x36, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6d, 0x77,
+	0x69, 0x74, 0x6b, 0x6f, 0x77, 0x2f, 0x67, 0x6f, 0x2d, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2d, 0x76,
+	0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61,
+	0x74, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xa3, 0x02, 0x0a, 0x1d, 0x51, 0x75,
+	0x65, 0x72, 0x79, 0x42, 0x79, 0x57, 0x68, 0x65, 0x72, 0x65, 0x41, 0x6e, 0x64, 0x4f, 0x72, 0x64,
+	0x65, 0x72, 0x42, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x26, 0x0a, 0x0a, 0x44,
+	0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42,
+	0x06, 0xe2, 0xdf, 0x1f, 0x02, 0x58, 0x01, 0x52, 0x0a, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73,
+	0x65, 0x49, 0x44, 0x12, 0x3c, 0x0a, 0x15, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x50, 0x72, 0x65, 0x66,
+	0x69, 0x78, 0x57, 0x69, 0x74, 0x68, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x18, 0x02, 0x20, 0x01,
+	0x28, 0x09, 0x42, 0x06, 0xe2, 0xdf, 0x1f, 0x02, 0x58, 0x01, 0x52, 0x15, 0x54, 0x61, 0x62, 0x6c,
+	0x65, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x57, 0x69, 0x74, 0x68, 0x53, 0x63, 0x68, 0x65, 0x6d,
+	0x61, 0x12, 0x20, 0x0a, 0x07, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01,
+	0x28, 0x09, 0x42, 0x06, 0xe2, 0xdf, 0x1f, 0x02, 0x58, 0x01, 0x52, 0x07, 0x56, 0x65, 0x72, 0x73,
+	0x69, 0x6f, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x18, 0x04, 0x20,
+	0x01, 0x28, 0x09, 0x52, 0x06, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x57,
+	0x68, 0x65, 0x72, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x57, 0x68, 0x65, 0x72,
+	0x65, 0x12, 0x18, 0x0a, 0x07, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x42, 0x79, 0x18, 0x06, 0x20, 0x03,
+	0x28, 0x09, 0x52, 0x07, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x42, 0x79, 0x12, 0x16, 0x0a, 0x06, 0x50,
+	0x61, 0x67, 0x65, 0x4e, 0x6f, 0x18, 0x07, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x50, 0x61, 0x67,
+	0x65, 0x4e, 0x6f, 0x12, 0x1a, 0x0a, 0x08, 0x50, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x18,
+	0x08, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x50, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x22,
+	0xee, 0x02, 0x0a, 0x12, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52,
+	0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x26, 0x0a, 0x0a, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61,
+	0x73, 0x65, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x06, 0xe2, 0xdf, 0x1f, 0x02,
+	0x58, 0x01, 0x52, 0x0a, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x49, 0x44, 0x12, 0x3c,
+	0x0a, 0x15, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x57, 0x69, 0x74,
+	0x68, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x06, 0xe2,
+	0xdf, 0x1f, 0x02, 0x58, 0x01, 0x52, 0x15, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x50, 0x72, 0x65, 0x66,
+	0x69, 0x78, 0x57, 0x69, 0x74, 0x68, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x12, 0x20, 0x0a, 0x07,
+	0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x06, 0xe2,
+	0xdf, 0x1f, 0x02, 0x58, 0x01, 0x52, 0x07, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x16,
+	0x0a, 0x06, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06,
+	0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x57, 0x68, 0x65, 0x72, 0x65, 0x18,
+	0x05, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x57, 0x68, 0x65, 0x72, 0x65, 0x12, 0x18, 0x0a, 0x07,
+	0x4f, 0x72, 0x64, 0x65, 0x72, 0x42, 0x79, 0x18, 0x06, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x4f,
+	0x72, 0x64, 0x65, 0x72, 0x42, 0x79, 0x12, 0x0e, 0x0a, 0x02, 0x4f, 0x72, 0x18, 0x07, 0x20, 0x01,
+	0x28, 0x0c, 0x52, 0x02, 0x4f, 0x72, 0x12, 0x18, 0x0a, 0x07, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x42,
+	0x79, 0x18, 0x08, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x42, 0x79,
+	0x12, 0x12, 0x0a, 0x04, 0x4a, 0x6f, 0x69, 0x6e, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04,
+	0x4a, 0x6f, 0x69, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x48, 0x61, 0x76, 0x69, 0x6e, 0x67, 0x18, 0x0a,
+	0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, 0x48, 0x61, 0x76, 0x69, 0x6e, 0x67, 0x12, 0x16, 0x0a, 0x06,
+	0x50, 0x61, 0x67, 0x65, 0x4e, 0x6f, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x50, 0x61,
+	0x67, 0x65, 0x4e, 0x6f, 0x12, 0x1a, 0x0a, 0x08, 0x50, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65,
+	0x18, 0x0c, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x50, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65,
+	0x22, 0xde, 0x01, 0x0a, 0x12, 0x51, 0x75, 0x65, 0x72, 0x79, 0x42, 0x79, 0x4b, 0x65, 0x79, 0x73,
+	0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x26, 0x0a, 0x0a, 0x44, 0x61, 0x74, 0x61, 0x62,
+	0x61, 0x73, 0x65, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x06, 0xe2, 0xdf, 0x1f,
+	0x02, 0x58, 0x01, 0x52, 0x0a, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x49, 0x44, 0x12,
+	0x3c, 0x0a, 0x15, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x57, 0x69,
+	0x74, 0x68, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x06,
+	0xe2, 0xdf, 0x1f, 0x02, 0x58, 0x01, 0x52, 0x15, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x50, 0x72, 0x65,
+	0x66, 0x69, 0x78, 0x57, 0x69, 0x74, 0x68, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x12, 0x20, 0x0a,
+	0x07, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x06,
+	0xe2, 0xdf, 0x1f, 0x02, 0x58, 0x01, 0x52, 0x07, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12,
+	0x16, 0x0a, 0x06, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52,
+	0x06, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x4b, 0x65, 0x79, 0x73, 0x18,
+	0x05, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x4b, 0x65, 0x79, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x57,
+	0x68, 0x65, 0x72, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x57, 0x68, 0x65, 0x72,
+	0x65, 0x22, 0xf4, 0x01, 0x0a, 0x18, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x51, 0x75, 0x65, 0x72,
+	0x79, 0x42, 0x79, 0x4b, 0x65, 0x79, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x26,
+	0x0a, 0x0a, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01,
+	0x28, 0x09, 0x42, 0x06, 0xe2, 0xdf, 0x1f, 0x02, 0x58, 0x01, 0x52, 0x0a, 0x44, 0x61, 0x74, 0x61,
+	0x62, 0x61, 0x73, 0x65, 0x49, 0x44, 0x12, 0x3c, 0x0a, 0x15, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x50,
+	0x72, 0x65, 0x66, 0x69, 0x78, 0x57, 0x69, 0x74, 0x68, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x18,
+	0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x06, 0xe2, 0xdf, 0x1f, 0x02, 0x58, 0x01, 0x52, 0x15, 0x54,
+	0x61, 0x62, 0x6c, 0x65, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x57, 0x69, 0x74, 0x68, 0x53, 0x63,
+	0x68, 0x65, 0x6d, 0x61, 0x12, 0x20, 0x0a, 0x07, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18,
+	0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x06, 0xe2, 0xdf, 0x1f, 0x02, 0x58, 0x01, 0x52, 0x07, 0x56,
+	0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74,
+	0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x12, 0x12,
+	0x0a, 0x04, 0x4b, 0x65, 0x79, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x4b, 0x65,
+	0x79, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x57, 0x68, 0x65, 0x72, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28,
+	0x0c, 0x52, 0x05, 0x57, 0x68, 0x65, 0x72, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x4f, 0x72, 0x18, 0x07,
+	0x20, 0x01, 0x28, 0x0c, 0x52, 0x02, 0x4f, 0x72, 0x22, 0xe5, 0x01, 0x0a, 0x11, 0x43, 0x6f, 0x75,
+	0x6e, 0x74, 0x57, 0x68, 0x65, 0x72, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x26,
+	0x0a, 0x0a, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01,
+	0x28, 0x09, 0x42, 0x06, 0xe2, 0xdf, 0x1f, 0x02, 0x58, 0x01, 0x52, 0x0a, 0x44, 0x61, 0x74, 0x61,
+	0x62, 0x61, 0x73, 0x65, 0x49, 0x44, 0x12, 0x3c, 0x0a, 0x15, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x50,
+	0x72, 0x65, 0x66, 0x69, 0x78, 0x57, 0x69, 0x74, 0x68, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x18,
+	0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x06, 0xe2, 0xdf, 0x1f, 0x02, 0x58, 0x01, 0x52, 0x15, 0x54,
+	0x61, 0x62, 0x6c, 0x65, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x57, 0x69, 0x74, 0x68, 0x53, 0x63,
+	0x68, 0x65, 0x6d, 0x61, 0x12, 0x20, 0x0a, 0x07, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18,
+	0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x06, 0xe2, 0xdf, 0x1f, 0x02, 0x58, 0x01, 0x52, 0x07, 0x56,
+	0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x14, 0x0a, 0x05, 0x57, 0x68, 0x65, 0x72, 0x65, 0x18,
+	0x04, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x57, 0x68, 0x65, 0x72, 0x65, 0x12, 0x16, 0x0a, 0x06,
+	0x50, 0x61, 0x67, 0x65, 0x4e, 0x6f, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x50, 0x61,
+	0x67, 0x65, 0x4e, 0x6f, 0x12, 0x1a, 0x0a, 0x08, 0x50, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65,
+	0x18, 0x06, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x50, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65,
+	0x22, 0xbc, 0x02, 0x0a, 0x12, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x43, 0x6f, 0x75, 0x6e, 0x74,
+	0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x26, 0x0a, 0x0a, 0x44, 0x61, 0x74, 0x61, 0x62,
+	0x61, 0x73, 0x65, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x06, 0xe2, 0xdf, 0x1f,
+	0x02, 0x58, 0x01, 0x52, 0x0a, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x49, 0x44, 0x12,
+	0x3c, 0x0a, 0x15, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x57, 0x69,
+	0x74, 0x68, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x06,
+	0xe2, 0xdf, 0x1f, 0x02, 0x58, 0x01, 0x52, 0x15, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x50, 0x72, 0x65,
+	0x66, 0x69, 0x78, 0x57, 0x69, 0x74, 0x68, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x12, 0x20, 0x0a,
+	0x07, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x06,
+	0xe2, 0xdf, 0x1f, 0x02, 0x58, 0x01, 0x52, 0x07, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12,
+	0x14, 0x0a, 0x05, 0x57, 0x68, 0x65, 0x72, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05,
+	0x57, 0x68, 0x65, 0x72, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x4f, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28,
+	0x0c, 0x52, 0x02, 0x4f, 0x72, 0x12, 0x18, 0x0a, 0x07, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x42, 0x79,
+	0x18, 0x06, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x42, 0x79, 0x12,
+	0x12, 0x0a, 0x04, 0x4a, 0x6f, 0x69, 0x6e, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x4a,
+	0x6f, 0x69, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x48, 0x61, 0x76, 0x69, 0x6e, 0x67, 0x18, 0x08, 0x20,
+	0x01, 0x28, 0x0c, 0x52, 0x06, 0x48, 0x61, 0x76, 0x69, 0x6e, 0x67, 0x12, 0x16, 0x0a, 0x06, 0x50,
+	0x61, 0x67, 0x65, 0x4e, 0x6f, 0x18, 0x09, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x50, 0x61, 0x67,
+	0x65, 0x4e, 0x6f, 0x12, 0x1a, 0x0a, 0x08, 0x50, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x18,
+	0x0a, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x50, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x42,
+	0x20, 0x5a, 0x1e, 0x64, 0x70, 0x73, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x5f,
+	0x61, 0x70, 0x69, 0x2f, 0x70, 0x62, 0x2f, 0x76, 0x31, 0x2f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73,
+	0x74, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
+}
+
+var (
+	file_v1_request_query_proto_rawDescOnce sync.Once
+	file_v1_request_query_proto_rawDescData = file_v1_request_query_proto_rawDesc
+)
+
+func file_v1_request_query_proto_rawDescGZIP() []byte {
+	file_v1_request_query_proto_rawDescOnce.Do(func() {
+		file_v1_request_query_proto_rawDescData = protoimpl.X.CompressGZIP(file_v1_request_query_proto_rawDescData)
+	})
+	return file_v1_request_query_proto_rawDescData
+}
+
+var file_v1_request_query_proto_msgTypes = make([]protoimpl.MessageInfo, 6)
+var file_v1_request_query_proto_goTypes = []interface{}{
+	(*QueryByWhereAndOrderByRequest)(nil), // 0: request.QueryByWhereAndOrderByRequest
+	(*CommonQueryRequest)(nil),            // 1: request.CommonQueryRequest
+	(*QueryByKeysRequest)(nil),            // 2: request.QueryByKeysRequest
+	(*CommonQueryByKeysRequest)(nil),      // 3: request.CommonQueryByKeysRequest
+	(*CountWhereRequest)(nil),             // 4: request.CountWhereRequest
+	(*CommonCountRequest)(nil),            // 5: request.CommonCountRequest
+}
+var file_v1_request_query_proto_depIdxs = []int32{
+	0, // [0:0] is the sub-list for method output_type
+	0, // [0:0] is the sub-list for method input_type
+	0, // [0:0] is the sub-list for extension type_name
+	0, // [0:0] is the sub-list for extension extendee
+	0, // [0:0] is the sub-list for field type_name
+}
+
+func init() { file_v1_request_query_proto_init() }
+func file_v1_request_query_proto_init() {
+	if File_v1_request_query_proto != nil {
+		return
+	}
+	if !protoimpl.UnsafeEnabled {
+		file_v1_request_query_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*QueryByWhereAndOrderByRequest); i {
+			case 0:
+				return &v.state
+			case 1:
+				return &v.sizeCache
+			case 2:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_v1_request_query_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*CommonQueryRequest); i {
+			case 0:
+				return &v.state
+			case 1:
+				return &v.sizeCache
+			case 2:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_v1_request_query_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*QueryByKeysRequest); i {
+			case 0:
+				return &v.state
+			case 1:
+				return &v.sizeCache
+			case 2:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_v1_request_query_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*CommonQueryByKeysRequest); i {
+			case 0:
+				return &v.state
+			case 1:
+				return &v.sizeCache
+			case 2:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_v1_request_query_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*CountWhereRequest); i {
+			case 0:
+				return &v.state
+			case 1:
+				return &v.sizeCache
+			case 2:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_v1_request_query_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*CommonCountRequest); i {
+			case 0:
+				return &v.state
+			case 1:
+				return &v.sizeCache
+			case 2:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+	}
+	type x struct{}
+	out := protoimpl.TypeBuilder{
+		File: protoimpl.DescBuilder{
+			GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
+			RawDescriptor: file_v1_request_query_proto_rawDesc,
+			NumEnums:      0,
+			NumMessages:   6,
+			NumExtensions: 0,
+			NumServices:   0,
+		},
+		GoTypes:           file_v1_request_query_proto_goTypes,
+		DependencyIndexes: file_v1_request_query_proto_depIdxs,
+		MessageInfos:      file_v1_request_query_proto_msgTypes,
+	}.Build()
+	File_v1_request_query_proto = out.File
+	file_v1_request_query_proto_rawDesc = nil
+	file_v1_request_query_proto_goTypes = nil
+	file_v1_request_query_proto_depIdxs = nil
+}

+ 90 - 0
pb/v1/request/query.validator.pb.go

@@ -0,0 +1,90 @@
+// Code generated by protoc-gen-gogo. DO NOT EDIT.
+// source: v1/request/query.proto
+
+package request
+
+import (
+	fmt "fmt"
+	math "math"
+	proto "github.com/golang/protobuf/proto"
+	_ "github.com/mwitkow/go-proto-validators"
+	github_com_mwitkow_go_proto_validators "github.com/mwitkow/go-proto-validators"
+)
+
+// Reference imports to suppress errors if they are not otherwise used.
+var _ = proto.Marshal
+var _ = fmt.Errorf
+var _ = math.Inf
+
+func (this *QueryByWhereAndOrderByRequest) Validate() error {
+	if this.DatabaseID == "" {
+		return github_com_mwitkow_go_proto_validators.FieldError("DatabaseID", fmt.Errorf(`value '%v' must not be an empty string`, this.DatabaseID))
+	}
+	if this.TablePrefixWithSchema == "" {
+		return github_com_mwitkow_go_proto_validators.FieldError("TablePrefixWithSchema", fmt.Errorf(`value '%v' must not be an empty string`, this.TablePrefixWithSchema))
+	}
+	if this.Version == "" {
+		return github_com_mwitkow_go_proto_validators.FieldError("Version", fmt.Errorf(`value '%v' must not be an empty string`, this.Version))
+	}
+	return nil
+}
+func (this *CommonQueryRequest) Validate() error {
+	if this.DatabaseID == "" {
+		return github_com_mwitkow_go_proto_validators.FieldError("DatabaseID", fmt.Errorf(`value '%v' must not be an empty string`, this.DatabaseID))
+	}
+	if this.TablePrefixWithSchema == "" {
+		return github_com_mwitkow_go_proto_validators.FieldError("TablePrefixWithSchema", fmt.Errorf(`value '%v' must not be an empty string`, this.TablePrefixWithSchema))
+	}
+	if this.Version == "" {
+		return github_com_mwitkow_go_proto_validators.FieldError("Version", fmt.Errorf(`value '%v' must not be an empty string`, this.Version))
+	}
+	return nil
+}
+func (this *QueryByKeysRequest) Validate() error {
+	if this.DatabaseID == "" {
+		return github_com_mwitkow_go_proto_validators.FieldError("DatabaseID", fmt.Errorf(`value '%v' must not be an empty string`, this.DatabaseID))
+	}
+	if this.TablePrefixWithSchema == "" {
+		return github_com_mwitkow_go_proto_validators.FieldError("TablePrefixWithSchema", fmt.Errorf(`value '%v' must not be an empty string`, this.TablePrefixWithSchema))
+	}
+	if this.Version == "" {
+		return github_com_mwitkow_go_proto_validators.FieldError("Version", fmt.Errorf(`value '%v' must not be an empty string`, this.Version))
+	}
+	return nil
+}
+func (this *CommonQueryByKeysRequest) Validate() error {
+	if this.DatabaseID == "" {
+		return github_com_mwitkow_go_proto_validators.FieldError("DatabaseID", fmt.Errorf(`value '%v' must not be an empty string`, this.DatabaseID))
+	}
+	if this.TablePrefixWithSchema == "" {
+		return github_com_mwitkow_go_proto_validators.FieldError("TablePrefixWithSchema", fmt.Errorf(`value '%v' must not be an empty string`, this.TablePrefixWithSchema))
+	}
+	if this.Version == "" {
+		return github_com_mwitkow_go_proto_validators.FieldError("Version", fmt.Errorf(`value '%v' must not be an empty string`, this.Version))
+	}
+	return nil
+}
+func (this *CountWhereRequest) Validate() error {
+	if this.DatabaseID == "" {
+		return github_com_mwitkow_go_proto_validators.FieldError("DatabaseID", fmt.Errorf(`value '%v' must not be an empty string`, this.DatabaseID))
+	}
+	if this.TablePrefixWithSchema == "" {
+		return github_com_mwitkow_go_proto_validators.FieldError("TablePrefixWithSchema", fmt.Errorf(`value '%v' must not be an empty string`, this.TablePrefixWithSchema))
+	}
+	if this.Version == "" {
+		return github_com_mwitkow_go_proto_validators.FieldError("Version", fmt.Errorf(`value '%v' must not be an empty string`, this.Version))
+	}
+	return nil
+}
+func (this *CommonCountRequest) Validate() error {
+	if this.DatabaseID == "" {
+		return github_com_mwitkow_go_proto_validators.FieldError("DatabaseID", fmt.Errorf(`value '%v' must not be an empty string`, this.DatabaseID))
+	}
+	if this.TablePrefixWithSchema == "" {
+		return github_com_mwitkow_go_proto_validators.FieldError("TablePrefixWithSchema", fmt.Errorf(`value '%v' must not be an empty string`, this.TablePrefixWithSchema))
+	}
+	if this.Version == "" {
+		return github_com_mwitkow_go_proto_validators.FieldError("Version", fmt.Errorf(`value '%v' must not be an empty string`, this.Version))
+	}
+	return nil
+}

+ 145 - 0
pb/v1/response/command.pb.go

@@ -0,0 +1,145 @@
+// Code generated by protoc-gen-go. DO NOT EDIT.
+// versions:
+// 	protoc-gen-go v1.28.1
+// 	protoc        v3.12.4
+// source: v1/response/command.proto
+
+package response
+
+import (
+	protoreflect "google.golang.org/protobuf/reflect/protoreflect"
+	protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+	reflect "reflect"
+	sync "sync"
+)
+
+const (
+	// Verify that this generated code is sufficiently up-to-date.
+	_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
+	// Verify that runtime/protoimpl is sufficiently up-to-date.
+	_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
+)
+
+type CommandStatementResponse struct {
+	state         protoimpl.MessageState
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
+
+	Statement string `protobuf:"bytes,1,opt,name=Statement,proto3" json:"Statement,omitempty"`
+}
+
+func (x *CommandStatementResponse) Reset() {
+	*x = CommandStatementResponse{}
+	if protoimpl.UnsafeEnabled {
+		mi := &file_v1_response_command_proto_msgTypes[0]
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		ms.StoreMessageInfo(mi)
+	}
+}
+
+func (x *CommandStatementResponse) String() string {
+	return protoimpl.X.MessageStringOf(x)
+}
+
+func (*CommandStatementResponse) ProtoMessage() {}
+
+func (x *CommandStatementResponse) ProtoReflect() protoreflect.Message {
+	mi := &file_v1_response_command_proto_msgTypes[0]
+	if protoimpl.UnsafeEnabled && x != nil {
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		if ms.LoadMessageInfo() == nil {
+			ms.StoreMessageInfo(mi)
+		}
+		return ms
+	}
+	return mi.MessageOf(x)
+}
+
+// Deprecated: Use CommandStatementResponse.ProtoReflect.Descriptor instead.
+func (*CommandStatementResponse) Descriptor() ([]byte, []int) {
+	return file_v1_response_command_proto_rawDescGZIP(), []int{0}
+}
+
+func (x *CommandStatementResponse) GetStatement() string {
+	if x != nil {
+		return x.Statement
+	}
+	return ""
+}
+
+var File_v1_response_command_proto protoreflect.FileDescriptor
+
+var file_v1_response_command_proto_rawDesc = []byte{
+	0x0a, 0x19, 0x76, 0x31, 0x2f, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2f, 0x63, 0x6f,
+	0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x08, 0x72, 0x65, 0x73,
+	0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x38, 0x0a, 0x18, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64,
+	0x53, 0x74, 0x61, 0x74, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
+	0x65, 0x12, 0x1c, 0x0a, 0x09, 0x53, 0x74, 0x61, 0x74, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x01,
+	0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x53, 0x74, 0x61, 0x74, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x42,
+	0x21, 0x5a, 0x1f, 0x64, 0x70, 0x73, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x5f,
+	0x61, 0x70, 0x69, 0x2f, 0x70, 0x62, 0x2f, 0x76, 0x31, 0x2f, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e,
+	0x73, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
+}
+
+var (
+	file_v1_response_command_proto_rawDescOnce sync.Once
+	file_v1_response_command_proto_rawDescData = file_v1_response_command_proto_rawDesc
+)
+
+func file_v1_response_command_proto_rawDescGZIP() []byte {
+	file_v1_response_command_proto_rawDescOnce.Do(func() {
+		file_v1_response_command_proto_rawDescData = protoimpl.X.CompressGZIP(file_v1_response_command_proto_rawDescData)
+	})
+	return file_v1_response_command_proto_rawDescData
+}
+
+var file_v1_response_command_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
+var file_v1_response_command_proto_goTypes = []interface{}{
+	(*CommandStatementResponse)(nil), // 0: response.CommandStatementResponse
+}
+var file_v1_response_command_proto_depIdxs = []int32{
+	0, // [0:0] is the sub-list for method output_type
+	0, // [0:0] is the sub-list for method input_type
+	0, // [0:0] is the sub-list for extension type_name
+	0, // [0:0] is the sub-list for extension extendee
+	0, // [0:0] is the sub-list for field type_name
+}
+
+func init() { file_v1_response_command_proto_init() }
+func file_v1_response_command_proto_init() {
+	if File_v1_response_command_proto != nil {
+		return
+	}
+	if !protoimpl.UnsafeEnabled {
+		file_v1_response_command_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*CommandStatementResponse); i {
+			case 0:
+				return &v.state
+			case 1:
+				return &v.sizeCache
+			case 2:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+	}
+	type x struct{}
+	out := protoimpl.TypeBuilder{
+		File: protoimpl.DescBuilder{
+			GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
+			RawDescriptor: file_v1_response_command_proto_rawDesc,
+			NumEnums:      0,
+			NumMessages:   1,
+			NumExtensions: 0,
+			NumServices:   0,
+		},
+		GoTypes:           file_v1_response_command_proto_goTypes,
+		DependencyIndexes: file_v1_response_command_proto_depIdxs,
+		MessageInfos:      file_v1_response_command_proto_msgTypes,
+	}.Build()
+	File_v1_response_command_proto = out.File
+	file_v1_response_command_proto_rawDesc = nil
+	file_v1_response_command_proto_goTypes = nil
+	file_v1_response_command_proto_depIdxs = nil
+}

+ 635 - 0
pb/v1/response/query.pb.go

@@ -0,0 +1,635 @@
+// Code generated by protoc-gen-go. DO NOT EDIT.
+// versions:
+// 	protoc-gen-go v1.28.1
+// 	protoc        v3.12.4
+// source: v1/response/query.proto
+
+package response
+
+import (
+	protoreflect "google.golang.org/protobuf/reflect/protoreflect"
+	protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+	reflect "reflect"
+	sync "sync"
+)
+
+const (
+	// Verify that this generated code is sufficiently up-to-date.
+	_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
+	// Verify that runtime/protoimpl is sufficiently up-to-date.
+	_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
+)
+
+type QueryResponse struct {
+	state         protoimpl.MessageState
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
+
+	Statement  string      `protobuf:"bytes,1,opt,name=Statement,proto3" json:"Statement,omitempty"`
+	Infos      []*InfoData `protobuf:"bytes,2,rep,name=Infos,proto3" json:"Infos,omitempty"`
+	TotalCount int64       `protobuf:"varint,3,opt,name=TotalCount,proto3" json:"TotalCount,omitempty"`
+	PageNo     int32       `protobuf:"varint,4,opt,name=PageNo,proto3" json:"PageNo,omitempty"`
+}
+
+func (x *QueryResponse) Reset() {
+	*x = QueryResponse{}
+	if protoimpl.UnsafeEnabled {
+		mi := &file_v1_response_query_proto_msgTypes[0]
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		ms.StoreMessageInfo(mi)
+	}
+}
+
+func (x *QueryResponse) String() string {
+	return protoimpl.X.MessageStringOf(x)
+}
+
+func (*QueryResponse) ProtoMessage() {}
+
+func (x *QueryResponse) ProtoReflect() protoreflect.Message {
+	mi := &file_v1_response_query_proto_msgTypes[0]
+	if protoimpl.UnsafeEnabled && x != nil {
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		if ms.LoadMessageInfo() == nil {
+			ms.StoreMessageInfo(mi)
+		}
+		return ms
+	}
+	return mi.MessageOf(x)
+}
+
+// Deprecated: Use QueryResponse.ProtoReflect.Descriptor instead.
+func (*QueryResponse) Descriptor() ([]byte, []int) {
+	return file_v1_response_query_proto_rawDescGZIP(), []int{0}
+}
+
+func (x *QueryResponse) GetStatement() string {
+	if x != nil {
+		return x.Statement
+	}
+	return ""
+}
+
+func (x *QueryResponse) GetInfos() []*InfoData {
+	if x != nil {
+		return x.Infos
+	}
+	return nil
+}
+
+func (x *QueryResponse) GetTotalCount() int64 {
+	if x != nil {
+		return x.TotalCount
+	}
+	return 0
+}
+
+func (x *QueryResponse) GetPageNo() int32 {
+	if x != nil {
+		return x.PageNo
+	}
+	return 0
+}
+
+type QueryByKeysResponse struct {
+	state         protoimpl.MessageState
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
+
+	Statement string    `protobuf:"bytes,1,opt,name=Statement,proto3" json:"Statement,omitempty"`
+	Info      *InfoData `protobuf:"bytes,2,opt,name=Info,proto3" json:"Info,omitempty"`
+}
+
+func (x *QueryByKeysResponse) Reset() {
+	*x = QueryByKeysResponse{}
+	if protoimpl.UnsafeEnabled {
+		mi := &file_v1_response_query_proto_msgTypes[1]
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		ms.StoreMessageInfo(mi)
+	}
+}
+
+func (x *QueryByKeysResponse) String() string {
+	return protoimpl.X.MessageStringOf(x)
+}
+
+func (*QueryByKeysResponse) ProtoMessage() {}
+
+func (x *QueryByKeysResponse) ProtoReflect() protoreflect.Message {
+	mi := &file_v1_response_query_proto_msgTypes[1]
+	if protoimpl.UnsafeEnabled && x != nil {
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		if ms.LoadMessageInfo() == nil {
+			ms.StoreMessageInfo(mi)
+		}
+		return ms
+	}
+	return mi.MessageOf(x)
+}
+
+// Deprecated: Use QueryByKeysResponse.ProtoReflect.Descriptor instead.
+func (*QueryByKeysResponse) Descriptor() ([]byte, []int) {
+	return file_v1_response_query_proto_rawDescGZIP(), []int{1}
+}
+
+func (x *QueryByKeysResponse) GetStatement() string {
+	if x != nil {
+		return x.Statement
+	}
+	return ""
+}
+
+func (x *QueryByKeysResponse) GetInfo() *InfoData {
+	if x != nil {
+		return x.Info
+	}
+	return nil
+}
+
+type CountResponse struct {
+	state         protoimpl.MessageState
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
+
+	Statement string `protobuf:"bytes,1,opt,name=Statement,proto3" json:"Statement,omitempty"`
+	Count     int64  `protobuf:"varint,2,opt,name=Count,proto3" json:"Count,omitempty"`
+}
+
+func (x *CountResponse) Reset() {
+	*x = CountResponse{}
+	if protoimpl.UnsafeEnabled {
+		mi := &file_v1_response_query_proto_msgTypes[2]
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		ms.StoreMessageInfo(mi)
+	}
+}
+
+func (x *CountResponse) String() string {
+	return protoimpl.X.MessageStringOf(x)
+}
+
+func (*CountResponse) ProtoMessage() {}
+
+func (x *CountResponse) ProtoReflect() protoreflect.Message {
+	mi := &file_v1_response_query_proto_msgTypes[2]
+	if protoimpl.UnsafeEnabled && x != nil {
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		if ms.LoadMessageInfo() == nil {
+			ms.StoreMessageInfo(mi)
+		}
+		return ms
+	}
+	return mi.MessageOf(x)
+}
+
+// Deprecated: Use CountResponse.ProtoReflect.Descriptor instead.
+func (*CountResponse) Descriptor() ([]byte, []int) {
+	return file_v1_response_query_proto_rawDescGZIP(), []int{2}
+}
+
+func (x *CountResponse) GetStatement() string {
+	if x != nil {
+		return x.Statement
+	}
+	return ""
+}
+
+func (x *CountResponse) GetCount() int64 {
+	if x != nil {
+		return x.Count
+	}
+	return 0
+}
+
+type InfoData struct {
+	state         protoimpl.MessageState
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
+
+	Columns []*Column `protobuf:"bytes,1,rep,name=Columns,proto3" json:"Columns,omitempty"`
+}
+
+func (x *InfoData) Reset() {
+	*x = InfoData{}
+	if protoimpl.UnsafeEnabled {
+		mi := &file_v1_response_query_proto_msgTypes[3]
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		ms.StoreMessageInfo(mi)
+	}
+}
+
+func (x *InfoData) String() string {
+	return protoimpl.X.MessageStringOf(x)
+}
+
+func (*InfoData) ProtoMessage() {}
+
+func (x *InfoData) ProtoReflect() protoreflect.Message {
+	mi := &file_v1_response_query_proto_msgTypes[3]
+	if protoimpl.UnsafeEnabled && x != nil {
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		if ms.LoadMessageInfo() == nil {
+			ms.StoreMessageInfo(mi)
+		}
+		return ms
+	}
+	return mi.MessageOf(x)
+}
+
+// Deprecated: Use InfoData.ProtoReflect.Descriptor instead.
+func (*InfoData) Descriptor() ([]byte, []int) {
+	return file_v1_response_query_proto_rawDescGZIP(), []int{3}
+}
+
+func (x *InfoData) GetColumns() []*Column {
+	if x != nil {
+		return x.Columns
+	}
+	return nil
+}
+
+type Column struct {
+	state         protoimpl.MessageState
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
+
+	Name  string       `protobuf:"bytes,1,opt,name=Name,proto3" json:"Name,omitempty"`
+	Value *ColumnValue `protobuf:"bytes,2,opt,name=Value,proto3" json:"Value,omitempty"`
+}
+
+func (x *Column) Reset() {
+	*x = Column{}
+	if protoimpl.UnsafeEnabled {
+		mi := &file_v1_response_query_proto_msgTypes[4]
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		ms.StoreMessageInfo(mi)
+	}
+}
+
+func (x *Column) String() string {
+	return protoimpl.X.MessageStringOf(x)
+}
+
+func (*Column) ProtoMessage() {}
+
+func (x *Column) ProtoReflect() protoreflect.Message {
+	mi := &file_v1_response_query_proto_msgTypes[4]
+	if protoimpl.UnsafeEnabled && x != nil {
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		if ms.LoadMessageInfo() == nil {
+			ms.StoreMessageInfo(mi)
+		}
+		return ms
+	}
+	return mi.MessageOf(x)
+}
+
+// Deprecated: Use Column.ProtoReflect.Descriptor instead.
+func (*Column) Descriptor() ([]byte, []int) {
+	return file_v1_response_query_proto_rawDescGZIP(), []int{4}
+}
+
+func (x *Column) GetName() string {
+	if x != nil {
+		return x.Name
+	}
+	return ""
+}
+
+func (x *Column) GetValue() *ColumnValue {
+	if x != nil {
+		return x.Value
+	}
+	return nil
+}
+
+type ColumnValue struct {
+	state         protoimpl.MessageState
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
+
+	Kind int32  `protobuf:"varint,1,opt,name=Kind,proto3" json:"Kind,omitempty"`
+	Type string `protobuf:"bytes,2,opt,name=Type,proto3" json:"Type,omitempty"`
+	// Types that are assignable to TypedValue:
+	//
+	//	*ColumnValue_StringValue
+	//	*ColumnValue_Uint32Value
+	//	*ColumnValue_Uint64Value
+	//	*ColumnValue_Float64Value
+	//	*ColumnValue_BoolValue
+	TypedValue isColumnValue_TypedValue `protobuf_oneof:"TypedValue"`
+}
+
+func (x *ColumnValue) Reset() {
+	*x = ColumnValue{}
+	if protoimpl.UnsafeEnabled {
+		mi := &file_v1_response_query_proto_msgTypes[5]
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		ms.StoreMessageInfo(mi)
+	}
+}
+
+func (x *ColumnValue) String() string {
+	return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ColumnValue) ProtoMessage() {}
+
+func (x *ColumnValue) ProtoReflect() protoreflect.Message {
+	mi := &file_v1_response_query_proto_msgTypes[5]
+	if protoimpl.UnsafeEnabled && x != nil {
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		if ms.LoadMessageInfo() == nil {
+			ms.StoreMessageInfo(mi)
+		}
+		return ms
+	}
+	return mi.MessageOf(x)
+}
+
+// Deprecated: Use ColumnValue.ProtoReflect.Descriptor instead.
+func (*ColumnValue) Descriptor() ([]byte, []int) {
+	return file_v1_response_query_proto_rawDescGZIP(), []int{5}
+}
+
+func (x *ColumnValue) GetKind() int32 {
+	if x != nil {
+		return x.Kind
+	}
+	return 0
+}
+
+func (x *ColumnValue) GetType() string {
+	if x != nil {
+		return x.Type
+	}
+	return ""
+}
+
+func (m *ColumnValue) GetTypedValue() isColumnValue_TypedValue {
+	if m != nil {
+		return m.TypedValue
+	}
+	return nil
+}
+
+func (x *ColumnValue) GetStringValue() string {
+	if x, ok := x.GetTypedValue().(*ColumnValue_StringValue); ok {
+		return x.StringValue
+	}
+	return ""
+}
+
+func (x *ColumnValue) GetUint32Value() uint32 {
+	if x, ok := x.GetTypedValue().(*ColumnValue_Uint32Value); ok {
+		return x.Uint32Value
+	}
+	return 0
+}
+
+func (x *ColumnValue) GetUint64Value() uint64 {
+	if x, ok := x.GetTypedValue().(*ColumnValue_Uint64Value); ok {
+		return x.Uint64Value
+	}
+	return 0
+}
+
+func (x *ColumnValue) GetFloat64Value() float64 {
+	if x, ok := x.GetTypedValue().(*ColumnValue_Float64Value); ok {
+		return x.Float64Value
+	}
+	return 0
+}
+
+func (x *ColumnValue) GetBoolValue() bool {
+	if x, ok := x.GetTypedValue().(*ColumnValue_BoolValue); ok {
+		return x.BoolValue
+	}
+	return false
+}
+
+type isColumnValue_TypedValue interface {
+	isColumnValue_TypedValue()
+}
+
+type ColumnValue_StringValue struct {
+	StringValue string `protobuf:"bytes,3,opt,name=StringValue,proto3,oneof"`
+}
+
+type ColumnValue_Uint32Value struct {
+	Uint32Value uint32 `protobuf:"varint,4,opt,name=Uint32Value,proto3,oneof"`
+}
+
+type ColumnValue_Uint64Value struct {
+	Uint64Value uint64 `protobuf:"varint,5,opt,name=Uint64Value,proto3,oneof"`
+}
+
+type ColumnValue_Float64Value struct {
+	Float64Value float64 `protobuf:"fixed64,6,opt,name=Float64Value,proto3,oneof"`
+}
+
+type ColumnValue_BoolValue struct {
+	BoolValue bool `protobuf:"varint,7,opt,name=BoolValue,proto3,oneof"`
+}
+
+func (*ColumnValue_StringValue) isColumnValue_TypedValue() {}
+
+func (*ColumnValue_Uint32Value) isColumnValue_TypedValue() {}
+
+func (*ColumnValue_Uint64Value) isColumnValue_TypedValue() {}
+
+func (*ColumnValue_Float64Value) isColumnValue_TypedValue() {}
+
+func (*ColumnValue_BoolValue) isColumnValue_TypedValue() {}
+
+var File_v1_response_query_proto protoreflect.FileDescriptor
+
+var file_v1_response_query_proto_rawDesc = []byte{
+	0x0a, 0x17, 0x76, 0x31, 0x2f, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2f, 0x71, 0x75,
+	0x65, 0x72, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f,
+	0x6e, 0x73, 0x65, 0x22, 0x8f, 0x01, 0x0a, 0x0d, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73,
+	0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x53, 0x74, 0x61, 0x74, 0x65, 0x6d, 0x65,
+	0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x53, 0x74, 0x61, 0x74, 0x65, 0x6d,
+	0x65, 0x6e, 0x74, 0x12, 0x28, 0x0a, 0x05, 0x49, 0x6e, 0x66, 0x6f, 0x73, 0x18, 0x02, 0x20, 0x03,
+	0x28, 0x0b, 0x32, 0x12, 0x2e, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x49, 0x6e,
+	0x66, 0x6f, 0x44, 0x61, 0x74, 0x61, 0x52, 0x05, 0x49, 0x6e, 0x66, 0x6f, 0x73, 0x12, 0x1e, 0x0a,
+	0x0a, 0x54, 0x6f, 0x74, 0x61, 0x6c, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28,
+	0x03, 0x52, 0x0a, 0x54, 0x6f, 0x74, 0x61, 0x6c, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x16, 0x0a,
+	0x06, 0x50, 0x61, 0x67, 0x65, 0x4e, 0x6f, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x50,
+	0x61, 0x67, 0x65, 0x4e, 0x6f, 0x22, 0x5b, 0x0a, 0x13, 0x51, 0x75, 0x65, 0x72, 0x79, 0x42, 0x79,
+	0x4b, 0x65, 0x79, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1c, 0x0a, 0x09,
+	0x53, 0x74, 0x61, 0x74, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52,
+	0x09, 0x53, 0x74, 0x61, 0x74, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x26, 0x0a, 0x04, 0x49, 0x6e,
+	0x66, 0x6f, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x72, 0x65, 0x73, 0x70, 0x6f,
+	0x6e, 0x73, 0x65, 0x2e, 0x49, 0x6e, 0x66, 0x6f, 0x44, 0x61, 0x74, 0x61, 0x52, 0x04, 0x49, 0x6e,
+	0x66, 0x6f, 0x22, 0x43, 0x0a, 0x0d, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f,
+	0x6e, 0x73, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x53, 0x74, 0x61, 0x74, 0x65, 0x6d, 0x65, 0x6e, 0x74,
+	0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x53, 0x74, 0x61, 0x74, 0x65, 0x6d, 0x65, 0x6e,
+	0x74, 0x12, 0x14, 0x0a, 0x05, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03,
+	0x52, 0x05, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x36, 0x0a, 0x08, 0x49, 0x6e, 0x66, 0x6f, 0x44,
+	0x61, 0x74, 0x61, 0x12, 0x2a, 0x0a, 0x07, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x73, 0x18, 0x01,
+	0x20, 0x03, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e,
+	0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x52, 0x07, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x73, 0x22,
+	0x49, 0x0a, 0x06, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x4e, 0x61, 0x6d,
+	0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x2b, 0x0a,
+	0x05, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x72,
+	0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x56, 0x61,
+	0x6c, 0x75, 0x65, 0x52, 0x05, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x22, 0xf5, 0x01, 0x0a, 0x0b, 0x43,
+	0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x4b, 0x69,
+	0x6e, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x4b, 0x69, 0x6e, 0x64, 0x12, 0x12,
+	0x0a, 0x04, 0x54, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x54, 0x79,
+	0x70, 0x65, 0x12, 0x22, 0x0a, 0x0b, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75,
+	0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0b, 0x53, 0x74, 0x72, 0x69, 0x6e,
+	0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x22, 0x0a, 0x0b, 0x55, 0x69, 0x6e, 0x74, 0x33, 0x32,
+	0x56, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x0b, 0x55,
+	0x69, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x22, 0x0a, 0x0b, 0x55, 0x69,
+	0x6e, 0x74, 0x36, 0x34, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x04, 0x48,
+	0x00, 0x52, 0x0b, 0x55, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x24,
+	0x0a, 0x0c, 0x46, 0x6c, 0x6f, 0x61, 0x74, 0x36, 0x34, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x06,
+	0x20, 0x01, 0x28, 0x01, 0x48, 0x00, 0x52, 0x0c, 0x46, 0x6c, 0x6f, 0x61, 0x74, 0x36, 0x34, 0x56,
+	0x61, 0x6c, 0x75, 0x65, 0x12, 0x1e, 0x0a, 0x09, 0x42, 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x75,
+	0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x48, 0x00, 0x52, 0x09, 0x42, 0x6f, 0x6f, 0x6c, 0x56,
+	0x61, 0x6c, 0x75, 0x65, 0x42, 0x0c, 0x0a, 0x0a, 0x54, 0x79, 0x70, 0x65, 0x64, 0x56, 0x61, 0x6c,
+	0x75, 0x65, 0x42, 0x21, 0x5a, 0x1f, 0x64, 0x70, 0x73, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x67, 0x72,
+	0x70, 0x63, 0x5f, 0x61, 0x70, 0x69, 0x2f, 0x70, 0x62, 0x2f, 0x76, 0x31, 0x2f, 0x72, 0x65, 0x73,
+	0x70, 0x6f, 0x6e, 0x73, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
+}
+
+var (
+	file_v1_response_query_proto_rawDescOnce sync.Once
+	file_v1_response_query_proto_rawDescData = file_v1_response_query_proto_rawDesc
+)
+
+func file_v1_response_query_proto_rawDescGZIP() []byte {
+	file_v1_response_query_proto_rawDescOnce.Do(func() {
+		file_v1_response_query_proto_rawDescData = protoimpl.X.CompressGZIP(file_v1_response_query_proto_rawDescData)
+	})
+	return file_v1_response_query_proto_rawDescData
+}
+
+var file_v1_response_query_proto_msgTypes = make([]protoimpl.MessageInfo, 6)
+var file_v1_response_query_proto_goTypes = []interface{}{
+	(*QueryResponse)(nil),       // 0: response.QueryResponse
+	(*QueryByKeysResponse)(nil), // 1: response.QueryByKeysResponse
+	(*CountResponse)(nil),       // 2: response.CountResponse
+	(*InfoData)(nil),            // 3: response.InfoData
+	(*Column)(nil),              // 4: response.Column
+	(*ColumnValue)(nil),         // 5: response.ColumnValue
+}
+var file_v1_response_query_proto_depIdxs = []int32{
+	3, // 0: response.QueryResponse.Infos:type_name -> response.InfoData
+	3, // 1: response.QueryByKeysResponse.Info:type_name -> response.InfoData
+	4, // 2: response.InfoData.Columns:type_name -> response.Column
+	5, // 3: response.Column.Value:type_name -> response.ColumnValue
+	4, // [4:4] is the sub-list for method output_type
+	4, // [4:4] is the sub-list for method input_type
+	4, // [4:4] is the sub-list for extension type_name
+	4, // [4:4] is the sub-list for extension extendee
+	0, // [0:4] is the sub-list for field type_name
+}
+
+func init() { file_v1_response_query_proto_init() }
+func file_v1_response_query_proto_init() {
+	if File_v1_response_query_proto != nil {
+		return
+	}
+	if !protoimpl.UnsafeEnabled {
+		file_v1_response_query_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*QueryResponse); i {
+			case 0:
+				return &v.state
+			case 1:
+				return &v.sizeCache
+			case 2:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_v1_response_query_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*QueryByKeysResponse); i {
+			case 0:
+				return &v.state
+			case 1:
+				return &v.sizeCache
+			case 2:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_v1_response_query_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*CountResponse); i {
+			case 0:
+				return &v.state
+			case 1:
+				return &v.sizeCache
+			case 2:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_v1_response_query_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*InfoData); i {
+			case 0:
+				return &v.state
+			case 1:
+				return &v.sizeCache
+			case 2:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_v1_response_query_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*Column); i {
+			case 0:
+				return &v.state
+			case 1:
+				return &v.sizeCache
+			case 2:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_v1_response_query_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*ColumnValue); i {
+			case 0:
+				return &v.state
+			case 1:
+				return &v.sizeCache
+			case 2:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+	}
+	file_v1_response_query_proto_msgTypes[5].OneofWrappers = []interface{}{
+		(*ColumnValue_StringValue)(nil),
+		(*ColumnValue_Uint32Value)(nil),
+		(*ColumnValue_Uint64Value)(nil),
+		(*ColumnValue_Float64Value)(nil),
+		(*ColumnValue_BoolValue)(nil),
+	}
+	type x struct{}
+	out := protoimpl.TypeBuilder{
+		File: protoimpl.DescBuilder{
+			GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
+			RawDescriptor: file_v1_response_query_proto_rawDesc,
+			NumEnums:      0,
+			NumMessages:   6,
+			NumExtensions: 0,
+			NumServices:   0,
+		},
+		GoTypes:           file_v1_response_query_proto_goTypes,
+		DependencyIndexes: file_v1_response_query_proto_depIdxs,
+		MessageInfos:      file_v1_response_query_proto_msgTypes,
+	}.Build()
+	File_v1_response_query_proto = out.File
+	file_v1_response_query_proto_rawDesc = nil
+	file_v1_response_query_proto_goTypes = nil
+	file_v1_response_query_proto_depIdxs = nil
+}

+ 5 - 0
ports/client.go

@@ -0,0 +1,5 @@
+package ports
+
+type Client interface {
+	AutoMigrate(request *AutoMigrateRequest) error
+}

+ 17 - 0
ports/client_request.go

@@ -0,0 +1,17 @@
+package ports
+
+type AutoMigrateRequest struct {
+	DatabaseID            string
+	TablePrefixWithSchema string
+	Version               string
+	Model                 AutoMigrateModel
+}
+
+type AutoMigrateModel struct {
+	Fields []AutoMigrateModelField `json:"fields"`
+}
+
+type AutoMigrateModelField struct {
+	Name string `json:"name"`
+	Tag  string `json:"tag"`
+}

+ 2 - 0
test/sql/database.sql

@@ -0,0 +1,2 @@
+INSERT INTO dps.database_events (version, key, operation, value, creator_id, created_time) VALUES ('v1', '2b78141779ee432295ca371b91c5cac7', 'create', '{"id": "2b78141779ee432295ca371b91c5cac7", "name": "0eb4f93d4064412f96c31da6d98c99ac", "config": "79d4onsS0v7psxES9HBEjJorrzBnXtubQ7zTAjSiCqCIN/dp1f4wnnDq/nHrvgS/IkrktNLJlPpyCj8ho0dveEjfTmxagSYGWw8TXAEpbYvYfZ7AdWvgst6rrvf9ewaVbxw/TqeA4fZX7/NSh8B/UFMu9h1ThCbEJSnZKHJQi+0pZZ5nmCzsmB7aQRdbUnBU", "create_user_id": "2d7a1914a5094c918a03ee71959dc72e", "last_event_time": "2024-01-10T19:07:56.545915333+08:00", "last_update_user_id": "2d7a1914a5094c918a03ee71959dc72e"}', '2d7a1914a5094c918a03ee71959dc72e', '2024-01-10 11:07:56.545915 +00:00');
+INSERT INTO dps.database_snaps_v1 (id, name, config, create_user_id, last_update_user_id, last_event_time) VALUES ('2b78141779ee432295ca371b91c5cac7', '0eb4f93d4064412f96c31da6d98c99ac', '79d4onsS0v7psxES9HBEjJorrzBnXtubQ7zTAjSiCqCIN/dp1f4wnnDq/nHrvgS/IkrktNLJlPpyCj8ho0dveEjfTmxagSYGWw8TXAEpbYvYfZ7AdWvgst6rrvf9ewaVbxw/TqeA4fZX7/NSh8B/UFMu9h1ThCbEJSnZKHJQi+0pZZ5nmCzsmB7aQRdbUnBU', '2d7a1914a5094c918a03ee71959dc72e', '2d7a1914a5094c918a03ee71959dc72e', '2024-01-10 11:07:56.545915 +00:00');

+ 30 - 0
test/v1/sdk.go

@@ -0,0 +1,30 @@
+package v1
+
+import (
+	"git.sxidc.com/service-supports/dps-sdk"
+	"git.sxidc.com/service-supports/dps-sdk/ports"
+	"testing"
+)
+
+func initClient(t *testing.T, address string) ports.Client {
+	client, err := dps.NewClient(address, "v1")
+	if err != nil {
+		t.Fatal(err)
+	}
+
+	return client
+}
+
+func destroyClient(t *testing.T) {
+	err := dps.DestroyClient("v1")
+	if err != nil {
+		t.Fatal(err)
+	}
+}
+
+func autoMigrate(t *testing.T, client ports.Client, req *ports.AutoMigrateRequest) {
+	err := client.AutoMigrate(req)
+	if err != nil {
+		t.Fatal(err)
+	}
+}

+ 14 - 0
test/v1/utils.go

@@ -0,0 +1,14 @@
+package v1
+
+import (
+	uuid "github.com/satori/go.uuid"
+	"strings"
+)
+
+func getUUID() string {
+	return uuid.NewV4().String()
+}
+
+func simpleUUID() string {
+	return strings.ReplaceAll(getUUID(), "-", "")
+}

+ 25 - 0
test/v1/v1_test.go

@@ -0,0 +1,25 @@
+package v1
+
+import (
+	"git.sxidc.com/service-supports/dps-sdk/ports"
+	"testing"
+)
+
+func TestAutoMigrate(t *testing.T) {
+	client := initClient(t, "localhost:30170")
+	defer destroyClient(t)
+
+	autoMigrate(t, client, &ports.AutoMigrateRequest{
+		DatabaseID:            "2b78141779ee432295ca371b91c5cac7",
+		TablePrefixWithSchema: "test." + simpleUUID()[0:8],
+		Version:               "v1",
+		Model: ports.AutoMigrateModel{
+			Fields: []ports.AutoMigrateModelField{
+				{Name: "ID", Tag: "gorm:\"primary_key;type:varchar(32);comment:id;\""},
+				{Name: "Name", Tag: "gorm:\"not null;type:varchar(128);comment:数据库名称;\""},
+				{Name: "Time", Tag: "gorm:\"not null;type:timestamp with time zone;comment:数据库时间;\""},
+				{Name: "TableNum", Tag: "gorm:\"not null;type:integer;comment:数据库表数量;\""},
+			},
+		},
+	})
+}