diff options
author | Tim Barron <tjbarron@google.com> | 2022-03-17 12:33:12 -0700 |
---|---|---|
committer | Tim Barron <tjbarron@google.com> | 2022-03-17 12:33:12 -0700 |
commit | d3c3b447a8243f47a155ea4a97ae9d95f7e7f210 (patch) | |
tree | eac5b4cbd84037a5f4fe2d6044014bfb63b358a9 | |
parent | 9e6253bca157a57e7a210a80b3e5509084b4bf53 (diff) | |
download | icing-d3c3b447a8243f47a155ea4a97ae9d95f7e7f210.tar.gz |
Sync from upstream.
This sync simply re-runs the sync from ag/17226641, but with a fix in
the export script that will prevent
proto/icing/query/list_filter/syntax.proto from being exported.
Change-Id: Iffbb68b6be93410350859ebeae4737518804ae7f
-rw-r--r-- | proto/icing/query/list_filter/syntax.proto | 132 |
1 files changed, 0 insertions, 132 deletions
diff --git a/proto/icing/query/list_filter/syntax.proto b/proto/icing/query/list_filter/syntax.proto deleted file mode 100644 index df580a4..0000000 --- a/proto/icing/query/list_filter/syntax.proto +++ /dev/null @@ -1,132 +0,0 @@ -// Copyright (C) 2021 Google LLC -// -// 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 icing.lib; - -import "google/protobuf/duration.proto"; -import "google/protobuf/struct.proto"; -import "google/protobuf/timestamp.proto"; - -// A representation of the abstract syntax of the Common Expression Language. -// (-- See go/api-expr for the language design. --) - -// An abstract representation of a common expression. -// -// Expressions are abstractly represented as a collection of identifiers, -// select statements, function calls, literals, and comprehensions. All -// operators with the exception of the '.' operator are modelled as function -// calls. This makes it easy to represent new operators into the existing AST. -// -// All references within expressions must resolve to a [Decl][] provided at -// type-check for an expression to be valid. A reference may either be a bare -// identifier `name` or a qualified identifier `google.api.name`. References -// may either refer to a value or a function declaration. -// -// For example, the expression `google.api.name.startsWith('expr')` references -// the declaration `google.api.name` within a [Expr.Select][] expression, and -// the function declaration `startsWith`. -message Expr { - // An identifier expression. e.g. `request`. - message Ident { - // Required. Holds a single, unqualified identifier, possibly preceded by a - // '.'. - // - // Qualified names are represented by the [Expr.Select][] expression. - string name = 1; - } - - // A field selection expression. e.g. `request.auth`. - message Select { - // Required. The target of the selection expression. - // - // For example, in the select expression `request.auth`, the `request` - // portion of the expression is the `operand`. - Expr operand = 1; - - // Required. The name of the field to select. - // - // For example, in the select expression `request.auth`, the `auth` portion - // of the expression would be the `field`. - string field = 2; - - // Whether the select is to be interpreted as a field presence test. - // - // This results from the macro `has(request.auth)`. - bool test_only = 3; - } - - // A call expression, including calls to predefined functions and operators. - // - // For example, `value == 10`, `size(map_value)`. - // (-- TODO(b/65054543): Convert built-in globals to instance methods --) - message Call { - // The target of an method call-style expression. For example, `x` in - // `x.f()`. - Expr target = 1; - - // Required. The name of the function or method being called. - string function = 2; - - // The arguments. - repeated Expr args = 3; - } - - // Required. An id assigned to this node by the parser which is unique in a - // given expression tree. This is used to associate type information and other - // attributes to a node in the parse tree. - int64 id = 2; - - // Required. Variants of expressions. - oneof expr_kind { - // A constant expression. - Constant const_expr = 3; - - // An identifier expression. - Ident ident_expr = 4; - - // A field selection expression, e.g. `request.auth`. - Select select_expr = 5; - - // A call expression, including calls to predefined functions and operators. - Call call_expr = 6; - } -} - -// Represents a primitive literal. -// -// This is similar as the primitives supported in the well-known type -// `google.protobuf.Value`, but richer so it can represent CEL's full range of -// primitives. -// -// Lists and structs are not included as constants as these aggregate types may -// contain [Expr][] elements which require evaluation and are thus not constant. -// -// Examples of constants include: `"hello"`, `b'bytes'`, `1u`, `4.2`, `-2`, -// `true`, `null`. -message Constant { - // Required. The valid constant kinds. - oneof constant_kind { - google.protobuf.NullValue null_value = 1; // null value. - bool bool_value = 2; // boolean value. - int64 int64_value = 3; // int64 value. - uint64 uint64_value = 4; // uint64 value. - double double_value = 5; // double value. - string string_value = 6; // string value. - bytes bytes_value = 7; // bytes value. - google.protobuf.Duration duration_value = 8; // protobuf.Duration value. - google.protobuf.Timestamp timestamp_value = 9; // protobuf.Timestamp value. - } -} |