Skip to content

Conversation

krishnangovindraj
Copy link
Member

@krishnangovindraj krishnangovindraj commented Sep 15, 2025

Release notes: usage and product changes

Add analyze endpoint and query structure

Implementation

analyze.proto and conjunction.proto recreate the HTTP API structure, for the most part.

Comment on lines 56 to 82
Match match = 1;
Insert insert = 2;
Put put = 3;
Update update = 4;
Delete delete = 5;
Select select = 6;
Sort sort = 7;
Require require = 8;
Offset offset = 9;
Limit limit = 10;
Distinct distinct = 11;
Reduce reduce = 12;
}

// They're all the same structure. Should we just use one?
message Match {
uint32 block = 1;
}
message Insert {
uint32 block = 1;
}
message Put {
uint32 block = 1;
}
message Update {
uint32 block = 1;
}
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Match, insert, put and update are just one block. They could all be represented by the message.
Should we or just keep them separate?

NamedRole named_role = 4;
// Error condition. Should be unreachable.
string unresolved = 5;
}
Copy link
Member Author

@krishnangovindraj krishnangovindraj Oct 6, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Much better handling of NamedRole.
Unresolved should currently never be reachable, but I've left it there for the error branch in core instead of using an unreachable! there. Should I just remove it?

Reduce reduce = 12;
}

// They're all the same structure. Should we just use one?
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I quite like them separate! In Rust itll be very easy to unpack them identically


package typedb.protocol;

message ConjunctionStructure {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since this is only used for analyze and for structure - i think a better name for the file is probably structure.proto?


message PipelineAnnotations {
repeated ConjunctionAnnotations conjunctions = 1;
message ConjunctionAnnotations {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we try to move this to the Conjunction?
Structure and Annotations have the same structure and are just unzipped. I don't see a great reason to keep it this way.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants