syntax = "proto3"; package pilosa; message QueryPQLRequest { string index = 1; string pql = 2; } message StatusError{ uint32 Code = 1; string Message = 2; } message RowResponse{ repeated ColumnInfo headers = 1; repeated ColumnResponse columns = 2; StatusError StatusError = 3; } message Row { repeated ColumnResponse columns = 1; } message TableResponse{ repeated ColumnInfo headers = 1; repeated Row rows = 2; StatusError StatusError = 3; } message ColumnInfo { string name = 1; string datatype = 2; } message ColumnResponse{ oneof columnVal { string stringVal = 1; uint64 uint64Val = 2; int64 int64Val = 3; bool boolVal = 4; bytes blobVal = 5; Uint64Array uint64ArrayVal = 6; StringArray stringArrayVal = 7; double float64Val = 8; Decimal decimalVal = 9; } } message Decimal { int64 value = 1; int64 scale = 2; } message InspectRequest { string index = 1; IdsOrKeys columns = 2; repeated string filterFields = 3; uint64 limit = 4; uint64 offset = 5; } message Uint64Array { repeated uint64 vals = 1; } message StringArray { repeated string vals = 1; } message IdsOrKeys { oneof type { Uint64Array ids = 1; StringArray keys = 2; } } service Pilosa { rpc QueryPQL(QueryPQLRequest) returns (stream RowResponse) {}; rpc QueryPQLUnary(QueryPQLRequest) returns (TableResponse) {}; rpc Inspect(InspectRequest) returns (stream RowResponse) {}; }