62 lines
1.3 KiB
Protocol Buffer
62 lines
1.3 KiB
Protocol Buffer
// This file defines the types of predicates that can
|
|
// be passed down to the InfluxDB storage gRPC service
|
|
//
|
|
// Copy/pasted, as closely as verbatim as possible, from
|
|
// https://github.com/influxdata/influxdb/blob/master/storage/reads/datatypes/predicate.proto
|
|
|
|
syntax = "proto3";
|
|
package influxdata.platform.storage;
|
|
|
|
|
|
message Node {
|
|
enum Type {
|
|
LOGICAL_EXPRESSION = 0;
|
|
COMPARISON_EXPRESSION = 1;
|
|
PAREN_EXPRESSION = 2;
|
|
TAG_REF = 3;
|
|
LITERAL = 4;
|
|
FIELD_REF = 5;
|
|
}
|
|
|
|
enum Comparison {
|
|
EQUAL = 0;
|
|
NOT_EQUAL = 1;
|
|
STARTS_WITH = 2;
|
|
REGEX = 3;
|
|
NOT_REGEX = 4;
|
|
LT = 5;
|
|
LTE = 6;
|
|
GT = 7;
|
|
GTE = 8;
|
|
}
|
|
|
|
// Logical operators apply to boolean values and combine to produce a single boolean result.
|
|
enum Logical {
|
|
AND = 0;
|
|
OR = 1;
|
|
}
|
|
|
|
|
|
Type node_type = 1;
|
|
repeated Node children = 2;
|
|
|
|
oneof value {
|
|
string string_value = 3;
|
|
bool bool_value = 4;
|
|
int64 int_value = 5;
|
|
uint64 uint_value = 6;
|
|
double float_value = 7;
|
|
string regex_value = 8;
|
|
// string tag_ref_value = 9;
|
|
// AAL changed from string --> bytes to handle \xff literals in Rust which are not valid UTF-8
|
|
bytes tag_ref_value = 9;
|
|
string field_ref_value = 10;
|
|
Logical logical = 11;
|
|
Comparison comparison = 12;
|
|
}
|
|
}
|
|
|
|
message Predicate {
|
|
Node root = 1;
|
|
}
|