Procházet zdrojové kódy

完成删除操作

yjp před 1 rokem
rodič
revize
9f6894c7c3

+ 0 - 4
dpsv1/client.go

@@ -248,8 +248,6 @@ func (c *Client) CountWhere(req *ports.CountWhereRequest) (string, int64, error)
 		TablePrefixWithSchema: req.TablePrefixWithSchema,
 		Version:               req.Version,
 		Where:                 whereJsonBytes,
-		PageNo:                req.PageNo,
-		PageSize:              req.PageSize,
 	})
 	if err != nil {
 		return "", 0, err
@@ -283,8 +281,6 @@ func (c *Client) CommonCount(req *ports.CommonCountRequest) (string, int64, erro
 		GroupBy:               req.GroupBy,
 		Join:                  req.Join,
 		Having:                havingJsonBytes,
-		PageNo:                req.PageNo,
-		PageSize:              req.PageSize,
 	})
 	if err != nil {
 		return "", 0, err

+ 137 - 0
pb/v1/event_query.pb.go

@@ -0,0 +1,137 @@
+// Code generated by protoc-gen-go. DO NOT EDIT.
+// versions:
+// 	protoc-gen-go v1.28.1
+// 	protoc        v3.12.4
+// source: v1/event_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_event_query_proto protoreflect.FileDescriptor
+
+var file_v1_event_query_proto_rawDesc = []byte{
+	0x0a, 0x14, 0x76, 0x31, 0x2f, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x5f, 0x71, 0x75, 0x65, 0x72, 0x79,
+	0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x02, 0x76, 0x31, 0x1a, 0x1c, 0x76, 0x31, 0x2f, 0x72,
+	0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2f, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x5f, 0x71, 0x75, 0x65,
+	0x72, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x76, 0x31, 0x2f, 0x72, 0x65, 0x73,
+	0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2f, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x5f, 0x71, 0x75, 0x65, 0x72,
+	0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x32, 0xdf, 0x05, 0x0a, 0x11, 0x45, 0x76, 0x65, 0x6e,
+	0x74, 0x51, 0x75, 0x65, 0x72, 0x79, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x54, 0x0a,
+	0x10, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x51, 0x75, 0x65, 0x72, 0x79, 0x42, 0x79, 0x4b, 0x65, 0x79,
+	0x73, 0x12, 0x20, 0x2e, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x45, 0x76, 0x65, 0x6e,
+	0x74, 0x51, 0x75, 0x65, 0x72, 0x79, 0x42, 0x79, 0x4b, 0x65, 0x79, 0x73, 0x52, 0x65, 0x71, 0x75,
+	0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x45,
+	0x76, 0x65, 0x6e, 0x74, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
+	0x65, 0x22, 0x00, 0x12, 0x54, 0x0a, 0x10, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x45, 0x76, 0x65,
+	0x6e, 0x74, 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, 0x20, 0x2e, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73,
+	0x74, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x51, 0x75, 0x65,
+	0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x72, 0x65, 0x73, 0x70,
+	0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52,
+	0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x54, 0x0a, 0x10, 0x43, 0x6f, 0x75,
+	0x6e, 0x74, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x42, 0x79, 0x4b, 0x65, 0x79, 0x73, 0x12, 0x20, 0x2e,
+	0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x45, 0x76, 0x65,
+	0x6e, 0x74, 0x42, 0x79, 0x4b, 0x65, 0x79, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a,
+	0x1c, 0x2e, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x43, 0x6f, 0x75, 0x6e, 0x74,
+	0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12,
+	0x54, 0x0a, 0x10, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x45, 0x76,
+	0x65, 0x6e, 0x74, 0x12, 0x20, 0x2e, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x43, 0x6f,
+	0x6d, 0x6d, 0x6f, 0x6e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x65,
+	0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
+	0x2e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f,
+	0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x5b, 0x0a, 0x17, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x48, 0x69,
+	0x73, 0x74, 0x6f, 0x72, 0x79, 0x51, 0x75, 0x65, 0x72, 0x79, 0x42, 0x79, 0x4b, 0x65, 0x79, 0x73,
+	0x12, 0x20, 0x2e, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x45, 0x76, 0x65, 0x6e, 0x74,
+	0x51, 0x75, 0x65, 0x72, 0x79, 0x42, 0x79, 0x4b, 0x65, 0x79, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65,
+	0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x45, 0x76,
+	0x65, 0x6e, 0x74, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
+	0x22, 0x00, 0x12, 0x5b, 0x0a, 0x17, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x45, 0x76, 0x65, 0x6e,
+	0x74, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, 0x20, 0x2e,
+	0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x45, 0x76,
+	0x65, 0x6e, 0x74, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a,
+	0x1c, 0x2e, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x45, 0x76, 0x65, 0x6e, 0x74,
+	0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12,
+	0x5b, 0x0a, 0x17, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x48, 0x69, 0x73,
+	0x74, 0x6f, 0x72, 0x79, 0x42, 0x79, 0x4b, 0x65, 0x79, 0x73, 0x12, 0x20, 0x2e, 0x72, 0x65, 0x71,
+	0x75, 0x65, 0x73, 0x74, 0x2e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x42,
+	0x79, 0x4b, 0x65, 0x79, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x72,
+	0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x45, 0x76, 0x65,
+	0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x5b, 0x0a, 0x17,
+	0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x45, 0x76, 0x65, 0x6e, 0x74,
+	0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x12, 0x20, 0x2e, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73,
+	0x74, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x45, 0x76, 0x65,
+	0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x72, 0x65, 0x73, 0x70,
+	0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x45, 0x76, 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_event_query_proto_goTypes = []interface{}{
+	(*request.EventQueryByKeysRequest)(nil), // 0: request.EventQueryByKeysRequest
+	(*request.CommonEventQueryRequest)(nil), // 1: request.CommonEventQueryRequest
+	(*request.CountEventByKeysRequest)(nil), // 2: request.CountEventByKeysRequest
+	(*request.CommonCountEventRequest)(nil), // 3: request.CommonCountEventRequest
+	(*response.EventQueryResponse)(nil),     // 4: response.EventQueryResponse
+	(*response.CountEventResponse)(nil),     // 5: response.CountEventResponse
+}
+var file_v1_event_query_proto_depIdxs = []int32{
+	0, // 0: v1.EventQueryService.EventQueryByKeys:input_type -> request.EventQueryByKeysRequest
+	1, // 1: v1.EventQueryService.CommonEventQuery:input_type -> request.CommonEventQueryRequest
+	2, // 2: v1.EventQueryService.CountEventByKeys:input_type -> request.CountEventByKeysRequest
+	3, // 3: v1.EventQueryService.CommonCountEvent:input_type -> request.CommonCountEventRequest
+	0, // 4: v1.EventQueryService.EventHistoryQueryByKeys:input_type -> request.EventQueryByKeysRequest
+	1, // 5: v1.EventQueryService.CommonEventHistoryQuery:input_type -> request.CommonEventQueryRequest
+	2, // 6: v1.EventQueryService.CountEventHistoryByKeys:input_type -> request.CountEventByKeysRequest
+	3, // 7: v1.EventQueryService.CommonCountEventHistory:input_type -> request.CommonCountEventRequest
+	4, // 8: v1.EventQueryService.EventQueryByKeys:output_type -> response.EventQueryResponse
+	4, // 9: v1.EventQueryService.CommonEventQuery:output_type -> response.EventQueryResponse
+	5, // 10: v1.EventQueryService.CountEventByKeys:output_type -> response.CountEventResponse
+	5, // 11: v1.EventQueryService.CommonCountEvent:output_type -> response.CountEventResponse
+	4, // 12: v1.EventQueryService.EventHistoryQueryByKeys:output_type -> response.EventQueryResponse
+	4, // 13: v1.EventQueryService.CommonEventHistoryQuery:output_type -> response.EventQueryResponse
+	5, // 14: v1.EventQueryService.CountEventHistoryByKeys:output_type -> response.CountEventResponse
+	5, // 15: v1.EventQueryService.CommonCountEventHistory:output_type -> response.CountEventResponse
+	8, // [8:16] is the sub-list for method output_type
+	0, // [0:8] 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_event_query_proto_init() }
+func file_v1_event_query_proto_init() {
+	if File_v1_event_query_proto != nil {
+		return
+	}
+	type x struct{}
+	out := protoimpl.TypeBuilder{
+		File: protoimpl.DescBuilder{
+			GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
+			RawDescriptor: file_v1_event_query_proto_rawDesc,
+			NumEnums:      0,
+			NumMessages:   0,
+			NumExtensions: 0,
+			NumServices:   1,
+		},
+		GoTypes:           file_v1_event_query_proto_goTypes,
+		DependencyIndexes: file_v1_event_query_proto_depIdxs,
+	}.Build()
+	File_v1_event_query_proto = out.File
+	file_v1_event_query_proto_rawDesc = nil
+	file_v1_event_query_proto_goTypes = nil
+	file_v1_event_query_proto_depIdxs = nil
+}

+ 359 - 0
pb/v1/event_query_grpc.pb.go

@@ -0,0 +1,359 @@
+// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
+// versions:
+// - protoc-gen-go-grpc v1.2.0
+// - protoc             v3.12.4
+// source: v1/event_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
+
+// EventQueryServiceClient is the client API for EventQueryService 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 EventQueryServiceClient interface {
+	EventQueryByKeys(ctx context.Context, in *request.EventQueryByKeysRequest, opts ...grpc.CallOption) (*response.EventQueryResponse, error)
+	CommonEventQuery(ctx context.Context, in *request.CommonEventQueryRequest, opts ...grpc.CallOption) (*response.EventQueryResponse, error)
+	CountEventByKeys(ctx context.Context, in *request.CountEventByKeysRequest, opts ...grpc.CallOption) (*response.CountEventResponse, error)
+	CommonCountEvent(ctx context.Context, in *request.CommonCountEventRequest, opts ...grpc.CallOption) (*response.CountEventResponse, error)
+	EventHistoryQueryByKeys(ctx context.Context, in *request.EventQueryByKeysRequest, opts ...grpc.CallOption) (*response.EventQueryResponse, error)
+	CommonEventHistoryQuery(ctx context.Context, in *request.CommonEventQueryRequest, opts ...grpc.CallOption) (*response.EventQueryResponse, error)
+	CountEventHistoryByKeys(ctx context.Context, in *request.CountEventByKeysRequest, opts ...grpc.CallOption) (*response.CountEventResponse, error)
+	CommonCountEventHistory(ctx context.Context, in *request.CommonCountEventRequest, opts ...grpc.CallOption) (*response.CountEventResponse, error)
+}
+
+type eventQueryServiceClient struct {
+	cc grpc.ClientConnInterface
+}
+
+func NewEventQueryServiceClient(cc grpc.ClientConnInterface) EventQueryServiceClient {
+	return &eventQueryServiceClient{cc}
+}
+
+func (c *eventQueryServiceClient) EventQueryByKeys(ctx context.Context, in *request.EventQueryByKeysRequest, opts ...grpc.CallOption) (*response.EventQueryResponse, error) {
+	out := new(response.EventQueryResponse)
+	err := c.cc.Invoke(ctx, "/v1.EventQueryService/EventQueryByKeys", in, out, opts...)
+	if err != nil {
+		return nil, err
+	}
+	return out, nil
+}
+
+func (c *eventQueryServiceClient) CommonEventQuery(ctx context.Context, in *request.CommonEventQueryRequest, opts ...grpc.CallOption) (*response.EventQueryResponse, error) {
+	out := new(response.EventQueryResponse)
+	err := c.cc.Invoke(ctx, "/v1.EventQueryService/CommonEventQuery", in, out, opts...)
+	if err != nil {
+		return nil, err
+	}
+	return out, nil
+}
+
+func (c *eventQueryServiceClient) CountEventByKeys(ctx context.Context, in *request.CountEventByKeysRequest, opts ...grpc.CallOption) (*response.CountEventResponse, error) {
+	out := new(response.CountEventResponse)
+	err := c.cc.Invoke(ctx, "/v1.EventQueryService/CountEventByKeys", in, out, opts...)
+	if err != nil {
+		return nil, err
+	}
+	return out, nil
+}
+
+func (c *eventQueryServiceClient) CommonCountEvent(ctx context.Context, in *request.CommonCountEventRequest, opts ...grpc.CallOption) (*response.CountEventResponse, error) {
+	out := new(response.CountEventResponse)
+	err := c.cc.Invoke(ctx, "/v1.EventQueryService/CommonCountEvent", in, out, opts...)
+	if err != nil {
+		return nil, err
+	}
+	return out, nil
+}
+
+func (c *eventQueryServiceClient) EventHistoryQueryByKeys(ctx context.Context, in *request.EventQueryByKeysRequest, opts ...grpc.CallOption) (*response.EventQueryResponse, error) {
+	out := new(response.EventQueryResponse)
+	err := c.cc.Invoke(ctx, "/v1.EventQueryService/EventHistoryQueryByKeys", in, out, opts...)
+	if err != nil {
+		return nil, err
+	}
+	return out, nil
+}
+
+func (c *eventQueryServiceClient) CommonEventHistoryQuery(ctx context.Context, in *request.CommonEventQueryRequest, opts ...grpc.CallOption) (*response.EventQueryResponse, error) {
+	out := new(response.EventQueryResponse)
+	err := c.cc.Invoke(ctx, "/v1.EventQueryService/CommonEventHistoryQuery", in, out, opts...)
+	if err != nil {
+		return nil, err
+	}
+	return out, nil
+}
+
+func (c *eventQueryServiceClient) CountEventHistoryByKeys(ctx context.Context, in *request.CountEventByKeysRequest, opts ...grpc.CallOption) (*response.CountEventResponse, error) {
+	out := new(response.CountEventResponse)
+	err := c.cc.Invoke(ctx, "/v1.EventQueryService/CountEventHistoryByKeys", in, out, opts...)
+	if err != nil {
+		return nil, err
+	}
+	return out, nil
+}
+
+func (c *eventQueryServiceClient) CommonCountEventHistory(ctx context.Context, in *request.CommonCountEventRequest, opts ...grpc.CallOption) (*response.CountEventResponse, error) {
+	out := new(response.CountEventResponse)
+	err := c.cc.Invoke(ctx, "/v1.EventQueryService/CommonCountEventHistory", in, out, opts...)
+	if err != nil {
+		return nil, err
+	}
+	return out, nil
+}
+
+// EventQueryServiceServer is the server API for EventQueryService service.
+// All implementations must embed UnimplementedEventQueryServiceServer
+// for forward compatibility
+type EventQueryServiceServer interface {
+	EventQueryByKeys(context.Context, *request.EventQueryByKeysRequest) (*response.EventQueryResponse, error)
+	CommonEventQuery(context.Context, *request.CommonEventQueryRequest) (*response.EventQueryResponse, error)
+	CountEventByKeys(context.Context, *request.CountEventByKeysRequest) (*response.CountEventResponse, error)
+	CommonCountEvent(context.Context, *request.CommonCountEventRequest) (*response.CountEventResponse, error)
+	EventHistoryQueryByKeys(context.Context, *request.EventQueryByKeysRequest) (*response.EventQueryResponse, error)
+	CommonEventHistoryQuery(context.Context, *request.CommonEventQueryRequest) (*response.EventQueryResponse, error)
+	CountEventHistoryByKeys(context.Context, *request.CountEventByKeysRequest) (*response.CountEventResponse, error)
+	CommonCountEventHistory(context.Context, *request.CommonCountEventRequest) (*response.CountEventResponse, error)
+	mustEmbedUnimplementedEventQueryServiceServer()
+}
+
+// UnimplementedEventQueryServiceServer must be embedded to have forward compatible implementations.
+type UnimplementedEventQueryServiceServer struct {
+}
+
+func (UnimplementedEventQueryServiceServer) EventQueryByKeys(context.Context, *request.EventQueryByKeysRequest) (*response.EventQueryResponse, error) {
+	return nil, status.Errorf(codes.Unimplemented, "method EventQueryByKeys not implemented")
+}
+func (UnimplementedEventQueryServiceServer) CommonEventQuery(context.Context, *request.CommonEventQueryRequest) (*response.EventQueryResponse, error) {
+	return nil, status.Errorf(codes.Unimplemented, "method CommonEventQuery not implemented")
+}
+func (UnimplementedEventQueryServiceServer) CountEventByKeys(context.Context, *request.CountEventByKeysRequest) (*response.CountEventResponse, error) {
+	return nil, status.Errorf(codes.Unimplemented, "method CountEventByKeys not implemented")
+}
+func (UnimplementedEventQueryServiceServer) CommonCountEvent(context.Context, *request.CommonCountEventRequest) (*response.CountEventResponse, error) {
+	return nil, status.Errorf(codes.Unimplemented, "method CommonCountEvent not implemented")
+}
+func (UnimplementedEventQueryServiceServer) EventHistoryQueryByKeys(context.Context, *request.EventQueryByKeysRequest) (*response.EventQueryResponse, error) {
+	return nil, status.Errorf(codes.Unimplemented, "method EventHistoryQueryByKeys not implemented")
+}
+func (UnimplementedEventQueryServiceServer) CommonEventHistoryQuery(context.Context, *request.CommonEventQueryRequest) (*response.EventQueryResponse, error) {
+	return nil, status.Errorf(codes.Unimplemented, "method CommonEventHistoryQuery not implemented")
+}
+func (UnimplementedEventQueryServiceServer) CountEventHistoryByKeys(context.Context, *request.CountEventByKeysRequest) (*response.CountEventResponse, error) {
+	return nil, status.Errorf(codes.Unimplemented, "method CountEventHistoryByKeys not implemented")
+}
+func (UnimplementedEventQueryServiceServer) CommonCountEventHistory(context.Context, *request.CommonCountEventRequest) (*response.CountEventResponse, error) {
+	return nil, status.Errorf(codes.Unimplemented, "method CommonCountEventHistory not implemented")
+}
+func (UnimplementedEventQueryServiceServer) mustEmbedUnimplementedEventQueryServiceServer() {}
+
+// UnsafeEventQueryServiceServer may be embedded to opt out of forward compatibility for this service.
+// Use of this interface is not recommended, as added methods to EventQueryServiceServer will
+// result in compilation errors.
+type UnsafeEventQueryServiceServer interface {
+	mustEmbedUnimplementedEventQueryServiceServer()
+}
+
+func RegisterEventQueryServiceServer(s grpc.ServiceRegistrar, srv EventQueryServiceServer) {
+	s.RegisterService(&EventQueryService_ServiceDesc, srv)
+}
+
+func _EventQueryService_EventQueryByKeys_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+	in := new(request.EventQueryByKeysRequest)
+	if err := dec(in); err != nil {
+		return nil, err
+	}
+	if interceptor == nil {
+		return srv.(EventQueryServiceServer).EventQueryByKeys(ctx, in)
+	}
+	info := &grpc.UnaryServerInfo{
+		Server:     srv,
+		FullMethod: "/v1.EventQueryService/EventQueryByKeys",
+	}
+	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+		return srv.(EventQueryServiceServer).EventQueryByKeys(ctx, req.(*request.EventQueryByKeysRequest))
+	}
+	return interceptor(ctx, in, info, handler)
+}
+
+func _EventQueryService_CommonEventQuery_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+	in := new(request.CommonEventQueryRequest)
+	if err := dec(in); err != nil {
+		return nil, err
+	}
+	if interceptor == nil {
+		return srv.(EventQueryServiceServer).CommonEventQuery(ctx, in)
+	}
+	info := &grpc.UnaryServerInfo{
+		Server:     srv,
+		FullMethod: "/v1.EventQueryService/CommonEventQuery",
+	}
+	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+		return srv.(EventQueryServiceServer).CommonEventQuery(ctx, req.(*request.CommonEventQueryRequest))
+	}
+	return interceptor(ctx, in, info, handler)
+}
+
+func _EventQueryService_CountEventByKeys_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+	in := new(request.CountEventByKeysRequest)
+	if err := dec(in); err != nil {
+		return nil, err
+	}
+	if interceptor == nil {
+		return srv.(EventQueryServiceServer).CountEventByKeys(ctx, in)
+	}
+	info := &grpc.UnaryServerInfo{
+		Server:     srv,
+		FullMethod: "/v1.EventQueryService/CountEventByKeys",
+	}
+	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+		return srv.(EventQueryServiceServer).CountEventByKeys(ctx, req.(*request.CountEventByKeysRequest))
+	}
+	return interceptor(ctx, in, info, handler)
+}
+
+func _EventQueryService_CommonCountEvent_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+	in := new(request.CommonCountEventRequest)
+	if err := dec(in); err != nil {
+		return nil, err
+	}
+	if interceptor == nil {
+		return srv.(EventQueryServiceServer).CommonCountEvent(ctx, in)
+	}
+	info := &grpc.UnaryServerInfo{
+		Server:     srv,
+		FullMethod: "/v1.EventQueryService/CommonCountEvent",
+	}
+	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+		return srv.(EventQueryServiceServer).CommonCountEvent(ctx, req.(*request.CommonCountEventRequest))
+	}
+	return interceptor(ctx, in, info, handler)
+}
+
+func _EventQueryService_EventHistoryQueryByKeys_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+	in := new(request.EventQueryByKeysRequest)
+	if err := dec(in); err != nil {
+		return nil, err
+	}
+	if interceptor == nil {
+		return srv.(EventQueryServiceServer).EventHistoryQueryByKeys(ctx, in)
+	}
+	info := &grpc.UnaryServerInfo{
+		Server:     srv,
+		FullMethod: "/v1.EventQueryService/EventHistoryQueryByKeys",
+	}
+	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+		return srv.(EventQueryServiceServer).EventHistoryQueryByKeys(ctx, req.(*request.EventQueryByKeysRequest))
+	}
+	return interceptor(ctx, in, info, handler)
+}
+
+func _EventQueryService_CommonEventHistoryQuery_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+	in := new(request.CommonEventQueryRequest)
+	if err := dec(in); err != nil {
+		return nil, err
+	}
+	if interceptor == nil {
+		return srv.(EventQueryServiceServer).CommonEventHistoryQuery(ctx, in)
+	}
+	info := &grpc.UnaryServerInfo{
+		Server:     srv,
+		FullMethod: "/v1.EventQueryService/CommonEventHistoryQuery",
+	}
+	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+		return srv.(EventQueryServiceServer).CommonEventHistoryQuery(ctx, req.(*request.CommonEventQueryRequest))
+	}
+	return interceptor(ctx, in, info, handler)
+}
+
+func _EventQueryService_CountEventHistoryByKeys_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+	in := new(request.CountEventByKeysRequest)
+	if err := dec(in); err != nil {
+		return nil, err
+	}
+	if interceptor == nil {
+		return srv.(EventQueryServiceServer).CountEventHistoryByKeys(ctx, in)
+	}
+	info := &grpc.UnaryServerInfo{
+		Server:     srv,
+		FullMethod: "/v1.EventQueryService/CountEventHistoryByKeys",
+	}
+	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+		return srv.(EventQueryServiceServer).CountEventHistoryByKeys(ctx, req.(*request.CountEventByKeysRequest))
+	}
+	return interceptor(ctx, in, info, handler)
+}
+
+func _EventQueryService_CommonCountEventHistory_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+	in := new(request.CommonCountEventRequest)
+	if err := dec(in); err != nil {
+		return nil, err
+	}
+	if interceptor == nil {
+		return srv.(EventQueryServiceServer).CommonCountEventHistory(ctx, in)
+	}
+	info := &grpc.UnaryServerInfo{
+		Server:     srv,
+		FullMethod: "/v1.EventQueryService/CommonCountEventHistory",
+	}
+	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+		return srv.(EventQueryServiceServer).CommonCountEventHistory(ctx, req.(*request.CommonCountEventRequest))
+	}
+	return interceptor(ctx, in, info, handler)
+}
+
+// EventQueryService_ServiceDesc is the grpc.ServiceDesc for EventQueryService service.
+// It's only intended for direct use with grpc.RegisterService,
+// and not to be introspected or modified (even as a copy)
+var EventQueryService_ServiceDesc = grpc.ServiceDesc{
+	ServiceName: "v1.EventQueryService",
+	HandlerType: (*EventQueryServiceServer)(nil),
+	Methods: []grpc.MethodDesc{
+		{
+			MethodName: "EventQueryByKeys",
+			Handler:    _EventQueryService_EventQueryByKeys_Handler,
+		},
+		{
+			MethodName: "CommonEventQuery",
+			Handler:    _EventQueryService_CommonEventQuery_Handler,
+		},
+		{
+			MethodName: "CountEventByKeys",
+			Handler:    _EventQueryService_CountEventByKeys_Handler,
+		},
+		{
+			MethodName: "CommonCountEvent",
+			Handler:    _EventQueryService_CommonCountEvent_Handler,
+		},
+		{
+			MethodName: "EventHistoryQueryByKeys",
+			Handler:    _EventQueryService_EventHistoryQueryByKeys_Handler,
+		},
+		{
+			MethodName: "CommonEventHistoryQuery",
+			Handler:    _EventQueryService_CommonEventHistoryQuery_Handler,
+		},
+		{
+			MethodName: "CountEventHistoryByKeys",
+			Handler:    _EventQueryService_CountEventHistoryByKeys_Handler,
+		},
+		{
+			MethodName: "CommonCountEventHistory",
+			Handler:    _EventQueryService_CommonCountEventHistory_Handler,
+		},
+	},
+	Streams:  []grpc.StreamDesc{},
+	Metadata: "v1/event_query.proto",
+}

