Skip to content

Commit

Permalink
Add Query::Type to ConceptRowStream (#209)
Browse files Browse the repository at this point in the history
## Release notes: usage and product changes
In 3.0, we no longer use parsers on our user-facing clients, and we no
longer can differentiate the types of queries we are executing on the
server. However, it can be sometimes useful (e.g. for extra
logging/messaging) to have at least some information about the nature of
the queries.
For these purposes, we add the executed query's type to
`ConceptRowStream`.

## Implementation
For now, it's just general `Read/Write/Schema` (like transaction types),
which is enough for our existing tasks.
  • Loading branch information
farost authored Sep 26, 2024
1 parent 7bfca38 commit 47667a3
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions proto/query.proto
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,12 @@ package typedb.protocol;

message Query {

enum Type {
READ = 0;
WRITE = 1;
SCHEMA = 2;
}

message Req {
Options options = 1;
string query = 2;
Expand All @@ -36,10 +42,12 @@ message Query {

message ReadableConceptTreeStream {
// note: we could use this first response to record debug info, type annotations, warnings, etc
// TODO: Add Type query_type
}

message ConceptRowStream {
repeated string column_variable_names = 1;
Type query_type = 2;
}
}
}
Expand Down

0 comments on commit 47667a3

Please sign in to comment.