Skip to content

Add ability for nested field identifiers #11

@tchinz

Description

@tchinz

Take these as example protobuf types

type AuditEvent struct {
	state         protoimpl.MessageState
	sizeCache     protoimpl.SizeCache
	unknownFields protoimpl.UnknownFields
    ...
	Id             string                 `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	Actor          *Actor                 `protobuf:"bytes,3,opt,name=actor,proto3" json:"actor,omitempty"`
    ...
}

type Actor struct {
	state         protoimpl.MessageState
	sizeCache     protoimpl.SizeCache
	unknownFields protoimpl.UnknownFields

	Id           string    `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"`
}

Currently a filter like this:

	ListAuditEventsRequest{
		PageSize: 100,
		Filter:   `actor.id:"` + actorId + `"`,
	})

with pika implementation:

	qs := pika.Q[audit_events](r.pika)
	opts := pika.ProtoReflect(&fbapi.AuditEvent{})

	events, token, err := qs.GetPage(ctx, request, opts)
	if err != nil {
		return nil, err
	}

results in

                Error:          Received unexpected error:
                                applying filter from page token: unexpected identifier id

Note that the actor id is a nested identifier. id is a field on the Actor type

This issue is for adding thee ability for Pika to support AIP160 filtering for nested identifiers like actor.id

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions