Files
orion_greptime_proto/proto/greptime/v1/row.proto
T
2026-04-20 16:26:09 +08:00

118 lines
2.7 KiB
Protocol Buffer

// Copyright 2023 Greptime Team
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
syntax = "proto3";
package greptime.v1;
import "greptime/v1/common.proto";
option go_package = "github.com/GreptimeTeam/greptime-proto/go/greptime/v1";
option java_outer_classname = "RowData";
option java_package = "io.greptime.v1";
message Rows {
repeated ColumnSchema schema = 1;
repeated Row rows = 2;
}
message ColumnSchema {
string column_name = 1;
ColumnDataType datatype = 2;
SemanticType semantic_type = 3;
// Extension for ColumnDataType.
ColumnDataTypeExtension datatype_extension = 4;
// Additional column options.
ColumnOptions options = 5;
}
message Row {
repeated Value values = 1;
}
message Value {
oneof value_data {
int32 i8_value = 1;
int32 i16_value = 2;
int32 i32_value = 3;
int64 i64_value = 4;
uint32 u8_value = 5;
uint32 u16_value = 6;
uint32 u32_value = 7;
uint64 u64_value = 8;
float f32_value = 9;
double f64_value = 10;
bool bool_value = 11;
bytes binary_value = 12;
string string_value = 13;
int32 date_value = 14;
int64 datetime_value = 15;
int64 timestamp_second_value = 16;
int64 timestamp_millisecond_value = 17;
int64 timestamp_microsecond_value = 18;
int64 timestamp_nanosecond_value = 19;
int64 time_second_value = 20;
int64 time_millisecond_value = 21;
int64 time_microsecond_value = 22;
int64 time_nanosecond_value = 23;
int32 interval_year_month_value = 24;
int64 interval_day_time_value = 25;
IntervalMonthDayNano interval_month_day_nano_value = 26;
Decimal128 decimal128_value = 31;
ListValue list_value = 40;
StructValue struct_value = 41;
JsonValue json_value = 42;
}
}
message ListValue {
repeated Value items = 1;
}
message StructValue {
repeated Value items = 2;
}
message JsonValue {
oneof value {
bool boolean = 1;
int64 int = 2;
uint64 uint = 3;
double float = 4;
string str = 5;
JsonList array = 6;
JsonObject object = 7;
bytes variant = 8;
}
}
message JsonList {
repeated JsonValue items = 1;
}
message JsonObject {
message Entry {
string key = 1;
JsonValue value = 2;
}
repeated Entry entries = 1;
}