From d128fa6ee3256b8d58c1ba7ac96c1b9a6a1e6753 Mon Sep 17 00:00:00 2001 From: Mustafa Gezen Date: Wed, 20 Mar 2024 17:23:13 +0100 Subject: [PATCH 1/2] Allow fetching the count from GetPage This change adds an optional count argument to GetPage. To make it optional it's implemented as a variadic function but only one count pointer is accepted if set. --- pika.go | 4 +- pika_page_token.go | 2 +- pika_psql.go | 10 +- pika_psql_test.go | 19 ++++ testproto/test.pb.go | 221 ++++++++++++++++++++++++++++++++++++++----- testproto/test.proto | 13 +++ 6 files changed, 242 insertions(+), 27 deletions(-) diff --git a/pika.go b/pika.go index 32bfd6a..18615d5 100644 --- a/pika.go +++ b/pika.go @@ -155,7 +155,9 @@ type QuerySet[T any] interface { AIP160(filter string, options AIPFilterOptions) (QuerySet[T], error) // Page token functionality for gRPC - GetPage(paginatable Paginatable, options AIPFilterOptions) ([]*T, string, error) + // The count is optional and returns the total number of rows for the query. + // It is implemented as a variadic function to not break existing code. + GetPage(paginatable Paginatable, options AIPFilterOptions, count ...*int) ([]*T, string, error) // Join table InnerJoin(modelFirst, modelSecond interface{}, keyFirst, keySecond string) QuerySet[T] diff --git a/pika_page_token.go b/pika_page_token.go index 7ce0f19..1a6f93e 100644 --- a/pika_page_token.go +++ b/pika_page_token.go @@ -57,7 +57,7 @@ func (p *PageToken[T]) Encode() (string, error) { return base64.URLEncoding.EncodeToString(data), nil } -// ParsePageToken constructs a PageToken from a base64-encoded string +// Decode constructs a PageToken from a base64-encoded string func (p *PageToken[T]) Decode(s string) error { data, err := base64.URLEncoding.DecodeString(s) if err != nil { diff --git a/pika_psql.go b/pika_psql.go index c03dbe5..c71562f 100644 --- a/pika_psql.go +++ b/pika_psql.go @@ -542,7 +542,11 @@ func (b *basePsql[T]) AIP160(filter string, options AIPFilterOptions) (QuerySet[ } // Page tokens for gRPC -func (b *basePsql[T]) GetPage(paginatable Paginatable, options AIPFilterOptions) ([]*T, string, error) { +func (b *basePsql[T]) GetPage(paginatable Paginatable, options AIPFilterOptions, countPointer ...*int) ([]*T, string, error) { + if len(countPointer) > 1 { + return nil, "", fmt.Errorf("too many arguments (count should be one pointer or none)") + } + if b.err != nil { return nil, "", b.err } @@ -579,6 +583,10 @@ func (b *basePsql[T]) GetPage(paginatable Paginatable, options AIPFilterOptions) return nil, "", fmt.Errorf("getting count: %w", err) } + if len(countPointer) > 0 { + *countPointer[0] = count + } + // If no more results after this page, return empty page token if b.PageToken.Offset >= uint(count) { return result, "", nil diff --git a/pika_psql_test.go b/pika_psql_test.go index a457727..ae1477d 100644 --- a/pika_psql_test.go +++ b/pika_psql_test.go @@ -16,6 +16,7 @@ import ( "github.com/lib/pq" "github.com/stretchr/testify/require" orderedmap "github.com/wk8/go-ordered-map/v2" + pikatestpb "go.ciq.dev/pika/testproto" ) var pgInstance *embeddedpostgres.EmbeddedPostgres @@ -1735,3 +1736,21 @@ func TestFilterMissingArgs(t *testing.T) { _, err = qs.Count() requireError(err) } + +func TestGetPageCount(t *testing.T) { + psql := newPsql(t) + createTestEntries(t, psql) + qs := Q[simpleModel1](psql) + + aipOptions := ProtoReflect(&pikatestpb.SimpleModel1{}) + req := &pikatestpb.TestRequest1{ + PageSize: int32(1), + } + var count int + page, nt, err := qs.GetPage(req, aipOptions, &count) + require.Nil(t, err) + + require.Equal(t, 1, len(page)) + require.NotEmpty(t, nt) + require.Equal(t, 3, count) +} diff --git a/testproto/test.pb.go b/testproto/test.pb.go index 96c6120..4384d3f 100644 --- a/testproto/test.pb.go +++ b/testproto/test.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.27.1 -// protoc v3.19.3 +// protoc v3.21.12 // source: test.proto package pikatestpb @@ -272,6 +272,140 @@ func (x *Complete3) GetStrs() []string { return nil } +type TestRequest1 struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + PageSize int32 `protobuf:"varint,1,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` + PageToken string `protobuf:"bytes,2,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"` + Filter string `protobuf:"bytes,3,opt,name=filter,proto3" json:"filter,omitempty"` + OrderBy string `protobuf:"bytes,4,opt,name=order_by,json=orderBy,proto3" json:"order_by,omitempty"` +} + +func (x *TestRequest1) Reset() { + *x = TestRequest1{} + if protoimpl.UnsafeEnabled { + mi := &file_test_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *TestRequest1) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TestRequest1) ProtoMessage() {} + +func (x *TestRequest1) ProtoReflect() protoreflect.Message { + mi := &file_test_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 TestRequest1.ProtoReflect.Descriptor instead. +func (*TestRequest1) Descriptor() ([]byte, []int) { + return file_test_proto_rawDescGZIP(), []int{3} +} + +func (x *TestRequest1) GetPageSize() int32 { + if x != nil { + return x.PageSize + } + return 0 +} + +func (x *TestRequest1) GetPageToken() string { + if x != nil { + return x.PageToken + } + return "" +} + +func (x *TestRequest1) GetFilter() string { + if x != nil { + return x.Filter + } + return "" +} + +func (x *TestRequest1) GetOrderBy() string { + if x != nil { + return x.OrderBy + } + return "" +} + +type SimpleModel1 struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` + Title string `protobuf:"bytes,2,opt,name=title,proto3" json:"title,omitempty"` + Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"` +} + +func (x *SimpleModel1) Reset() { + *x = SimpleModel1{} + if protoimpl.UnsafeEnabled { + mi := &file_test_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SimpleModel1) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SimpleModel1) ProtoMessage() {} + +func (x *SimpleModel1) ProtoReflect() protoreflect.Message { + mi := &file_test_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SimpleModel1.ProtoReflect.Descriptor instead. +func (*SimpleModel1) Descriptor() ([]byte, []int) { + return file_test_proto_rawDescGZIP(), []int{4} +} + +func (x *SimpleModel1) GetId() int64 { + if x != nil { + return x.Id + } + return 0 +} + +func (x *SimpleModel1) GetTitle() string { + if x != nil { + return x.Title + } + return "" +} + +func (x *SimpleModel1) GetDescription() string { + if x != nil { + return x.Description + } + return "" +} + var File_test_proto protoreflect.FileDescriptor var file_test_proto_rawDesc = []byte{ @@ -304,19 +438,32 @@ var file_test_proto_rawDesc = []byte{ 0x12, 0x1f, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x07, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x74, 0x72, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x09, 0x52, - 0x04, 0x73, 0x74, 0x72, 0x73, 0x2a, 0x8c, 0x01, 0x0a, 0x06, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, - 0x12, 0x16, 0x0a, 0x12, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, - 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0d, 0x0a, 0x09, 0x53, 0x54, 0x41, 0x54, - 0x55, 0x53, 0x5f, 0x4f, 0x4b, 0x10, 0x01, 0x12, 0x10, 0x0a, 0x0c, 0x53, 0x54, 0x41, 0x54, 0x55, - 0x53, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, 0x02, 0x12, 0x13, 0x0a, 0x0f, 0x53, 0x54, 0x41, - 0x54, 0x55, 0x53, 0x5f, 0x43, 0x41, 0x4e, 0x43, 0x45, 0x4c, 0x45, 0x44, 0x10, 0x03, 0x12, 0x10, - 0x0a, 0x0c, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x54, 0x45, 0x53, 0x54, 0x32, 0x10, 0x04, - 0x12, 0x10, 0x0a, 0x0c, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x54, 0x45, 0x53, 0x54, 0x33, - 0x10, 0x05, 0x12, 0x10, 0x0a, 0x0c, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x54, 0x45, 0x53, - 0x54, 0x34, 0x10, 0x06, 0x42, 0x26, 0x5a, 0x24, 0x67, 0x6f, 0x2e, 0x63, 0x69, 0x71, 0x2e, 0x63, - 0x6f, 0x6d, 0x2f, 0x70, 0x69, 0x6b, 0x61, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x3b, 0x70, 0x69, 0x6b, 0x61, 0x74, 0x65, 0x73, 0x74, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x33, + 0x04, 0x73, 0x74, 0x72, 0x73, 0x22, 0x7d, 0x0a, 0x0c, 0x54, 0x65, 0x73, 0x74, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x31, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, + 0x7a, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, + 0x7a, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, + 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x19, 0x0a, 0x08, 0x6f, 0x72, 0x64, + 0x65, 0x72, 0x5f, 0x62, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6f, 0x72, 0x64, + 0x65, 0x72, 0x42, 0x79, 0x22, 0x56, 0x0a, 0x0c, 0x53, 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x4d, 0x6f, + 0x64, 0x65, 0x6c, 0x31, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, + 0x52, 0x02, 0x69, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, + 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x2a, 0x8c, 0x01, 0x0a, + 0x06, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x16, 0x0a, 0x12, 0x53, 0x54, 0x41, 0x54, 0x55, + 0x53, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, + 0x0d, 0x0a, 0x09, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x4f, 0x4b, 0x10, 0x01, 0x12, 0x10, + 0x0a, 0x0c, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, 0x02, + 0x12, 0x13, 0x0a, 0x0f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x43, 0x41, 0x4e, 0x43, 0x45, + 0x4c, 0x45, 0x44, 0x10, 0x03, 0x12, 0x10, 0x0a, 0x0c, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, + 0x54, 0x45, 0x53, 0x54, 0x32, 0x10, 0x04, 0x12, 0x10, 0x0a, 0x0c, 0x53, 0x54, 0x41, 0x54, 0x55, + 0x53, 0x5f, 0x54, 0x45, 0x53, 0x54, 0x33, 0x10, 0x05, 0x12, 0x10, 0x0a, 0x0c, 0x53, 0x54, 0x41, + 0x54, 0x55, 0x53, 0x5f, 0x54, 0x45, 0x53, 0x54, 0x34, 0x10, 0x06, 0x42, 0x26, 0x5a, 0x24, 0x67, + 0x6f, 0x2e, 0x63, 0x69, 0x71, 0x2e, 0x64, 0x65, 0x76, 0x2f, 0x70, 0x69, 0x6b, 0x61, 0x2f, 0x74, + 0x65, 0x73, 0x74, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x3b, 0x70, 0x69, 0x6b, 0x61, 0x74, 0x65, 0x73, + 0x74, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -332,22 +479,24 @@ func file_test_proto_rawDescGZIP() []byte { } var file_test_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_test_proto_msgTypes = make([]protoimpl.MessageInfo, 3) +var file_test_proto_msgTypes = make([]protoimpl.MessageInfo, 5) var file_test_proto_goTypes = []interface{}{ (Status)(0), // 0: Status (*Simple1)(nil), // 1: Simple1 (*SimpleWrappers2)(nil), // 2: SimpleWrappers2 (*Complete3)(nil), // 3: Complete3 - (*wrapperspb.StringValue)(nil), // 4: google.protobuf.StringValue - (*wrapperspb.Int32Value)(nil), // 5: google.protobuf.Int32Value - (*wrapperspb.BoolValue)(nil), // 6: google.protobuf.BoolValue - (*timestamppb.Timestamp)(nil), // 7: google.protobuf.Timestamp + (*TestRequest1)(nil), // 4: TestRequest1 + (*SimpleModel1)(nil), // 5: SimpleModel1 + (*wrapperspb.StringValue)(nil), // 6: google.protobuf.StringValue + (*wrapperspb.Int32Value)(nil), // 7: google.protobuf.Int32Value + (*wrapperspb.BoolValue)(nil), // 8: google.protobuf.BoolValue + (*timestamppb.Timestamp)(nil), // 9: google.protobuf.Timestamp } var file_test_proto_depIdxs = []int32{ - 4, // 0: SimpleWrappers2.name:type_name -> google.protobuf.StringValue - 5, // 1: Complete3.nullable_int:type_name -> google.protobuf.Int32Value - 6, // 2: Complete3.nullable_bool:type_name -> google.protobuf.BoolValue - 7, // 3: Complete3.timestamp:type_name -> google.protobuf.Timestamp + 6, // 0: SimpleWrappers2.name:type_name -> google.protobuf.StringValue + 7, // 1: Complete3.nullable_int:type_name -> google.protobuf.Int32Value + 8, // 2: Complete3.nullable_bool:type_name -> google.protobuf.BoolValue + 9, // 3: Complete3.timestamp:type_name -> google.protobuf.Timestamp 0, // 4: Complete3.status:type_name -> Status 5, // [5:5] is the sub-list for method output_type 5, // [5:5] is the sub-list for method input_type @@ -398,6 +547,30 @@ func file_test_proto_init() { return nil } } + file_test_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TestRequest1); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_test_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SimpleModel1); 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{ @@ -405,7 +578,7 @@ func file_test_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_test_proto_rawDesc, NumEnums: 1, - NumMessages: 3, + NumMessages: 5, NumExtensions: 0, NumServices: 0, }, diff --git a/testproto/test.proto b/testproto/test.proto index 3413558..75109e5 100644 --- a/testproto/test.proto +++ b/testproto/test.proto @@ -32,3 +32,16 @@ message Complete3 { Status status = 6; repeated string strs = 7; } + +message TestRequest1 { + int32 page_size = 1; + string page_token = 2; + string filter = 3; + string order_by = 4; +} + +message SimpleModel1 { + int64 id = 1; + string title = 2; + string description = 3; +} From cdd9dd1bddf43b294d3bc3d7930eb2d6cf4aa1f5 Mon Sep 17 00:00:00 2001 From: Mustafa Gezen Date: Wed, 20 Mar 2024 17:32:25 +0100 Subject: [PATCH 2/2] Fix copyright header --- parser/gen.go | 2 +- pika.go | 2 +- pika_aip_filter.go | 2 +- pika_aip_filter_proto.go | 2 +- pika_aip_filter_proto_test.go | 2 +- pika_aip_filter_psql_test.go | 2 +- pika_page_token.go | 2 +- pika_psql.go | 2 +- pika_psql_experimental.go | 2 +- pika_psql_test.go | 2 +- testproto/gen.go | 2 +- utils.go | 2 +- 12 files changed, 12 insertions(+), 12 deletions(-) diff --git a/parser/gen.go b/parser/gen.go index 17c6975..1fe3572 100644 --- a/parser/gen.go +++ b/parser/gen.go @@ -1,4 +1,4 @@ -// SPDX-FileCopyrightText: Copyright (c) 2023, Ctrl IQ, Inc. All rights reserved +// SPDX-FileCopyrightText: Copyright (c) 2023-2024, Ctrl IQ, Inc. All rights reserved // SPDX-License-Identifier: Apache-2.0 package parser diff --git a/pika.go b/pika.go index 18615d5..3af1c3f 100644 --- a/pika.go +++ b/pika.go @@ -1,4 +1,4 @@ -// SPDX-FileCopyrightText: Copyright (c) 2023, Ctrl IQ, Inc. All rights reserved +// SPDX-FileCopyrightText: Copyright (c) 2023-2024, Ctrl IQ, Inc. All rights reserved // SPDX-License-Identifier: Apache-2.0 package pika diff --git a/pika_aip_filter.go b/pika_aip_filter.go index 15f9131..abb116e 100644 --- a/pika_aip_filter.go +++ b/pika_aip_filter.go @@ -1,4 +1,4 @@ -// SPDX-FileCopyrightText: Copyright (c) 2023, Ctrl IQ, Inc. All rights reserved +// SPDX-FileCopyrightText: Copyright (c) 2023-2024, Ctrl IQ, Inc. All rights reserved // SPDX-License-Identifier: Apache-2.0 package pika diff --git a/pika_aip_filter_proto.go b/pika_aip_filter_proto.go index 3a51316..2138c8f 100644 --- a/pika_aip_filter_proto.go +++ b/pika_aip_filter_proto.go @@ -1,4 +1,4 @@ -// SPDX-FileCopyrightText: Copyright (c) 2023, Ctrl IQ, Inc. All rights reserved +// SPDX-FileCopyrightText: Copyright (c) 2023-2024, Ctrl IQ, Inc. All rights reserved // SPDX-License-Identifier: Apache-2.0 package pika diff --git a/pika_aip_filter_proto_test.go b/pika_aip_filter_proto_test.go index 6edd4b8..39d39ad 100644 --- a/pika_aip_filter_proto_test.go +++ b/pika_aip_filter_proto_test.go @@ -1,4 +1,4 @@ -// SPDX-FileCopyrightText: Copyright (c) 2023, Ctrl IQ, Inc. All rights reserved +// SPDX-FileCopyrightText: Copyright (c) 2023-2024, Ctrl IQ, Inc. All rights reserved // SPDX-License-Identifier: Apache-2.0 package pika diff --git a/pika_aip_filter_psql_test.go b/pika_aip_filter_psql_test.go index 75aa72b..5d4e595 100644 --- a/pika_aip_filter_psql_test.go +++ b/pika_aip_filter_psql_test.go @@ -1,4 +1,4 @@ -// SPDX-FileCopyrightText: Copyright (c) 2023, Ctrl IQ, Inc. All rights reserved +// SPDX-FileCopyrightText: Copyright (c) 2023-2024, Ctrl IQ, Inc. All rights reserved // SPDX-License-Identifier: Apache-2.0 package pika diff --git a/pika_page_token.go b/pika_page_token.go index 1a6f93e..03b39d2 100644 --- a/pika_page_token.go +++ b/pika_page_token.go @@ -1,4 +1,4 @@ -// SPDX-FileCopyrightText: Copyright (c) 2023, Ctrl IQ, Inc. All rights reserved +// SPDX-FileCopyrightText: Copyright (c) 2023-2024, Ctrl IQ, Inc. All rights reserved // SPDX-License-Identifier: Apache-2.0 package pika diff --git a/pika_psql.go b/pika_psql.go index c71562f..6747925 100644 --- a/pika_psql.go +++ b/pika_psql.go @@ -1,4 +1,4 @@ -// SPDX-FileCopyrightText: Copyright (c) 2023, Ctrl IQ, Inc. All rights reserved +// SPDX-FileCopyrightText: Copyright (c) 2023-2024, Ctrl IQ, Inc. All rights reserved // SPDX-License-Identifier: Apache-2.0 package pika diff --git a/pika_psql_experimental.go b/pika_psql_experimental.go index f727873..520ad5d 100644 --- a/pika_psql_experimental.go +++ b/pika_psql_experimental.go @@ -1,4 +1,4 @@ -// SPDX-FileCopyrightText: Copyright (c) 2023, Ctrl IQ, Inc. All rights reserved +// SPDX-FileCopyrightText: Copyright (c) 2023-2024, Ctrl IQ, Inc. All rights reserved // SPDX-License-Identifier: Apache-2.0 package pika diff --git a/pika_psql_test.go b/pika_psql_test.go index ae1477d..338c3c6 100644 --- a/pika_psql_test.go +++ b/pika_psql_test.go @@ -1,4 +1,4 @@ -// SPDX-FileCopyrightText: Copyright (c) 2023, Ctrl IQ, Inc. All rights reserved +// SPDX-FileCopyrightText: Copyright (c) 2023-2024, Ctrl IQ, Inc. All rights reserved // SPDX-License-Identifier: Apache-2.0 package pika diff --git a/testproto/gen.go b/testproto/gen.go index b76aeab..adc0981 100644 --- a/testproto/gen.go +++ b/testproto/gen.go @@ -1,4 +1,4 @@ -// SPDX-FileCopyrightText: Copyright (c) 2023, Ctrl IQ, Inc. All rights reserved +// SPDX-FileCopyrightText: Copyright (c) 2023-2024, Ctrl IQ, Inc. All rights reserved // SPDX-License-Identifier: Apache-2.0 //go:generate protoc --go_opt=paths=source_relative --go_out=. test.proto diff --git a/utils.go b/utils.go index 27580d2..c5fea56 100644 --- a/utils.go +++ b/utils.go @@ -1,4 +1,4 @@ -// SPDX-FileCopyrightText: Copyright (c) 2023, Ctrl IQ, Inc. All rights reserved +// SPDX-FileCopyrightText: Copyright (c) 2023-2024, Ctrl IQ, Inc. All rights reserved // SPDX-License-Identifier: Apache-2.0 package pika