+ 590 - 0
pb/v1/request/event_query.pb.go

@@ -0,0 +1,590 @@
+// Code generated by protoc-gen-go. DO NOT EDIT.
+// versions:
+// 	protoc-gen-go v1.28.1
+// 	protoc        v3.12.4
+// source: v1/request/event_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 EventQueryByKeysRequest 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"`
+	Select                string   `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"`
+}
+
+func (x *EventQueryByKeysRequest) Reset() {
+	*x = EventQueryByKeysRequest{}
+	if protoimpl.UnsafeEnabled {
+		mi := &file_v1_request_event_query_proto_msgTypes[0]
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		ms.StoreMessageInfo(mi)
+	}
+}
+
+func (x *EventQueryByKeysRequest) String() string {
+	return protoimpl.X.MessageStringOf(x)
+}
+
+func (*EventQueryByKeysRequest) ProtoMessage() {}
+
+func (x *EventQueryByKeysRequest) ProtoReflect() protoreflect.Message {
+	mi := &file_v1_request_event_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 EventQueryByKeysRequest.ProtoReflect.Descriptor instead.
+func (*EventQueryByKeysRequest) Descriptor() ([]byte, []int) {
+	return file_v1_request_event_query_proto_rawDescGZIP(), []int{0}
+}
+
+func (x *EventQueryByKeysRequest) GetDatabaseID() string {
+	if x != nil {
+		return x.DatabaseID
+	}
+	return ""
+}
+
+func (x *EventQueryByKeysRequest) GetTablePrefixWithSchema() string {
+	if x != nil {
+		return x.TablePrefixWithSchema
+	}
+	return ""
+}
+
+func (x *EventQueryByKeysRequest) GetSelect() string {
+	if x != nil {
+		return x.Select
+	}
+	return ""
+}
+
+func (x *EventQueryByKeysRequest) GetKeyValues() []string {
+	if x != nil {
+		return x.KeyValues
+	}
+	return nil
+}
+
+func (x *EventQueryByKeysRequest) GetPageNo() int32 {
+	if x != nil {
+		return x.PageNo
+	}
+	return 0
+}
+
+func (x *EventQueryByKeysRequest) GetPageSize() int32 {
+	if x != nil {
+		return x.PageSize
+	}
+	return 0
+}
+
+type CommonEventQueryRequest 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"`
+	Select                string   `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"`
+	CreatorID             string   `protobuf:"bytes,7,opt,name=CreatorID,proto3" json:"CreatorID,omitempty"`
+	StartCreatedTime      string   `protobuf:"bytes,8,opt,name=StartCreatedTime,proto3" json:"StartCreatedTime,omitempty"`
+	EndCreatedTime        string   `protobuf:"bytes,9,opt,name=EndCreatedTime,proto3" json:"EndCreatedTime,omitempty"`
+	PageNo                int32    `protobuf:"varint,10,opt,name=PageNo,proto3" json:"PageNo,omitempty"`
+	PageSize              int32    `protobuf:"varint,11,opt,name=PageSize,proto3" json:"PageSize,omitempty"`
+}
+
+func (x *CommonEventQueryRequest) Reset() {
+	*x = CommonEventQueryRequest{}
+	if protoimpl.UnsafeEnabled {
+		mi := &file_v1_request_event_query_proto_msgTypes[1]
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		ms.StoreMessageInfo(mi)
+	}
+}
+
+func (x *CommonEventQueryRequest) String() string {
+	return protoimpl.X.MessageStringOf(x)
+}
+
+func (*CommonEventQueryRequest) ProtoMessage() {}
+
+func (x *CommonEventQueryRequest) ProtoReflect() protoreflect.Message {
+	mi := &file_v1_request_event_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 CommonEventQueryRequest.ProtoReflect.Descriptor instead.
+func (*CommonEventQueryRequest) Descriptor() ([]byte, []int) {
+	return file_v1_request_event_query_proto_rawDescGZIP(), []int{1}
+}
+
+func (x *CommonEventQueryRequest) GetDatabaseID() string {
+	if x != nil {
+		return x.DatabaseID
+	}
+	return ""
+}
+
+func (x *CommonEventQueryRequest) GetTablePrefixWithSchema() string {
+	if x != nil {
+		return x.TablePrefixWithSchema
+	}
+	return ""
+}
+
+func (x *CommonEventQueryRequest) GetSelect() string {
+	if x != nil {
+		return x.Select
+	}
+	return ""
+}
+
+func (x *CommonEventQueryRequest) GetKeyValues() []string {
+	if x != nil {
+		return x.KeyValues
+	}
+	return nil
+}
+
+func (x *CommonEventQueryRequest) GetVersion() string {
+	if x != nil {
+		return x.Version
+	}
+	return ""
+}
+
+func (x *CommonEventQueryRequest) GetOperation() string {
+	if x != nil {
+		return x.Operation
+	}
+	return ""
+}
+
+func (x *CommonEventQueryRequest) GetCreatorID() string {
+	if x != nil {
+		return x.CreatorID
+	}
+	return ""
+}
+
+func (x *CommonEventQueryRequest) GetStartCreatedTime() string {
+	if x != nil {
+		return x.StartCreatedTime
+	}
+	return ""
+}
+
+func (x *CommonEventQueryRequest) GetEndCreatedTime() string {
+	if x != nil {
+		return x.EndCreatedTime
+	}
+	return ""
+}
+
+func (x *CommonEventQueryRequest) GetPageNo() int32 {
+	if x != nil {
+		return x.PageNo
+	}
+	return 0
+}
+
+func (x *CommonEventQueryRequest) GetPageSize() int32 {
+	if x != nil {
+		return x.PageSize
+	}
+	return 0
+}
+
+type CountEventByKeysRequest 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"`
+	KeyValues             []string `protobuf:"bytes,3,rep,name=KeyValues,proto3" json:"KeyValues,omitempty"`
+}
+
+func (x *CountEventByKeysRequest) Reset() {
+	*x = CountEventByKeysRequest{}
+	if protoimpl.UnsafeEnabled {
+		mi := &file_v1_request_event_query_proto_msgTypes[2]
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		ms.StoreMessageInfo(mi)
+	}
+}
+
+func (x *CountEventByKeysRequest) String() string {
+	return protoimpl.X.MessageStringOf(x)
+}
+
+func (*CountEventByKeysRequest) ProtoMessage() {}
+
+func (x *CountEventByKeysRequest) ProtoReflect() protoreflect.Message {
+	mi := &file_v1_request_event_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 CountEventByKeysRequest.ProtoReflect.Descriptor instead.
+func (*CountEventByKeysRequest) Descriptor() ([]byte, []int) {
+	return file_v1_request_event_query_proto_rawDescGZIP(), []int{2}
+}
+
+func (x *CountEventByKeysRequest) GetDatabaseID() string {
+	if x != nil {
+		return x.DatabaseID
+	}
+	return ""
+}
+
+func (x *CountEventByKeysRequest) GetTablePrefixWithSchema() string {
+	if x != nil {
+		return x.TablePrefixWithSchema
+	}
+	return ""
+}
+
+func (x *CountEventByKeysRequest) GetKeyValues() []string {
+	if x != nil {
+		return x.KeyValues
+	}
+	return nil
+}
+
+type CommonCountEventRequest 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"`
+	KeyValues             []string `protobuf:"bytes,3,rep,name=KeyValues,proto3" json:"KeyValues,omitempty"`
+	Version               string   `protobuf:"bytes,4,opt,name=Version,proto3" json:"Version,omitempty"`
+	Operation             string   `protobuf:"bytes,5,opt,name=Operation,proto3" json:"Operation,omitempty"`
+	CreatorID             string   `protobuf:"bytes,6,opt,name=CreatorID,proto3" json:"CreatorID,omitempty"`
+	StartCreatedTime      string   `protobuf:"bytes,7,opt,name=StartCreatedTime,proto3" json:"StartCreatedTime,omitempty"`
+	EndCreatedTime        string   `protobuf:"bytes,8,opt,name=EndCreatedTime,proto3" json:"EndCreatedTime,omitempty"`
+}
+
+func (x *CommonCountEventRequest) Reset() {
+	*x = CommonCountEventRequest{}
+	if protoimpl.UnsafeEnabled {
+		mi := &file_v1_request_event_query_proto_msgTypes[3]
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		ms.StoreMessageInfo(mi)
+	}
+}
+
+func (x *CommonCountEventRequest) String() string {
+	return protoimpl.X.MessageStringOf(x)
+}
+
+func (*CommonCountEventRequest) ProtoMessage() {}
+
+func (x *CommonCountEventRequest) ProtoReflect() protoreflect.Message {
+	mi := &file_v1_request_event_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 CommonCountEventRequest.ProtoReflect.Descriptor instead.
+func (*CommonCountEventRequest) Descriptor() ([]byte, []int) {
+	return file_v1_request_event_query_proto_rawDescGZIP(), []int{3}
+}
+
+func (x *CommonCountEventRequest) GetDatabaseID() string {
+	if x != nil {
+		return x.DatabaseID
+	}
+	return ""
+}
+
+func (x *CommonCountEventRequest) GetTablePrefixWithSchema() string {
+	if x != nil {
+		return x.TablePrefixWithSchema
+	}
+	return ""
+}
+
+func (x *CommonCountEventRequest) GetKeyValues() []string {
+	if x != nil {
+		return x.KeyValues
+	}
+	return nil
+}
+
+func (x *CommonCountEventRequest) GetVersion() string {
+	if x != nil {
+		return x.Version
+	}
+	return ""
+}
+
+func (x *CommonCountEventRequest) GetOperation() string {
+	if x != nil {
+		return x.Operation
+	}
+	return ""
+}
+
+func (x *CommonCountEventRequest) GetCreatorID() string {
+	if x != nil {
+		return x.CreatorID
+	}
+	return ""
+}
+
+func (x *CommonCountEventRequest) GetStartCreatedTime() string {
+	if x != nil {
+		return x.StartCreatedTime
+	}
+	return ""
+}
+
+func (x *CommonCountEventRequest) GetEndCreatedTime() string {
+	if x != nil {
+		return x.EndCreatedTime
+	}
+	return ""
+}
+
+var File_v1_request_event_query_proto protoreflect.FileDescriptor
+
+var file_v1_request_event_query_proto_rawDesc = []byte{
+	0x0a, 0x1c, 0x76, 0x31, 0x2f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2f, 0x65, 0x76, 0x65,
+	0x6e, 0x74, 0x5f, 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,
+	0xf1, 0x01, 0x0a, 0x17, 0x45, 0x76, 0x65, 0x6e, 0x74, 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, 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,
+	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,
+	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, 0x93, 0x03, 0x0a, 0x17, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x45, 0x76,
+	0x65, 0x6e, 0x74, 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, 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,
+	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,
+	0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1c, 0x0a, 0x09, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69,
+	0x6f, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74,
+	0x69, 0x6f, 0x6e, 0x12, 0x1c, 0x0a, 0x09, 0x43, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x49, 0x44,
+	0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x43, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x49,
+	0x44, 0x12, 0x2a, 0x0a, 0x10, 0x53, 0x74, 0x61, 0x72, 0x74, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65,
+	0x64, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x53, 0x74, 0x61,
+	0x72, 0x74, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x26, 0x0a,
+	0x0e, 0x45, 0x6e, 0x64, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x18,
+	0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x45, 0x6e, 0x64, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65,
+	0x64, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x50, 0x61, 0x67, 0x65, 0x4e, 0x6f, 0x18,
+	0x0a, 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, 0x0b, 0x20, 0x01, 0x28, 0x05, 0x52,
+	0x08, 0x50, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x22, 0xa5, 0x01, 0x0a, 0x17, 0x43, 0x6f,
+	0x75, 0x6e, 0x74, 0x45, 0x76, 0x65, 0x6e, 0x74, 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, 0x24, 0x0a, 0x09, 0x4b,
+	0x65, 0x79, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x42, 0x06,
+	0xe2, 0xdf, 0x1f, 0x02, 0x60, 0x01, 0x52, 0x09, 0x4b, 0x65, 0x79, 0x56, 0x61, 0x6c, 0x75, 0x65,
+	0x73, 0x22, 0xc7, 0x02, 0x0a, 0x17, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x43, 0x6f, 0x75, 0x6e,
+	0x74, 0x45, 0x76, 0x65, 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, 0x1c, 0x0a, 0x09, 0x4b, 0x65, 0x79, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73,
+	0x18, 0x03, 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, 0x04, 0x20, 0x01,
+	0x28, 0x09, 0x52, 0x07, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1c, 0x0a, 0x09, 0x4f,
+	0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09,
+	0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1c, 0x0a, 0x09, 0x43, 0x72, 0x65,
+	0x61, 0x74, 0x6f, 0x72, 0x49, 0x44, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x43, 0x72,
+	0x65, 0x61, 0x74, 0x6f, 0x72, 0x49, 0x44, 0x12, 0x2a, 0x0a, 0x10, 0x53, 0x74, 0x61, 0x72, 0x74,
+	0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28,
+	0x09, 0x52, 0x10, 0x53, 0x74, 0x61, 0x72, 0x74, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x54,
+	0x69, 0x6d, 0x65, 0x12, 0x26, 0x0a, 0x0e, 0x45, 0x6e, 0x64, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65,
+	0x64, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x45, 0x6e, 0x64,
+	0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x54, 0x69, 0x6d, 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_event_query_proto_rawDescOnce sync.Once
+	file_v1_request_event_query_proto_rawDescData = file_v1_request_event_query_proto_rawDesc
+)
+
+func file_v1_request_event_query_proto_rawDescGZIP() []byte {
+	file_v1_request_event_query_proto_rawDescOnce.Do(func() {
+		file_v1_request_event_query_proto_rawDescData = protoimpl.X.CompressGZIP(file_v1_request_event_query_proto_rawDescData)
+	})
+	return file_v1_request_event_query_proto_rawDescData
+}
+
+var file_v1_request_event_query_proto_msgTypes = make([]protoimpl.MessageInfo, 4)
+var file_v1_request_event_query_proto_goTypes = []interface{}{
+	(*EventQueryByKeysRequest)(nil), // 0: request.EventQueryByKeysRequest
+	(*CommonEventQueryRequest)(nil), // 1: request.CommonEventQueryRequest
+	(*CountEventByKeysRequest)(nil), // 2: request.CountEventByKeysRequest
+	(*CommonCountEventRequest)(nil), // 3: request.CommonCountEventRequest
+}
+var file_v1_request_event_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_event_query_proto_init() }
+func file_v1_request_event_query_proto_init() {
+	if File_v1_request_event_query_proto != nil {
+		return
+	}
+	if !protoimpl.UnsafeEnabled {
+		file_v1_request_event_query_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*EventQueryByKeysRequest); i {
+			case 0:
+				return &v.state
+			case 1:
+				return &v.sizeCache
+			case 2:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_v1_request_event_query_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*CommonEventQueryRequest); i {
+			case 0:
+				return &v.state
+			case 1:
+				return &v.sizeCache
+			case 2:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_v1_request_event_query_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*CountEventByKeysRequest); i {
+			case 0:
+				return &v.state
+			case 1:
+				return &v.sizeCache
+			case 2:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_v1_request_event_query_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*CommonCountEventRequest); 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_event_query_proto_rawDesc,
+			NumEnums:      0,
+			NumMessages:   4,
+			NumExtensions: 0,
+			NumServices:   0,
+		},
+		GoTypes:           file_v1_request_event_query_proto_goTypes,
+		DependencyIndexes: file_v1_request_event_query_proto_depIdxs,
+		MessageInfos:      file_v1_request_event_query_proto_msgTypes,
+	}.Build()
+	File_v1_request_event_query_proto = out.File
+	file_v1_request_event_query_proto_rawDesc = nil
+	file_v1_request_event_query_proto_goTypes = nil
+	file_v1_request_event_query_proto_depIdxs = nil
+}

