github.com/matrixorigin/matrixone@v1.2.0/pkg/vm/engine/memoryengine/operations.proto (about) 1 /* 2 * Copyright 2021 Matrix Origin 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 17 syntax = "proto3"; 18 package memoryengine; 19 20 import "github.com/gogo/protobuf/gogoproto/gogo.proto"; 21 import "plan.proto"; 22 23 option (gogoproto.sizer_all) = false; 24 option (gogoproto.protosizer_all) = true; 25 option (gogoproto.goproto_enum_prefix_all) = false; 26 option (gogoproto.goproto_unrecognized_all) = false; 27 option (gogoproto.goproto_unkeyed_all) = false; 28 option (gogoproto.goproto_sizecache_all) = false; 29 30 message AccessInfo { 31 option (gogoproto.typedecl) = false; 32 uint32 AccountID = 1; 33 uint32 UserID = 2; 34 uint32 RoleID = 3; 35 } 36 37 message OpenDatabaseReq { 38 option (gogoproto.typedecl) = false; 39 AccessInfo AccessInfo = 1 [(gogoproto.nullable) = false]; 40 string Name = 2; 41 } 42 43 message OpenDatabaseResp { 44 option (gogoproto.typedecl) = false; 45 uint64 ID = 1 [(gogoproto.casttype) = "ID"]; 46 string name = 2; 47 } 48 49 message CreateDatabaseReq { 50 option (gogoproto.typedecl) = false; 51 uint64 ID = 1 [(gogoproto.casttype) = "ID"]; 52 AccessInfo access_info = 2 [(gogoproto.nullable) = false]; 53 string name = 3; 54 } 55 56 message CreateDatabaseResp { 57 option (gogoproto.typedecl) = false; 58 uint64 ID = 1 [(gogoproto.casttype) = "ID"]; 59 } 60 61 message GetDatabasesReq { 62 option (gogoproto.typedecl) = false; 63 AccessInfo AccessInfo = 1 [(gogoproto.nullable) = false]; 64 } 65 66 message GetDatabasesResp { 67 option (gogoproto.typedecl) = false; 68 repeated string Names = 1; 69 } 70 71 message DeleteDatabaseReq { 72 option (gogoproto.typedecl) = false; 73 AccessInfo AccessInfo = 1 [(gogoproto.nullable) = false]; 74 string Name = 2; 75 } 76 77 message DeleteDatabaseResp { 78 option (gogoproto.typedecl) = false; 79 uint64 ID = 1 [(gogoproto.casttype) = "ID"]; 80 } 81 82 message OpenRelationReq { 83 option (gogoproto.typedecl) = false; 84 uint64 DatabaseID = 1 [(gogoproto.casttype) = "ID"]; 85 string DatabaseName = 2; 86 string Name = 3; 87 } 88 89 message OpenRelationResp { 90 option (gogoproto.typedecl) = false; 91 uint64 ID = 1 [(gogoproto.casttype) = "ID"]; 92 uint32 type = 2 [(gogoproto.casttype) = "RelationType"]; 93 string DatabaseName = 3; 94 string RelationName = 4; 95 } 96 97 message CreateRelationReq { 98 option (gogoproto.typedecl) = false; 99 uint64 ID = 1 [(gogoproto.casttype) = "ID"]; 100 uint64 DatabaseID = 2 [(gogoproto.casttype) = "ID"]; 101 string database_name = 3; 102 string name = 4; 103 uint32 type = 5 [(gogoproto.casttype) = "RelationType"]; 104 repeated bytes Defs = 6 105 [(gogoproto.customtype) = 106 "github.com/matrixorigin/matrixone/pkg/vm/engine.TableDefPB"]; 107 } 108 109 message CreateRelationResp { 110 option (gogoproto.typedecl) = false; 111 uint64 ID = 1 [(gogoproto.casttype) = "ID"]; 112 } 113 114 message GetRelationsReq { 115 option (gogoproto.typedecl) = false; 116 uint64 DatabaseID = 1 [(gogoproto.casttype) = "ID"]; 117 } 118 119 message GetRelationsResp { 120 option (gogoproto.typedecl) = false; 121 repeated string Names = 1; 122 } 123 124 message DeleteRelationReq { 125 option (gogoproto.typedecl) = false; 126 uint64 DatabaseID = 1 [(gogoproto.casttype) = "ID"]; 127 string DatabaseName = 2; 128 string Name = 3; 129 } 130 131 message DeleteRelationResp { 132 option (gogoproto.typedecl) = false; 133 uint64 ID = 1 [(gogoproto.casttype) = "ID"]; 134 } 135 136 message GetTableDefsReq { 137 option (gogoproto.typedecl) = false; 138 uint64 TableID = 1 [(gogoproto.casttype) = "ID"]; 139 } 140 141 message GetTableDefsResp { 142 option (gogoproto.typedecl) = false; 143 repeated bytes Defs = 1 144 [(gogoproto.customtype) = 145 "github.com/matrixorigin/matrixone/pkg/vm/engine.TableDefPB"]; 146 } 147 148 message WriteResp { 149 option (gogoproto.typedecl) = false; 150 } 151 152 message NewTableIterReq { 153 option (gogoproto.typedecl) = false; 154 uint64 TableID = 1 [(gogoproto.casttype) = "ID"]; 155 plan.Expr Expr = 2; 156 } 157 158 message NewTableIterResp { 159 option (gogoproto.typedecl) = false; 160 uint64 IterID = 1 [(gogoproto.casttype) = "ID"]; 161 } 162 163 message ReadReq { 164 option (gogoproto.typedecl) = false; 165 uint64 IterID = 1 [(gogoproto.casttype) = "ID"]; 166 repeated string ColNames = 2; 167 } 168 169 message DeleteResp { 170 option (gogoproto.typedecl) = false; 171 } 172 173 message GetPrimaryKeysReq { 174 option (gogoproto.typedecl) = false; 175 uint64 TableID = 1 [(gogoproto.casttype) = "ID"]; 176 } 177 178 message GetPrimaryKeysResp { 179 option (gogoproto.typedecl) = false; 180 repeated bytes Attrs = 1 181 [(gogoproto.customtype) = 182 "github.com/matrixorigin/matrixone/pkg/vm/engine.Attribute"]; 183 } 184 185 message CloseTableIterReq { 186 option (gogoproto.typedecl) = false; 187 uint64 IterID = 1 [(gogoproto.casttype) = "ID"]; 188 } 189 190 message CloseTableIterResp { 191 option (gogoproto.typedecl) = false; 192 } 193 194 message GetHiddenKeysReq { 195 option (gogoproto.typedecl) = false; 196 uint64 TableID = 1 [(gogoproto.casttype) = "ID"]; 197 } 198 199 message GetHiddenKeysResp { 200 option (gogoproto.typedecl) = false; 201 repeated bytes Attrs = 1 202 [(gogoproto.customtype) = 203 "github.com/matrixorigin/matrixone/pkg/vm/engine.Attribute"]; 204 } 205 206 message TableStatsReq { 207 option (gogoproto.typedecl) = false; 208 uint64 TableID = 1 [(gogoproto.casttype) = "ID"]; 209 } 210 211 message TableStatsResp { 212 option (gogoproto.typedecl) = false; 213 int64 Rows = 1 [(gogoproto.casttype) = "int"]; 214 } 215 216 message GetTableColumnsReq { 217 option (gogoproto.typedecl) = false; 218 uint64 TableID = 1 [(gogoproto.casttype) = "ID"]; 219 } 220 221 message GetTableColumnsResp { 222 option (gogoproto.typedecl) = false; 223 repeated bytes Attrs = 1 224 [(gogoproto.customtype) = 225 "github.com/matrixorigin/matrixone/pkg/vm/engine.Attribute"]; 226 } 227 228 message TruncateRelationReq { 229 option (gogoproto.typedecl) = false; 230 uint64 NewTableID = 1 [(gogoproto.casttype) = "ID"]; 231 uint64 OldTableID = 2 [(gogoproto.casttype) = "ID"]; 232 uint64 DatabaseID = 3 [(gogoproto.casttype) = "ID"]; 233 string DatabaseName = 4; 234 string Name = 5; 235 } 236 237 message TruncateRelationResp { 238 option (gogoproto.typedecl) = false; 239 uint64 ID = 1 [(gogoproto.casttype) = "ID"]; 240 } 241 242 message AddTableDefReq { 243 option (gogoproto.typedecl) = false; 244 uint64 TableID = 1 [(gogoproto.casttype) = "ID"]; 245 string DatabaseName = 2; 246 string TableName = 3; 247 bytes Def = 4 [ 248 (gogoproto.nullable) = false, 249 (gogoproto.customtype) = 250 "github.com/matrixorigin/matrixone/pkg/vm/engine.TableDefPB" 251 ]; 252 } 253 254 message AddTableDefResp { 255 option (gogoproto.typedecl) = false; 256 } 257 258 message DelTableDefReq { 259 option (gogoproto.typedecl) = false; 260 uint64 TableID = 1 [(gogoproto.casttype) = "ID"]; 261 string DatabaseName = 2; 262 string TableName = 3; 263 bytes Def = 4 [ 264 (gogoproto.nullable) = false, 265 (gogoproto.customtype) = 266 "github.com/matrixorigin/matrixone/pkg/vm/engine.TableDefPB" 267 ]; 268 } 269 270 message DelTableDefResp { 271 option (gogoproto.typedecl) = false; 272 } 273 274 message UpdateResp { 275 option (gogoproto.typedecl) = false; 276 }