瀏覽代碼

修改sdk接口

yjp 4 月之前
父節點
當前提交
d8a84a5e94
共有 7 個文件被更改,包括 167 次插入160 次删除
  1. 0 12
      client/client.go
  2. 15 15
      client/client_query_request.go
  3. 0 7
      client/client_request_common.go
  4. 54 9
      dpsv1/client.go
  5. 8 8
      pb/v1/request/event_query.pb.go
  6. 78 77
      pb/v1/request/query.pb.go
  7. 12 32
      test/v1/v1_test.go

+ 0 - 12
client/client.go

@@ -10,18 +10,6 @@ func IsErrorDBRecordNotExist(err error) bool {
 	return strings.Contains(err.Error(), "记录不存在")
 }
 
-const (
-	CompareEqual               = "equal"
-	CompareLike                = "like"
-	CompareNot                 = "not"
-	CompareIn                  = "in"
-	CompareNotIn               = "notin"
-	CompareLessThan            = "lt"
-	CompareGreaterThan         = "gt"
-	CompareLessThanAndEqual    = "lte"
-	CompareGreaterThanAndEqual = "gte"
-)
-
 type Client interface {
 	AutoMigrate(request *AutoMigrateRequest) error
 	AutoMigrateBatch(request *AutoMigrateBatchRequest) error

+ 15 - 15
client/client_query_request.go

@@ -3,8 +3,8 @@ package client
 type QueryByWhereAndOrderByRequest struct {
 	TablePrefixWithSchema string
 	Version               string
-	Select                string
-	Where                 []ColumnCompare
+	Select                map[string][]any
+	Where                 map[string][]any
 	OrderBy               []string
 	PageNo                int
 	PageSize              int
@@ -13,13 +13,13 @@ type QueryByWhereAndOrderByRequest struct {
 type CommonQueryRequest struct {
 	TablePrefixWithSchema string
 	Version               string
-	Select                string
-	Where                 []ColumnCompare
+	Select                map[string][]any
+	Where                 map[string][]any
 	OrderBy               []string
-	Or                    []ColumnCompare
+	Or                    map[string][]any
 	GroupBy               []string
-	Join                  string
-	Having                []ColumnCompare
+	Joins                 map[string][]any
+	Having                map[string][]any
 	PageNo                int
 	PageSize              int
 }
@@ -27,29 +27,29 @@ type CommonQueryRequest struct {
 type QueryByKeysRequest struct {
 	TablePrefixWithSchema string
 	Version               string
-	Select                string
+	Select                map[string][]any
 	KeyValues             map[string]string
 }
 
 type CountWhereRequest struct {
 	TablePrefixWithSchema string
 	Version               string
-	Where                 []ColumnCompare
+	Where                 map[string][]any
 }
 
 type CommonCountRequest struct {
 	TablePrefixWithSchema string
 	Version               string
-	Where                 []ColumnCompare
-	Or                    []ColumnCompare
+	Where                 map[string][]any
+	Or                    map[string][]any
 	GroupBy               []string
-	Join                  string
-	Having                []ColumnCompare
+	Joins                 map[string][]any
+	Having                map[string][]any
 }
 
 type EventQueryByKeysRequest struct {
 	TablePrefixWithSchema string
-	Select                string
+	Select                map[string][]any
 	KeyValues             []string
 	PageNo                int
 	PageSize              int
@@ -57,7 +57,7 @@ type EventQueryByKeysRequest struct {
 
 type CommonEventQueryRequest struct {
 	TablePrefixWithSchema string
-	Select                string
+	Select                map[string][]any
 	KeyValues             []string
 	Version               string
 	Operation             string

+ 0 - 7
client/client_request_common.go

@@ -1,7 +0,0 @@
-package client
-
-type ColumnCompare struct {
-	Column  string `json:"column"`
-	Value   any    `json:"value"`
-	Compare string `json:"compare"`
-}

+ 54 - 9
dpsv1/client.go

@@ -266,6 +266,11 @@ func (c *Client) Replay(req *client.ReplayRequest) (string, error) {
 }
 
 func (c *Client) QueryByWhereAndOrderBy(req *client.QueryByWhereAndOrderByRequest) (string, []map[string]any, int64, error) {
+	selectJsonBytes, err := json.Marshal(req.Select)
+	if err != nil {
+		return "", nil, 0, err
+	}
+
 	whereJsonBytes, err := json.Marshal(req.Where)
 	if err != nil {
 		return "", nil, 0, err
@@ -275,7 +280,7 @@ func (c *Client) QueryByWhereAndOrderBy(req *client.QueryByWhereAndOrderByReques
 		DatabaseID:            c.databaseID,
 		TablePrefixWithSchema: req.TablePrefixWithSchema,
 		Version:               req.Version,
-		Select:                req.Select,
+		Select:                selectJsonBytes,
 		Where:                 whereJsonBytes,
 		OrderBy:               req.OrderBy,
 		PageNo:                int32(req.PageNo),
@@ -294,6 +299,11 @@ func (c *Client) QueryByWhereAndOrderBy(req *client.QueryByWhereAndOrderByReques
 }
 
 func (c *Client) CommonQuery(req *client.CommonQueryRequest) (string, []map[string]any, int64, error) {
+	selectJsonBytes, err := json.Marshal(req.Select)
+	if err != nil {
+		return "", nil, 0, err
+	}
+
 	whereJsonBytes, err := json.Marshal(req.Where)
 	if err != nil {
 		return "", nil, 0, err
@@ -304,6 +314,11 @@ func (c *Client) CommonQuery(req *client.CommonQueryRequest) (string, []map[stri
 		return "", nil, 0, err
 	}
 
+	joinsJsonBytes, err := json.Marshal(req.Joins)
+	if err != nil {
+		return "", nil, 0, err
+	}
+
 	havingJsonBytes, err := json.Marshal(req.Having)
 	if err != nil {
 		return "", nil, 0, err
@@ -313,12 +328,12 @@ func (c *Client) CommonQuery(req *client.CommonQueryRequest) (string, []map[stri
 		DatabaseID:            c.databaseID,
 		TablePrefixWithSchema: req.TablePrefixWithSchema,
 		Version:               req.Version,
-		Select:                req.Select,
+		Select:                selectJsonBytes,
 		Where:                 whereJsonBytes,
 		OrderBy:               req.OrderBy,
 		Or:                    orJsonBytes,
 		GroupBy:               req.GroupBy,
-		Join:                  req.Join,
+		Joins:                 joinsJsonBytes,
 		Having:                havingJsonBytes,
 		PageNo:                int32(req.PageNo),
 		PageSize:              int32(req.PageSize),
@@ -336,11 +351,16 @@ func (c *Client) CommonQuery(req *client.CommonQueryRequest) (string, []map[stri
 }
 
 func (c *Client) QueryByKeys(req *client.QueryByKeysRequest) (string, map[string]any, error) {
+	selectJsonBytes, err := json.Marshal(req.Select)
+	if err != nil {
+		return "", nil, err
+	}
+
 	reply, err := c.queryServiceClient.QueryByKeys(context.Background(), &request.QueryByKeysRequest{
 		DatabaseID:            c.databaseID,
 		TablePrefixWithSchema: req.TablePrefixWithSchema,
 		Version:               req.Version,
-		Select:                req.Select,
+		Select:                selectJsonBytes,
 		KeyValues:             req.KeyValues,
 	})
 	if err != nil {
@@ -385,6 +405,11 @@ func (c *Client) CommonCount(req *client.CommonCountRequest) (string, int64, err
 		return "", 0, err
 	}
 
+	joinsJsonBytes, err := json.Marshal(req.Joins)
+	if err != nil {
+		return "", 0, err
+	}
+
 	havingJsonBytes, err := json.Marshal(req.Having)
 	if err != nil {
 		return "", 0, err
@@ -397,7 +422,7 @@ func (c *Client) CommonCount(req *client.CommonCountRequest) (string, int64, err
 		Where:                 whereJsonBytes,
 		Or:                    orJsonBytes,
 		GroupBy:               req.GroupBy,
-		Join:                  req.Join,
+		Joins:                 joinsJsonBytes,
 		Having:                havingJsonBytes,
 	})
 	if err != nil {
@@ -408,10 +433,15 @@ func (c *Client) CommonCount(req *client.CommonCountRequest) (string, int64, err
 }
 
 func (c *Client) EventQueryByKeys(req *client.EventQueryByKeysRequest) (string, []client.EventInfo, int64, error) {
+	selectJsonBytes, err := json.Marshal(req.Select)
+	if err != nil {
+		return "", nil, 0, err
+	}
+
 	reply, err := c.eventQueryServiceClient.EventQueryByKeys(context.Background(), &request.EventQueryByKeysRequest{
 		DatabaseID:            c.databaseID,
 		TablePrefixWithSchema: req.TablePrefixWithSchema,
-		Select:                req.Select,
+		Select:                selectJsonBytes,
 		KeyValues:             req.KeyValues,
 		PageNo:                int32(req.PageNo),
 		PageSize:              int32(req.PageSize),
@@ -424,10 +454,15 @@ func (c *Client) EventQueryByKeys(req *client.EventQueryByKeysRequest) (string,
 }
 
 func (c *Client) CommonEventQuery(req *client.CommonEventQueryRequest) (string, []client.EventInfo, int64, error) {
+	selectJsonBytes, err := json.Marshal(req.Select)
+	if err != nil {
+		return "", nil, 0, err
+	}
+
 	reply, err := c.eventQueryServiceClient.CommonEventQuery(context.Background(), &request.CommonEventQueryRequest{
 		DatabaseID:            c.databaseID,
 		TablePrefixWithSchema: req.TablePrefixWithSchema,
-		Select:                req.Select,
+		Select:                selectJsonBytes,
 		KeyValues:             req.KeyValues,
 		Version:               req.Version,
 		Operation:             req.Operation,
@@ -476,10 +511,15 @@ func (c *Client) CommonCountEvent(req *client.CommonCountEventRequest) (string,
 }
 
 func (c *Client) EventHistoryQueryByKeys(req *client.EventQueryByKeysRequest) (string, []client.EventInfo, int64, error) {
+	selectJsonBytes, err := json.Marshal(req.Select)
+	if err != nil {
+		return "", nil, 0, err
+	}
+
 	reply, err := c.eventQueryServiceClient.EventHistoryQueryByKeys(context.Background(), &request.EventQueryByKeysRequest{
 		DatabaseID:            c.databaseID,
 		TablePrefixWithSchema: req.TablePrefixWithSchema,
-		Select:                req.Select,
+		Select:                selectJsonBytes,
 		KeyValues:             req.KeyValues,
 		PageNo:                int32(req.PageNo),
 		PageSize:              int32(req.PageSize),
@@ -492,10 +532,15 @@ func (c *Client) EventHistoryQueryByKeys(req *client.EventQueryByKeysRequest) (s
 }
 
 func (c *Client) CommonEventHistoryQuery(req *client.CommonEventQueryRequest) (string, []client.EventInfo, int64, error) {
+	selectJsonBytes, err := json.Marshal(req.Select)
+	if err != nil {
+		return "", nil, 0, err
+	}
+
 	reply, err := c.eventQueryServiceClient.CommonEventHistoryQuery(context.Background(), &request.CommonEventQueryRequest{
 		DatabaseID:            c.databaseID,
 		TablePrefixWithSchema: req.TablePrefixWithSchema,
-		Select:                req.Select,
+		Select:                selectJsonBytes,
 		KeyValues:             req.KeyValues,
 		Version:               req.Version,
 		Operation:             req.Operation,

+ 8 - 8
pb/v1/request/event_query.pb.go

@@ -28,7 +28,7 @@ type EventQueryByKeysRequest struct {
 
 	DatabaseID            string   `protobuf:"bytes,1,opt,name=DatabaseID,proto3" json:"DatabaseID,omitempty"`
 	TablePrefixWithSchema string   `protobuf:"bytes,2,opt,name=TablePrefixWithSchema,proto3" json:"TablePrefixWithSchema,omitempty"`
-	Select                string   `protobuf:"bytes,3,opt,name=Select,proto3" json:"Select,omitempty"`
+	Select                []byte   `protobuf:"bytes,3,opt,name=Select,proto3" json:"Select,omitempty"`
 	KeyValues             []string `protobuf:"bytes,4,rep,name=KeyValues,proto3" json:"KeyValues,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"`
@@ -80,11 +80,11 @@ func (x *EventQueryByKeysRequest) GetTablePrefixWithSchema() string {
 	return ""
 }
 
-func (x *EventQueryByKeysRequest) GetSelect() string {
+func (x *EventQueryByKeysRequest) GetSelect() []byte {
 	if x != nil {
 		return x.Select
 	}
-	return ""
+	return nil
 }
 
 func (x *EventQueryByKeysRequest) GetKeyValues() []string {
@@ -115,7 +115,7 @@ type CommonEventQueryRequest struct {
 
 	DatabaseID            string   `protobuf:"bytes,1,opt,name=DatabaseID,proto3" json:"DatabaseID,omitempty"`
 	TablePrefixWithSchema string   `protobuf:"bytes,2,opt,name=TablePrefixWithSchema,proto3" json:"TablePrefixWithSchema,omitempty"`
-	Select                string   `protobuf:"bytes,3,opt,name=Select,proto3" json:"Select,omitempty"`
+	Select                []byte   `protobuf:"bytes,3,opt,name=Select,proto3" json:"Select,omitempty"`
 	KeyValues             []string `protobuf:"bytes,4,rep,name=KeyValues,proto3" json:"KeyValues,omitempty"`
 	Version               string   `protobuf:"bytes,5,opt,name=Version,proto3" json:"Version,omitempty"`
 	Operation             string   `protobuf:"bytes,6,opt,name=Operation,proto3" json:"Operation,omitempty"`
@@ -172,11 +172,11 @@ func (x *CommonEventQueryRequest) GetTablePrefixWithSchema() string {
 	return ""
 }
 
-func (x *CommonEventQueryRequest) GetSelect() string {
+func (x *CommonEventQueryRequest) GetSelect() []byte {
 	if x != nil {
 		return x.Select
 	}
-	return ""
+	return nil
 }
 
 func (x *CommonEventQueryRequest) GetKeyValues() []string {
@@ -419,7 +419,7 @@ var file_v1_request_event_query_proto_rawDesc = []byte{
 	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, 0x16, 0x0a, 0x06, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28,
-	0x09, 0x52, 0x06, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x12, 0x24, 0x0a, 0x09, 0x4b, 0x65, 0x79,
+	0x0c, 0x52, 0x06, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x12, 0x24, 0x0a, 0x09, 0x4b, 0x65, 0x79,
 	0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x09, 0x42, 0x06, 0xe2, 0xdf,
 	0x1f, 0x02, 0x60, 0x01, 0x52, 0x09, 0x4b, 0x65, 0x79, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12,
 	0x16, 0x0a, 0x06, 0x50, 0x61, 0x67, 0x65, 0x4e, 0x6f, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52,
@@ -434,7 +434,7 @@ var file_v1_request_event_query_proto_rawDesc = []byte{
 	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, 0x16, 0x0a, 0x06, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x18,
-	0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x12, 0x1c, 0x0a,
+	0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x12, 0x1c, 0x0a,
 	0x09, 0x4b, 0x65, 0x79, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x09,
 	0x52, 0x09, 0x4b, 0x65, 0x79, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x56,
 	0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x56, 0x65,

+ 78 - 77
pb/v1/request/query.pb.go

@@ -29,7 +29,7 @@ type QueryByWhereAndOrderByRequest struct {
 	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"`
+	Select                []byte   `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"`
@@ -89,11 +89,11 @@ func (x *QueryByWhereAndOrderByRequest) GetVersion() string {
 	return ""
 }
 
-func (x *QueryByWhereAndOrderByRequest) GetSelect() string {
+func (x *QueryByWhereAndOrderByRequest) GetSelect() []byte {
 	if x != nil {
 		return x.Select
 	}
-	return ""
+	return nil
 }
 
 func (x *QueryByWhereAndOrderByRequest) GetWhere() []byte {
@@ -132,12 +132,12 @@ type CommonQueryRequest struct {
 	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"`
+	Select                []byte   `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"`
+	Joins                 []byte   `protobuf:"bytes,9,opt,name=Joins,proto3" json:"Joins,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"`
@@ -196,11 +196,11 @@ func (x *CommonQueryRequest) GetVersion() string {
 	return ""
 }
 
-func (x *CommonQueryRequest) GetSelect() string {
+func (x *CommonQueryRequest) GetSelect() []byte {
 	if x != nil {
 		return x.Select
 	}
-	return ""
+	return nil
 }
 
 func (x *CommonQueryRequest) GetWhere() []byte {
@@ -231,11 +231,11 @@ func (x *CommonQueryRequest) GetGroupBy() []string {
 	return nil
 }
 
-func (x *CommonQueryRequest) GetJoin() string {
+func (x *CommonQueryRequest) GetJoins() []byte {
 	if x != nil {
-		return x.Join
+		return x.Joins
 	}
-	return ""
+	return nil
 }
 
 func (x *CommonQueryRequest) GetHaving() []byte {
@@ -267,7 +267,7 @@ type QueryByKeysRequest struct {
 	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"`
+	Select                []byte            `protobuf:"bytes,4,opt,name=Select,proto3" json:"Select,omitempty"`
 	KeyValues             map[string]string `protobuf:"bytes,5,rep,name=KeyValues,proto3" json:"KeyValues,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
 }
 
@@ -324,11 +324,11 @@ func (x *QueryByKeysRequest) GetVersion() string {
 	return ""
 }
 
-func (x *QueryByKeysRequest) GetSelect() string {
+func (x *QueryByKeysRequest) GetSelect() []byte {
 	if x != nil {
 		return x.Select
 	}
-	return ""
+	return nil
 }
 
 func (x *QueryByKeysRequest) GetKeyValues() map[string]string {
@@ -420,7 +420,7 @@ type CommonCountRequest struct {
 	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"`
+	Joins                 []byte   `protobuf:"bytes,7,opt,name=Joins,proto3" json:"Joins,omitempty"`
 	Having                []byte   `protobuf:"bytes,8,opt,name=Having,proto3" json:"Having,omitempty"`
 }
 
@@ -498,11 +498,11 @@ func (x *CommonCountRequest) GetGroupBy() []string {
 	return nil
 }
 
-func (x *CommonCountRequest) GetJoin() string {
+func (x *CommonCountRequest) GetJoins() []byte {
 	if x != nil {
-		return x.Join
+		return x.Joins
 	}
-	return ""
+	return nil
 }
 
 func (x *CommonCountRequest) GetHaving() []byte {
@@ -532,14 +532,14 @@ var file_v1_request_query_proto_rawDesc = []byte{
 	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,
+	0x01, 0x28, 0x0c, 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,
+	0xf0, 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,
@@ -549,70 +549,71 @@ var file_v1_request_query_proto_rawDesc = []byte{
 	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,
+	0x0a, 0x06, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, 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, 0xc4, 0x02, 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, 0x50, 0x0a, 0x09, 0x4b, 0x65, 0x79, 0x56, 0x61,
-	0x6c, 0x75, 0x65, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2a, 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, 0x2e, 0x4b, 0x65, 0x79, 0x56, 0x61, 0x6c, 0x75, 0x65,
-	0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x42, 0x06, 0xe2, 0xdf, 0x1f, 0x02, 0x20, 0x00, 0x52, 0x09,
-	0x4b, 0x65, 0x79, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x1a, 0x3c, 0x0a, 0x0e, 0x4b, 0x65, 0x79,
-	0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b,
-	0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a,
-	0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61,
-	0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0xb1, 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, 0x22, 0x88, 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, 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,
+	0x12, 0x14, 0x0a, 0x05, 0x4a, 0x6f, 0x69, 0x6e, 0x73, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0c, 0x52,
+	0x05, 0x4a, 0x6f, 0x69, 0x6e, 0x73, 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, 0xc4, 0x02, 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,
+	0x0c, 0x52, 0x06, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x12, 0x50, 0x0a, 0x09, 0x4b, 0x65, 0x79,
+	0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2a, 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, 0x2e, 0x4b, 0x65, 0x79, 0x56, 0x61, 0x6c,
+	0x75, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x42, 0x06, 0xe2, 0xdf, 0x1f, 0x02, 0x20, 0x00,
+	0x52, 0x09, 0x4b, 0x65, 0x79, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x1a, 0x3c, 0x0a, 0x0e, 0x4b,
+	0x65, 0x79, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a,
+	0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12,
+	0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05,
+	0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0xb1, 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, 0x22, 0x8a, 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, 0x14, 0x0a, 0x05,
+	0x4a, 0x6f, 0x69, 0x6e, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x4a, 0x6f, 0x69,
+	0x6e, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x48, 0x61, 0x76, 0x69, 0x6e, 0x67, 0x18, 0x08, 0x20, 0x01,
+	0x28, 0x0c, 0x52, 0x06, 0x48, 0x61, 0x76, 0x69, 0x6e, 0x67, 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 (

+ 12 - 32
test/v1/v1_test.go

@@ -179,12 +179,8 @@ func TestTransaction(t *testing.T) {
 		countWhere(&client.CountWhereRequest{
 			TablePrefixWithSchema: tablePrefix,
 			Version:               "v1",
-			Where: []client.ColumnCompare{
-				{
-					Column:  "id",
-					Value:   id,
-					Compare: client.CompareEqual,
-				},
+			Where: map[string][]any{
+				"id = ?": {id},
 			},
 		}, &count).
 		assertEqual(int64(0), count, "数量不一致")
@@ -308,24 +304,16 @@ func TestTransactionBatch(t *testing.T) {
 		countWhere(&client.CountWhereRequest{
 			TablePrefixWithSchema: tablePrefix,
 			Version:               "v1",
-			Where: []client.ColumnCompare{
-				{
-					Column:  "id",
-					Value:   id1,
-					Compare: client.CompareEqual,
-				},
+			Where: map[string][]any{
+				"id = ?": {id1},
 			},
 		}, &count).
 		assertEqual(int64(0), count, "数量不一致").
 		countWhere(&client.CountWhereRequest{
 			TablePrefixWithSchema: tablePrefix,
 			Version:               "v1",
-			Where: []client.ColumnCompare{
-				{
-					Column:  "id",
-					Value:   id2,
-					Compare: client.CompareEqual,
-				},
+			Where: map[string][]any{
+				"id = ?": {id2},
 			},
 		}, &count).
 		assertEqual(int64(0), count, "数量不一致")
@@ -434,10 +422,8 @@ func TestInsertBatch(t *testing.T) {
 		queryByWhereAndOrderBy(&client.QueryByWhereAndOrderByRequest{
 			TablePrefixWithSchema: tablePrefix,
 			Version:               "v1",
-			Where: []client.ColumnCompare{
-				{Column: "id", Value: id1, Compare: client.CompareEqual},
-				{Column: "name", Value: name1, Compare: client.CompareEqual},
-				{Column: "table_num", Value: tableNum1, Compare: client.CompareEqual},
+			Where: map[string][]any{
+				"id = ? AND name = ? AND table_num = ?": {id1, name1, tableNum1},
 			},
 			PageNo:   1,
 			PageSize: 1,
@@ -450,10 +436,8 @@ func TestInsertBatch(t *testing.T) {
 		commonQuery(&client.CommonQueryRequest{
 			TablePrefixWithSchema: tablePrefix,
 			Version:               "v1",
-			Where: []client.ColumnCompare{
-				{Column: "id", Value: id2, Compare: client.CompareEqual},
-				{Column: "name", Value: name2, Compare: client.CompareEqual},
-				{Column: "table_num", Value: tableNum2, Compare: client.CompareEqual},
+			Where: map[string][]any{
+				"id = ? AND name = ? AND table_num = ?": {id2, name2, tableNum2},
 			},
 			PageNo:   1,
 			PageSize: 1,
@@ -566,12 +550,8 @@ func TestDelete(t *testing.T) {
 		countWhere(&client.CountWhereRequest{
 			TablePrefixWithSchema: tablePrefix,
 			Version:               "v1",
-			Where: []client.ColumnCompare{
-				{
-					Column:  "id",
-					Value:   id,
-					Compare: client.CompareEqual,
-				},
+			Where: map[string][]any{
+				"id = ?": {id},
 			},
 		}, &count).
 		assertEqual(int64(0), count, "数量不一致")