Files
komp_ac/common/proto/table_definition.proto

43 lines
939 B
Protocol Buffer

// common/proto/table_definition.proto
syntax = "proto3";
package multieko2.table_definition;
import "common.proto";
service TableDefinition {
rpc PostTableDefinition (PostTableDefinitionRequest) returns (TableDefinitionResponse);
rpc GetProfileTree (multieko2.common.Empty) returns (ProfileTreeResponse);
}
message PostTableDefinitionRequest {
string table_name = 1;
repeated ColumnDefinition columns = 2;
repeated string indexes = 3;
string profile_name = 4;
optional string linked_table_name = 5;
}
message ColumnDefinition {
string name = 1;
string field_type = 2;
}
message TableDefinitionResponse {
bool success = 1;
string sql = 2;
}
message ProfileTreeResponse {
message Table {
string name = 1;
repeated string depends_on = 2;
}
message Profile {
string name = 1;
repeated Table tables = 2;
}
repeated Profile profiles = 1;
}