Skip to content

Commit 47667a3

Browse files
authored
Add Query::Type to ConceptRowStream (#209)
## 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.
1 parent 7bfca38 commit 47667a3

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

proto/query.proto

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,12 @@ package typedb.protocol;
1212

1313
message Query {
1414

15+
enum Type {
16+
READ = 0;
17+
WRITE = 1;
18+
SCHEMA = 2;
19+
}
20+
1521
message Req {
1622
Options options = 1;
1723
string query = 2;
@@ -36,10 +42,12 @@ message Query {
3642

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

4148
message ConceptRowStream {
4249
repeated string column_variable_names = 1;
50+
Type query_type = 2;
4351
}
4452
}
4553
}

0 commit comments

Comments
 (0)