From fd60795f62335368255797db43eb0429ec1705fc Mon Sep 17 00:00:00 2001
From: Timm Fitschen <t.fitschen@indiscale.com>
Date: Fri, 21 Oct 2022 00:31:26 +0200
Subject: [PATCH] WIP: SELECT for GRPC API

---
 proto/caosdb/entity/v1/main.proto | 23 +++++++++++++++++------
 1 file changed, 17 insertions(+), 6 deletions(-)

diff --git a/proto/caosdb/entity/v1/main.proto b/proto/caosdb/entity/v1/main.proto
index 9938882..6893d31 100644
--- a/proto/caosdb/entity/v1/main.proto
+++ b/proto/caosdb/entity/v1/main.proto
@@ -539,17 +539,28 @@ message FindQueryResult {
 }
 
 // A single result row of a SELECT query
-message SelectQueryRows {
-  // The cells of the table row.
-  repeated string cells = 1;
+message SelectQueryRow {
+  // The cells of the table row contain the value of the SELECT'ed fields.
+  repeated Value cells = 2;
+}
+
+// A single header column of the result of a SELECT query
+message SelectQueryColumn {
+  // The column name. This is one of the SELECT'ed fields.
+  string name = 1;
+}
+
+// The header line of the result of a SELECT query
+message SelectQueryHeader {
+  repeated SelectQueryColumn columns = 1;
 }
 
 // A table which is a result of a SELECT query
 message SelectQueryResult {
-  // A single row which contains the SELECT'ed fields
-  SelectQueryRows header = 1;
+  // The header contains the SELECT'ed fields
+  SelectQueryHeader header = 3;
   // The actual results
-  repeated SelectQueryRows data_rows = 2;
+  repeated SelectQueryRow data_rows = 4;
 }
 
 ///////////////////////////////////////////////////////////////////////////
-- 
GitLab