Skip to content

Commit b25355a

Browse files
Refactor initial query responses
1 parent f8b1d04 commit b25355a

File tree

2 files changed

+12
-18
lines changed

2 files changed

+12
-18
lines changed

proto/query.proto

Lines changed: 11 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ message Query {
1717
string query = 2;
1818
}
1919

20-
message Res {
20+
message InitialRes {
2121
oneof res {
2222
Error error = 1;
2323
Ok ok = 2;
@@ -26,7 +26,6 @@ message Query {
2626
message Ok {
2727
oneof ok {
2828
Empty empty = 1;
29-
Values values = 2;
3029
ReadableConceptTreeStream readable_concept_tree_stream = 3;
3130
AnswerRowStream concept_row_stream = 4;
3231
}
@@ -35,15 +34,6 @@ message Query {
3534

3635
}
3736

38-
message Values {
39-
// note: we could use this first response to record debug info, type annotations, warnings, etc
40-
repeated OptionalValue values = 1;
41-
42-
message OptionalValue {
43-
optional Value value = 1;
44-
}
45-
}
46-
4737
message ReadableConceptTreeStream {
4838
// note: we could use this first response to record debug info, type annotations, warnings, etc
4939
}
@@ -55,13 +45,17 @@ message Query {
5545
}
5646

5747
message ResPart {
58-
repeated Res res = 1;
48+
oneof res {
49+
ReadableConceptTreesRes trees_res = 1;
50+
AnswerRowsRes rows_res = 2;
51+
}
5952

60-
message Res {
61-
oneof res {
62-
ReadableConceptTree tree = 2;
63-
AnswerRow answer_row = 3;
64-
}
53+
message ReadableConceptTreesRes {
54+
repeated ReadableConceptTree trees = 1;
55+
}
56+
57+
message AnswerRowsRes {
58+
repeated AnswerRow rows = 1;
6559
}
6660
}
6761
}

proto/transaction.proto

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ message Transaction {
4040
bytes req_id = 1;
4141
oneof res {
4242
Open.Res open_res = 2;
43-
Query.Res query_res = 3;
43+
Query.InitialRes query_res = 3;
4444
Commit.Res commit_res = 5;
4545
Rollback.Res rollback_res = 6;
4646
}

0 commit comments

Comments
 (0)