+ 60 - 0
pb/v1/request/event_query.validator.pb.go

@@ -0,0 +1,60 @@
+// Code generated by protoc-gen-gogo. DO NOT EDIT.
+// source: v1/request/event_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 *EventQueryByKeysRequest) 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 len(this.KeyValues) < 1 {
+		return github_com_mwitkow_go_proto_validators.FieldError("KeyValues", fmt.Errorf(`value '%v' must contain at least 1 elements`, this.KeyValues))
+	}
+	return nil
+}
+func (this *CommonEventQueryRequest) 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))
+	}
+	return nil
+}
+func (this *CountEventByKeysRequest) 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 len(this.KeyValues) < 1 {
+		return github_com_mwitkow_go_proto_validators.FieldError("KeyValues", fmt.Errorf(`value '%v' must contain at least 1 elements`, this.KeyValues))
+	}
+	return nil
+}
+func (this *CommonCountEventRequest) 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))
+	}
+	return nil
+}

+ 21 - 60
pb/v1/request/query.pb.go

@@ -347,8 +347,6 @@ type CountWhereRequest struct {
 	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() {
@@ -411,20 +409,6 @@ func (x *CountWhereRequest) GetWhere() []byte {
 	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
@@ -438,8 +422,6 @@ type CommonCountRequest struct {
 	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() {
@@ -530,20 +512,6 @@ func (x *CommonCountRequest) GetHaving() []byte {
 	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{
@@ -614,7 +582,7 @@ var file_v1_request_query_proto_rawDesc = []byte{
 	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, 0xe5, 0x01, 0x0a, 0x11, 0x43, 0x6f, 0x75, 0x6e,
+	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,
@@ -625,33 +593,26 @@ var file_v1_request_query_proto_rawDesc = []byte{
 	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,
+	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,
 }
 
 var (

+ 361 - 0
pb/v1/response/event_query.pb.go

@@ -0,0 +1,361 @@
+// Code generated by protoc-gen-go. DO NOT EDIT.
+// versions:
+// 	protoc-gen-go v1.28.1
+// 	protoc        v3.12.4
+// source: v1/response/event_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 EventQueryResponse struct {
+	state         protoimpl.MessageState
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
+
+	Statement  string       `protobuf:"bytes,1,opt,name=Statement,proto3" json:"Statement,omitempty"`
+	Infos      []*EventInfo `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 *EventQueryResponse) Reset() {
+	*x = EventQueryResponse{}
+	if protoimpl.UnsafeEnabled {
+		mi := &file_v1_response_event_query_proto_msgTypes[0]
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		ms.StoreMessageInfo(mi)
+	}
+}
+
+func (x *EventQueryResponse) String() string {
+	return protoimpl.X.MessageStringOf(x)
+}
+
+func (*EventQueryResponse) ProtoMessage() {}
+
+func (x *EventQueryResponse) ProtoReflect() protoreflect.Message {
+	mi := &file_v1_response_event_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 EventQueryResponse.ProtoReflect.Descriptor instead.
+func (*EventQueryResponse) Descriptor() ([]byte, []int) {
+	return file_v1_response_event_query_proto_rawDescGZIP(), []int{0}
+}
+
+func (x *EventQueryResponse) GetStatement() string {
+	if x != nil {
+		return x.Statement
+	}
+	return ""
+}
+
+func (x *EventQueryResponse) GetInfos() []*EventInfo {
+	if x != nil {
+		return x.Infos
+	}
+	return nil
+}
+
+func (x *EventQueryResponse) GetTotalCount() int64 {
+	if x != nil {
+		return x.TotalCount
+	}
+	return 0
+}
+
+func (x *EventQueryResponse) GetPageNo() int32 {
+	if x != nil {
+		return x.PageNo
+	}
+	return 0
+}
+
+type CountEventResponse 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 *CountEventResponse) Reset() {
+	*x = CountEventResponse{}
+	if protoimpl.UnsafeEnabled {
+		mi := &file_v1_response_event_query_proto_msgTypes[1]
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		ms.StoreMessageInfo(mi)
+	}
+}
+
+func (x *CountEventResponse) String() string {
+	return protoimpl.X.MessageStringOf(x)
+}
+
+func (*CountEventResponse) ProtoMessage() {}
+
+func (x *CountEventResponse) ProtoReflect() protoreflect.Message {
+	mi := &file_v1_response_event_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 CountEventResponse.ProtoReflect.Descriptor instead.
+func (*CountEventResponse) Descriptor() ([]byte, []int) {
+	return file_v1_response_event_query_proto_rawDescGZIP(), []int{1}
+}
+
+func (x *CountEventResponse) GetStatement() string {
+	if x != nil {
+		return x.Statement
+	}
+	return ""
+}
+
+func (x *CountEventResponse) GetCount() int64 {
+	if x != nil {
+		return x.Count
+	}
+	return 0
+}
+
+type EventInfo struct {
+	state         protoimpl.MessageState
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
+
+	Key                string `protobuf:"bytes,1,opt,name=Key,proto3" json:"Key,omitempty"`
+	Version            string `protobuf:"bytes,2,opt,name=Version,proto3" json:"Version,omitempty"`
+	Operation          string `protobuf:"bytes,3,opt,name=Operation,proto3" json:"Operation,omitempty"`
+	Value              string `protobuf:"bytes,4,opt,name=Value,proto3" json:"Value,omitempty"`
+	CreatorID          string `protobuf:"bytes,5,opt,name=CreatorID,proto3" json:"CreatorID,omitempty"`
+	CreateTimeUnixNano int64  `protobuf:"varint,6,opt,name=CreateTimeUnixNano,proto3" json:"CreateTimeUnixNano,omitempty"`
+}
+
+func (x *EventInfo) Reset() {
+	*x = EventInfo{}
+	if protoimpl.UnsafeEnabled {
+		mi := &file_v1_response_event_query_proto_msgTypes[2]
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		ms.StoreMessageInfo(mi)
+	}
+}
+
+func (x *EventInfo) String() string {
+	return protoimpl.X.MessageStringOf(x)
+}
+
+func (*EventInfo) ProtoMessage() {}
+
+func (x *EventInfo) ProtoReflect() protoreflect.Message {
+	mi := &file_v1_response_event_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 EventInfo.ProtoReflect.Descriptor instead.
+func (*EventInfo) Descriptor() ([]byte, []int) {
+	return file_v1_response_event_query_proto_rawDescGZIP(), []int{2}
+}
+
+func (x *EventInfo) GetKey() string {
+	if x != nil {
+		return x.Key
+	}
+	return ""
+}
+
+func (x *EventInfo) GetVersion() string {
+	if x != nil {
+		return x.Version
+	}
+	return ""
+}
+
+func (x *EventInfo) GetOperation() string {
+	if x != nil {
+		return x.Operation
+	}
+	return ""
+}
+
+func (x *EventInfo) GetValue() string {
+	if x != nil {
+		return x.Value
+	}
+	return ""
+}
+
+func (x *EventInfo) GetCreatorID() string {
+	if x != nil {
+		return x.CreatorID
+	}
+	return ""
+}
+
+func (x *EventInfo) GetCreateTimeUnixNano() int64 {
+	if x != nil {
+		return x.CreateTimeUnixNano
+	}
+	return 0
+}
+
+var File_v1_response_event_query_proto protoreflect.FileDescriptor
+
+var file_v1_response_event_query_proto_rawDesc = []byte{
+	0x0a, 0x1d, 0x76, 0x31, 0x2f, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2f, 0x65, 0x76,
+	0x65, 0x6e, 0x74, 0x5f, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12,
+	0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x95, 0x01, 0x0a, 0x12, 0x45, 0x76,
+	0x65, 0x6e, 0x74, 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, 0x29,
+	0x0a, 0x05, 0x49, 0x6e, 0x66, 0x6f, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x13, 0x2e,
+	0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x49, 0x6e,
+	0x66, 0x6f, 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, 0x48, 0x0a, 0x12, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x45, 0x76, 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, 0x12, 0x14, 0x0a, 0x05, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02,
+	0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0xb9, 0x01, 0x0a, 0x09,
+	0x45, 0x76, 0x65, 0x6e, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x10, 0x0a, 0x03, 0x4b, 0x65, 0x79,
+	0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x4b, 0x65, 0x79, 0x12, 0x18, 0x0a, 0x07, 0x56,
+	0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x56, 0x65,
+	0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1c, 0x0a, 0x09, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69,
+	0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74,
+	0x69, 0x6f, 0x6e, 0x12, 0x14, 0x0a, 0x05, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x04, 0x20, 0x01,
+	0x28, 0x09, 0x52, 0x05, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x43, 0x72, 0x65,
+	0x61, 0x74, 0x6f, 0x72, 0x49, 0x44, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x43, 0x72,
+	0x65, 0x61, 0x74, 0x6f, 0x72, 0x49, 0x44, 0x12, 0x2e, 0x0a, 0x12, 0x43, 0x72, 0x65, 0x61, 0x74,
+	0x65, 0x54, 0x69, 0x6d, 0x65, 0x55, 0x6e, 0x69, 0x78, 0x4e, 0x61, 0x6e, 0x6f, 0x18, 0x06, 0x20,
+	0x01, 0x28, 0x03, 0x52, 0x12, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x55,
+	0x6e, 0x69, 0x78, 0x4e, 0x61, 0x6e, 0x6f, 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_event_query_proto_rawDescOnce sync.Once
+	file_v1_response_event_query_proto_rawDescData = file_v1_response_event_query_proto_rawDesc
+)
+
+func file_v1_response_event_query_proto_rawDescGZIP() []byte {
+	file_v1_response_event_query_proto_rawDescOnce.Do(func() {
+		file_v1_response_event_query_proto_rawDescData = protoimpl.X.CompressGZIP(file_v1_response_event_query_proto_rawDescData)
+	})
+	return file_v1_response_event_query_proto_rawDescData
+}
+
+var file_v1_response_event_query_proto_msgTypes = make([]protoimpl.MessageInfo, 3)
+var file_v1_response_event_query_proto_goTypes = []interface{}{
+	(*EventQueryResponse)(nil), // 0: response.EventQueryResponse
+	(*CountEventResponse)(nil), // 1: response.CountEventResponse
+	(*EventInfo)(nil),          // 2: response.EventInfo
+}
+var file_v1_response_event_query_proto_depIdxs = []int32{
+	2, // 0: response.EventQueryResponse.Infos:type_name -> response.EventInfo
+	1, // [1:1] is the sub-list for method output_type
+	1, // [1:1] is the sub-list for method input_type
+	1, // [1:1] is the sub-list for extension type_name
+	1, // [1:1] is the sub-list for extension extendee
+	0, // [0:1] is the sub-list for field type_name
+}
+
+func init() { file_v1_response_event_query_proto_init() }
+func file_v1_response_event_query_proto_init() {
+	if File_v1_response_event_query_proto != nil {
+		return
+	}
+	if !protoimpl.UnsafeEnabled {
+		file_v1_response_event_query_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*EventQueryResponse); i {
+			case 0:
+				return &v.state
+			case 1:
+				return &v.sizeCache
+			case 2:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_v1_response_event_query_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*CountEventResponse); i {
+			case 0:
+				return &v.state
+			case 1:
+				return &v.sizeCache
+			case 2:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_v1_response_event_query_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*EventInfo); 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_event_query_proto_rawDesc,
+			NumEnums:      0,
+			NumMessages:   3,
+			NumExtensions: 0,
+			NumServices:   0,
+		},
+		GoTypes:           file_v1_response_event_query_proto_goTypes,
+		DependencyIndexes: file_v1_response_event_query_proto_depIdxs,
+		MessageInfos:      file_v1_response_event_query_proto_msgTypes,
+	}.Build()
+	File_v1_response_event_query_proto = out.File
+	file_v1_response_event_query_proto_rawDesc = nil
+	file_v1_response_event_query_proto_goTypes = nil
+	file_v1_response_event_query_proto_depIdxs = nil
+}

+ 12 - 0
ports/client.go

@@ -1,5 +1,17 @@
 package ports
 
+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
 	Insert(request *InsertRequest) (string, error)

+ 0 - 4
ports/client_query_request.go

@@ -39,8 +39,6 @@ type CountWhereRequest struct {
 	TablePrefixWithSchema string
 	Version               string
 	Where                 []ColumnCompare
-	PageNo                int32
-	PageSize              int32
 }
 
 type CommonCountRequest struct {
@@ -52,6 +50,4 @@ type CommonCountRequest struct {
 	GroupBy               []string
 	Join                  string
 	Having                []ColumnCompare
-	PageNo                int32
-	PageSize              int32
 }

+ 56 - 0
test/v1/v1_test.go

@@ -133,3 +133,59 @@ func TestUpdate(t *testing.T) {
 		assertEqual(newNow.UnixMilli(), resultMap["time"].(time.Time).Local().UnixMilli(), "时间不一致").
 		assertEqual(newTableNum, resultMap["table_num"], "表数量不一致")
 }
+
+func TestDelete(t *testing.T) {
+	initClient(t, "localhost:30170")
+	defer destroyClient(t)
+
+	tablePrefix := "test." + simpleUUID()[0:8]
+
+	id := simpleUUID()
+	name := simpleUUID()
+	now := time.Now().Local()
+	tableNum := rand.New(rand.NewSource(now.Unix())).Intn(10)
+
+	var count int64
+
+	newToolKit(t).
+		autoMigrate(&ports.AutoMigrateRequest{
+			DatabaseID:            "2b78141779ee432295ca371b91c5cac7",
+			TablePrefixWithSchema: tablePrefix,
+			Version:               "v1",
+			TableModelDescribe:    tableModelDescribe,
+		}).
+		insert(&ports.InsertRequest{
+			DatabaseID:            "2b78141779ee432295ca371b91c5cac7",
+			TablePrefixWithSchema: tablePrefix,
+			Version:               "v1",
+			KeyColumns:            []string{"id"},
+			TableRow: map[string]any{
+				"id":        id,
+				"name":      name,
+				"time":      now,
+				"table_num": tableNum,
+			},
+			UserID: "test",
+		}).
+		delete(&ports.DeleteRequest{
+			DatabaseID:            "2b78141779ee432295ca371b91c5cac7",
+			TablePrefixWithSchema: tablePrefix,
+			Version:               "v1",
+			KeyValues:             map[string]string{"id": id},
+			UserID:                "test",
+		}).
+		countWhere(&ports.CountWhereRequest{
+			DatabaseID:            "2b78141779ee432295ca371b91c5cac7",
+			TablePrefixWithSchema: tablePrefix,
+			Version:               "v1",
+			Where: []ports.ColumnCompare{
+				{
+					Column:  "id",
+					Value:   id,
+					Compare: ports.CompareEqual,
+				},
+			},
+		}, &count).
+		assertEqual(int64(0), count, "数量不一致")
+
+}