Skip to content

Database governance built for humans and agents — controlling changes and access across every major database.

fix(filter): use contains for substring search (#19842)

p0ny2506db422857
diff --git a/backend/api/mcp/gen/openapi.yaml b/backend/api/mcp/gen/openapi.yaml
index a38f3b3a9d..6b8daa2325 100644
--- a/backend/api/mcp/gen/openapi.yaml
+++ b/backend/api/mcp/gen/openapi.yaml
@@ -11219,14 +11219,14 @@ components:
Supported filter:
- schema: the schema name, support "==" operator.
- - table: the table name, support "==" and ".matches()" operator.
+ - table: the table name, support "==" and ".contains()" operator.
For example:
schema == "schema-a"
table == "table-a"
- table.matches("table-a")
- schema == "schema-a" && table.matches("sample")
- The filter used to search table with wildcard "sample" in the schema "schemas/schema-a".
+ table.contains("table-a")
+ schema == "schema-a" && table.contains("sample")
+ The filter is used to search for tables containing "sample" in the schema "schemas/schema-a".
The column masking level will only be returned when a table filter is used.
limit:
type: integer
@@ -12686,12 +12686,12 @@ components:
Supported filter:
- environment: the environment full name in "environments/{id}" format, support "==" operator.
- - name: the database name, support ".matches()" operator.
+ - name: the database name, support ".contains()" operator.
- project: the project full name in "projects/{id}" format, support "==" operator.
- instance: the instance full name in "instances/{id}" format, support "==" operator.
- engine: the database engine, check Engine enum for values. Support "==", "in [xx]", "!(in [xx])" operator.
- exclude_unassigned: should be "true" or "false", will not show unassigned databases if it's true, support "==" operator.
- - table: filter by the database table, support "==" and ".matches()" operator.
+ - table: filter by the database table, support "==" and ".contains()" operator.
- labels.{key}: the database label, support "==" and "in" operators.
For example:
@@ -12699,19 +12699,19 @@ components:
environment == "" (find databases which environment is not set)
project == "projects/{project resource id}"
instance == "instances/{instance resource id}"
- name.matches("database name")
+ name.contains("database name")
engine == "MYSQL"
engine in ["MYSQL", "POSTGRES"]
!(engine in ["MYSQL", "POSTGRES"])
exclude_unassigned == true
table == "sample"
- table.matches("sam")
+ table.contains("sam")
labels.environment == "production"
labels.region == "asia"
labels.region in ["asia", "europe"]
You can combine filter conditions like:
- environment == "environments/prod" && name.matches("employee")
+ environment == "environments/prod" && name.contains("employee")
showDeleted:
type: boolean
title: show_deleted
@@ -12774,18 +12774,18 @@ components:
The syntax and semantics of CEL are documented at https://github.com/google/cel-spec
Supported filter:
- - title: the group title, support "==" and ".matches()" operator.
- - email: the group email, support "==" and ".matches()" operator.
+ - title: the group title, support "==" and ".contains()" operator.
+ - email: the group email, support "==" and ".contains()" operator.
- project: the project full name in "projects/{id}" format, support "==" operator.
For example:
title == "dba"
email == "[email protected]"
- title.matches("dba")
- email.matches("dba")
+ title.contains("dba")
+ email.contains("dba")
project == "projects/sample-project"
You can combine filter conditions like:
- title.matches("dba") || email.matches("dba")
+ title.contains("dba") || email.contains("dba")
title: ListGroupsRequest
additionalProperties: false
description: Request message for listing groups.
@@ -12935,21 +12935,21 @@ components:
The syntax and semantics of CEL are documented at https://github.com/google/cel-spec
Supported filters:
- - name: the instance name, support "==" and ".matches()" operator.
- - resource_id: the instance id, support "==" and ".matches()" operator.
+ - name: the instance name, support "==" and ".contains()" operator.
+ - resource_id: the instance id, support "==" and ".contains()" operator.
- environment: the environment full name in "environments/{id}" format, support "==" operator.
- state: the instance state, check State enum for values, support "==" operator.
- engine: the instance engine, check Engine enum for values. Support "==", "in [xx]", "!(in [xx])" operator.
- - host: the instance host, support "==" and ".matches()" operator.
- - port: the instance port, support "==" and ".matches()" operator.
+ - host: the instance host, support "==" and ".contains()" operator.
+ - port: the instance port, support "==" and ".contains()" operator.
- project: the project full name in "projects/{id}" format, support "==" operator.
- labels.{key}: the instance label, support "==" and "in" operators.
For example:
name == "sample instance"
- name.matches("sample")
+ name.contains("sample")
resource_id == "sample-instance"
- resource_id.matches("sample")
+ resource_id.contains("sample")
state == "DELETED"
environment == "environments/test"
environment == "" (find instances which environment is not set)
@@ -12957,14 +12957,14 @@ components:
engine in ["MYSQL", "POSTGRES"]
!(engine in ["MYSQL", "POSTGRES"])
host == "127.0.0.1"
- host.matches("127.0")
+ host.contains("127.0")
port == "54321"
- port.matches("543")
+ port.contains("543")
labels.org_group == "infrastructure"
labels.environment in ["prod", "production"]
project == "projects/sample-project"
You can combine filter conditions like:
- name.matches("sample") && environment == "environments/test"
+ name.contains("sample") && environment == "environments/test"
host == "127.0.0.1" && port == "54321"
orderBy:
type: string
@@ -13559,16 +13559,16 @@ components:
The syntax and semantics of CEL are documented at https://github.com/google/cel-spec
Supported filter:
- - name: the service account name, support "==" and ".matches()" operator.
- - email: the service account email, support "==" and ".matches()" operator.
+ - name: the service account name, support "==" and ".contains()" operator.
+ - email: the service account email, support "==" and ".contains()" operator.
- state: check State enum for values, support "==" operator.
For example:
name == "ed"
- name.matches("ed")
+ name.contains("ed")
state == "DELETED"
email == "[email protected]"
- email.matches("ed")
+ email.contains("ed")
title: ListServiceAccountsRequest
additionalProperties: false
description: Request message for listing service accounts.
@@ -13661,20 +13661,20 @@ components:
The syntax and semantics of CEL are documented at https://github.com/google/cel-spec
Supported filter:
- - name: the user name, support "==" and ".matches()" operator.
- - email: the user email, support "==" and ".matches()" operator.
+ - name: the user name, support "==" and ".contains()" operator.
+ - email: the user email, support "==" and ".contains()" operator.
- state: check State enum for values, support "==" operator.
- project: the project full name in "projects/{id}" format, support "==" operator.
For example:
name == "ed"
- name.matches("ed")
+ name.contains("ed")
email == "[email protected]"
- email.matches("ed")
+ email.contains("ed")
state == "DELETED"
project == "projects/sample-project"
You can combine filter conditions like:
- name.matches("ed") && project == "projects/sample-project"
+ name.contains("ed") && project == "projects/sample-project"
(name == "ed" || email == "[email protected]") && project == "projects/sample-project"
title: ListUsersRequest
additionalProperties: false
@@ -13734,16 +13734,16 @@ components:
The syntax and semantics of CEL are documented at https://github.com/google/cel-spec
Supported filter:
- - name: the workload identity name, support "==" and ".matches()" operator.
- - email: the workload identity email, support "==" and ".matches()" operator.
+ - name: the workload identity name, support "==" and ".contains()" operator.
+ - email: the workload identity email, support "==" and ".contains()" operator.
- state: check State enum for values, support "==" operator.
For example:
name == "ed"
- name.matches("ed")
+ name.contains("ed")
state == "DELETED"
email == "[email protected]"
- email.matches("ed")
+ email.contains("ed")
title: ListWorkloadIdentitiesRequest
additionalProperties: false
description: Request message for listing workload identities.
@@ -16822,25 +16822,25 @@ components:
The syntax and semantics of CEL are documented at https://github.com/google/cel-spec
Supported filters:
- - name: the project name, support "==" and ".matches()" operator.
- - resource_id: the project id, support "==" and ".matches()" operator.
+ - name: the project name, support "==" and ".contains()" operator.
+ - resource_id: the project id, support "==" and ".contains()" operator.
- exclude_default: if not include the default project, should be "true" or "false", support "==" operator.
- state: check the State enum for the values, support "==" operator.
- labels.{key}: the project label, support "==" and "in" operators.
For example:
name == "project name"
- name.matches("project name")
+ name.contains("project name")
resource_id == "project id"
- resource_id.matches("project id")
+ resource_id.contains("project id")
exclude_default == true
state == "DELETED"
labels.environment == "production"
labels.tier == "critical"
labels.environment in ["staging", "prod"]
You can combine filter conditions like:
- name == "project name" && resource_id.matches("project id")
- name.matches("project name") || resource_id == "project id"
+ name == "project name" && resource_id.contains("project id")
+ name.contains("project name") || resource_id == "project id"
labels.environment == "production" && labels.tier == "critical"
pageSize:
type: integer
@@ -16919,7 +16919,7 @@ components:
- database: the database full name in "instances/{id}/databases/{name}" format, support "==" operator.
- instance: the instance full name in "instances/{id}" format, support "==" operator.
- type: the type, should be "QUERY" or "EXPORT", support "==" operator.
- - statement: the SQL statement, support ".matches()" operator.
+ - statement: the SQL statement, support ".contains()" operator.
For example:
project == "projects/{project}"
@@ -16927,8 +16927,8 @@ components:
instance == "instances/{instance}"
type == "QUERY"
type == "EXPORT"
- statement.matches("select")
- type == "QUERY" && statement.matches("select")
+ statement.contains("select")
+ type == "QUERY" && statement.contains("select")
title: SearchQueryHistoriesRequest
additionalProperties: false
bytebase.v1.SearchQueryHistoriesResponse:
diff --git a/backend/api/mcp/skills/query.md b/backend/api/mcp/skills/query.md
index 6aa7ef791a..daa5bf5333 100644
--- a/backend/api/mcp/skills/query.md
+++ b/backend/api/mcp/skills/query.md
@@ -25,16 +25,16 @@ Run SQL queries against databases managed by Bytebase.
```
call_api(operationId="DatabaseService/ListDatabases", body={
"parent": "workspaces/{id}",
- "filter": "name.matches(\"db_name\")"
+ "filter": "name.contains(\"db_name\")"
})
```
Filter examples:
- - `name.matches("employee")` - database name contains "employee"
+ - `name.contains("employee")` - database name contains "employee"
- `project == "projects/{project-id}"` - databases in a project
- `instance == "instances/{instance-id}"` - databases in an instance
- `engine == "MYSQL"` - MySQL databases only
- - `environment == "environments/prod" && name.matches("user")` - combine filters
+ - `environment == "environments/prod" && name.contains("user")` - combine filters
**Extract `dataSourceId`** from `instanceResource.dataSources` in the response. Prefer `type: "READ_ONLY"` over `type: "ADMIN"` when available.
diff --git a/backend/api/mcp/tool_query.go b/backend/api/mcp/tool_query.go
index 323d828850..ab8289a49f 100644
--- a/backend/api/mcp/tool_query.go
+++ b/backend/api/mcp/tool_query.go
@@ -158,8 +158,8 @@ type dataSource struct {
// buildDatabaseFilter builds a CEL filter expression for ListDatabases.
func buildDatabaseFilter(input QueryInput) string {
- // name.matches does substring matching server-side.
- filter := fmt.Sprintf("name.matches(%q)", input.Database)
+ // name.contains does substring matching server-side.
+ filter := fmt.Sprintf("name.contains(%q)", input.Database)
if input.Instance != "" {
filter += fmt.Sprintf(" && instance == %q", "instances/"+input.Instance)
}
diff --git a/backend/api/mcp/tool_query_test.go b/backend/api/mcp/tool_query_test.go
index afd1143d44..6de9cc45fa 100644
--- a/backend/api/mcp/tool_query_test.go
+++ b/backend/api/mcp/tool_query_test.go
@@ -67,7 +67,7 @@ func mockListDatabases(databases []map[string]any) http.Handler {
}
// applyMockFilter applies a simplified filter to mock databases.
-// Supports: name.matches("x"), instance == "instances/x", project == "projects/x"
+// Supports: name.contains("x"), instance == "instances/x", project == "projects/x"
func applyMockFilter(databases []map[string]any, filter string) []map[string]any {
var result []map[string]any
for _, db := range databases {
@@ -89,9 +89,9 @@ func applyMockFilter(databases []map[string]any, filter string) []map[string]any
}
match := true
- // Check name.matches("x") — substring match
- if idx := strings.Index(filter, `name.matches(`); idx >= 0 {
- start := idx + len(`name.matches("`)
+ // Check name.contains("x") — substring match
+ if idx := strings.Index(filter, `name.contains(`); idx >= 0 {
+ start := idx + len(`name.contains("`)
end := strings.Index(filter[start:], `"`)
if end > 0 {
substr := filter[start : start+end]
diff --git a/backend/api/v1/database_service.go b/backend/api/v1/database_service.go
index 3309712963..133b792d5e 100644
--- a/backend/api/v1/database_service.go
+++ b/backend/api/v1/database_service.go
@@ -481,7 +481,7 @@ func getDatabaseMetadataFilter(filter string) (*metadataFilter, error) {
}
}
return nil
- case celoverloads.Matches:
+ case celoverloads.Contains:
variable := expr.AsCall().Target().AsIdent()
if variable != "table" {
return connect.NewError(connect.CodeInvalidArgument, errors.Errorf("unsupport variable %v", variable))
diff --git a/backend/api/v1/database_service_test.go b/backend/api/v1/database_service_test.go
index b6d51be925..cfc95a5ea5 100644
--- a/backend/api/v1/database_service_test.go
+++ b/backend/api/v1/database_service_test.go
@@ -34,10 +34,19 @@ func TestListDatabaseFilter(t *testing.T) {
wantArgs: []any{"sample"},
},
{
- input: `name.matches("Employee")`,
+ input: `name.contains("Employee")`,
wantSQL: `(LOWER(db.name) LIKE $1)`,
wantArgs: []any{"%employee%"},
},
+ {
+ input: `table.contains("user")`,
+ wantSQL: "(EXISTS (\n\t\t\t\t\t\tSELECT 1\n\t\t\t\t\t\tFROM json_array_elements(ds.metadata->'schemas') AS s,\n\t\t\t\t\t\t \t json_array_elements(s->'tables') AS t\n\t\t\t\t\t\tWHERE t->>'name' LIKE $1))",
+ wantArgs: []any{"%user%"},
+ },
+ {
+ input: `name.matches("Employee")`,
+ error: connect.NewError(connect.CodeInvalidArgument, errors.Errorf("unexpected function matches")),
+ },
{
input: `engine in ["MYSQL", "POSTGRES"]`,
wantSQL: `(instance.metadata->>'engine' = ANY($1))`,
@@ -74,3 +83,59 @@ func TestListDatabaseFilter(t *testing.T) {
}
}
}
+
+func TestGetDatabaseMetadataFilter(t *testing.T) {
+ testCases := []struct {
+ name string
+ input string
+ wantSchema *string
+ wantTable *string
+ wantWildcard bool
+ errContains string
+ }{
+ {
+ name: "table contains",
+ input: `table.contains("user")`,
+ wantTable: ptrValue("user"),
+ wantWildcard: true,
+ },
+ {
+ name: "schema and table contains",
+ input: `schema == "public" && table.contains("user")`,
+ wantSchema: ptrValue("public"),
+ wantTable: ptrValue("user"),
+ wantWildcard: true,
+ },
+ {
+ name: "table matches unsupported",
+ input: `table.matches("user")`,
+ errContains: "unexpected function matches",
+ },
+ }
+
+ for _, tc := range testCases {
+ t.Run(tc.name, func(t *testing.T) {
+ filter, err := getDatabaseMetadataFilter(tc.input)
+ if tc.errContains != "" {
+ require.Error(t, err)
+ require.ErrorContains(t, err, tc.errContains)
+ return
+ }
+
+ require.NoError(t, err)
+ if tc.wantSchema != nil {
+ require.NotNil(t, filter.schema)
+ require.Equal(t, *tc.wantSchema, *filter.schema)
+ }
+ if tc.wantTable != nil {
+ require.NotNil(t, filter.table)
+ require.Equal(t, *tc.wantTable, filter.table.name)
+ require.Equal(t, tc.wantWildcard, filter.table.wildcard)
+ }
+ })
+ }
+}
+
+func ptrValue[T any](v T) *T {
+ return &v
+}
diff --git a/backend/generated-go/v1/database_service.pb.go b/backend/generated-go/v1/database_service.pb.go
index eb6e1be043..c6311d9755 100644
--- a/backend/generated-go/v1/database_service.pb.go
+++ b/backend/generated-go/v1/database_service.pb.go
@@ -789,12 +789,12 @@ type ListDatabasesRequest struct {
//
// Supported filter:
// - environment: the environment full name in "environments/{id}" format, support "==" operator.
- // - name: the database name, support ".matches()" operator.
+ // - name: the database name, support ".contains()" operator.
// - project: the project full name in "projects/{id}" format, support "==" operator.
// - instance: the instance full name in "instances/{id}" format, support "==" operator.
// - engine: the database engine, check Engine enum for values. Support "==", "in [xx]", "!(in [xx])" operator.
// - exclude_unassigned: should be "true" or "false", will not show unassigned databases if it's true, support "==" operator.
- // - table: filter by the database table, support "==" and ".matches()" operator.
+ // - table: filter by the database table, support "==" and ".contains()" operator.
// - labels.{key}: the database label, support "==" and "in" operators.
//
// For example:
@@ -802,19 +802,19 @@ type ListDatabasesRequest struct {
// environment == "" (find databases which environment is not set)
// project == "projects/{project resource id}"
// instance == "instances/{instance resource id}"
- // name.matches("database name")
+ // name.contains("database name")
// engine == "MYSQL"
// engine in ["MYSQL", "POSTGRES"]
// !(engine in ["MYSQL", "POSTGRES"])
// exclude_unassigned == true
// table == "sample"
- // table.matches("sam")
+ // table.contains("sam")
// labels.environment == "production"
// labels.region == "asia"
// labels.region in ["asia", "europe"]
//
// You can combine filter conditions like:
- // environment == "environments/prod" && name.matches("employee")
+ // environment == "environments/prod" && name.contains("employee")
Filter string `protobuf:"bytes,4,opt,name=filter,proto3" json:"filter,omitempty"`
// Show deleted database if specified.
ShowDeleted bool `protobuf:"varint,5,opt,name=show_deleted,json=showDeleted,proto3" json:"show_deleted,omitempty"`
@@ -1310,14 +1310,14 @@ type GetDatabaseMetadataRequest struct {
//
// Supported filter:
// - schema: the schema name, support "==" operator.
- // - table: the table name, support "==" and ".matches()" operator.
+ // - table: the table name, support "==" and ".contains()" operator.
//
// For example:
// schema == "schema-a"
// table == "table-a"
- // table.matches("table-a")
- // schema == "schema-a" && table.matches("sample")
- // The filter used to search table with wildcard "sample" in the schema "schemas/schema-a".
+ // table.contains("table-a")
+ // schema == "schema-a" && table.contains("sample")
+ // The filter is used to search for tables containing "sample" in the schema "schemas/schema-a".
// The column masking level will only be returned when a table filter is used.
Filter string `protobuf:"bytes,2,opt,name=filter,proto3" json:"filter,omitempty"`
// Limit the response size of returned table metadata per schema.
diff --git a/backend/generated-go/v1/group_service.pb.go b/backend/generated-go/v1/group_service.pb.go
index e30169954d..902319089f 100644
--- a/backend/generated-go/v1/group_service.pb.go
+++ b/backend/generated-go/v1/group_service.pb.go
@@ -236,18 +236,18 @@ type ListGroupsRequest struct {
// The syntax and semantics of CEL are documented at https://github.com/google/cel-spec
//
// Supported filter:
- // - title: the group title, support "==" and ".matches()" operator.
- // - email: the group email, support "==" and ".matches()" operator.
+ // - title: the group title, support "==" and ".contains()" operator.
+ // - email: the group email, support "==" and ".contains()" operator.
// - project: the project full name in "projects/{id}" format, support "==" operator.
//
// For example:
// title == "dba"
// email == "[email protected]"
- // title.matches("dba")
- // email.matches("dba")
+ // title.contains("dba")
+ // email.contains("dba")
// project == "projects/sample-project"
// You can combine filter conditions like:
- // title.matches("dba") || email.matches("dba")
+ // title.contains("dba") || email.contains("dba")
Filter string `protobuf:"bytes,3,opt,name=filter,proto3" json:"filter,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
diff --git a/backend/generated-go/v1/instance_service.pb.go b/backend/generated-go/v1/instance_service.pb.go
index bfe19f95ab..aaa493b19c 100644
--- a/backend/generated-go/v1/instance_service.pb.go
+++ b/backend/generated-go/v1/instance_service.pb.go
@@ -415,21 +415,21 @@ type ListInstancesRequest struct {
// The syntax and semantics of CEL are documented at https://github.com/google/cel-spec
//
// Supported filters:
- // - name: the instance name, support "==" and ".matches()" operator.
- // - resource_id: the instance id, support "==" and ".matches()" operator.
+ // - name: the instance name, support "==" and ".contains()" operator.
+ // - resource_id: the instance id, support "==" and ".contains()" operator.
// - environment: the environment full name in "environments/{id}" format, support "==" operator.
// - state: the instance state, check State enum for values, support "==" operator.
// - engine: the instance engine, check Engine enum for values. Support "==", "in [xx]", "!(in [xx])" operator.
- // - host: the instance host, support "==" and ".matches()" operator.
- // - port: the instance port, support "==" and ".matches()" operator.
+ // - host: the instance host, support "==" and ".contains()" operator.
+ // - port: the instance port, support "==" and ".contains()" operator.
// - project: the project full name in "projects/{id}" format, support "==" operator.
// - labels.{key}: the instance label, support "==" and "in" operators.
//
// For example:
// name == "sample instance"
- // name.matches("sample")
+ // name.contains("sample")
// resource_id == "sample-instance"
- // resource_id.matches("sample")
+ // resource_id.contains("sample")
// state == "DELETED"
// environment == "environments/test"
// environment == "" (find instances which environment is not set)
@@ -437,14 +437,14 @@ type ListInstancesRequest struct {
// engine in ["MYSQL", "POSTGRES"]
// !(engine in ["MYSQL", "POSTGRES"])
// host == "127.0.0.1"
- // host.matches("127.0")
+ // host.contains("127.0")
// port == "54321"
- // port.matches("543")
+ // port.contains("543")
// labels.org_group == "infrastructure"
// labels.environment in ["prod", "production"]
// project == "projects/sample-project"
// You can combine filter conditions like:
- // name.matches("sample") && environment == "environments/test"
+ // name.contains("sample") && environment == "environments/test"
// host == "127.0.0.1" && port == "54321"
Filter string `protobuf:"bytes,4,opt,name=filter,proto3" json:"filter,omitempty"`
// The order by of instances.
diff --git a/backend/generated-go/v1/project_service.pb.go b/backend/generated-go/v1/project_service.pb.go
index 76d90d4e27..55d835a61c 100644
--- a/backend/generated-go/v1/project_service.pb.go
+++ b/backend/generated-go/v1/project_service.pb.go
@@ -389,25 +389,25 @@ type SearchProjectsRequest struct {
// The syntax and semantics of CEL are documented at https://github.com/google/cel-spec
//
// Supported filters:
- // - name: the project name, support "==" and ".matches()" operator.
- // - resource_id: the project id, support "==" and ".matches()" operator.
+ // - name: the project name, support "==" and ".contains()" operator.
+ // - resource_id: the project id, support "==" and ".contains()" operator.
// - exclude_default: if not include the default project, should be "true" or "false", support "==" operator.
// - state: check the State enum for the values, support "==" operator.
// - labels.{key}: the project label, support "==" and "in" operators.
//
// For example:
// name == "project name"
- // name.matches("project name")
+ // name.contains("project name")
// resource_id == "project id"
- // resource_id.matches("project id")
+ // resource_id.contains("project id")
// exclude_default == true
// state == "DELETED"
// labels.environment == "production"
// labels.tier == "critical"
// labels.environment in ["staging", "prod"]
// You can combine filter conditions like:
- // name == "project name" && resource_id.matches("project id")
- // name.matches("project name") || resource_id == "project id"
+ // name == "project name" && resource_id.contains("project id")
+ // name.contains("project name") || resource_id == "project id"
// labels.environment == "production" && labels.tier == "critical"
Filter string `protobuf:"bytes,2,opt,name=filter,proto3" json:"filter,omitempty"`
// The maximum number of projects to return. The service may return fewer than
diff --git a/backend/generated-go/v1/service_account_service.pb.go b/backend/generated-go/v1/service_account_service.pb.go
index 72a970c460..0a3b7157b3 100644
--- a/backend/generated-go/v1/service_account_service.pb.go
+++ b/backend/generated-go/v1/service_account_service.pb.go
@@ -257,16 +257,16 @@ type ListServiceAccountsRequest struct {
// The syntax and semantics of CEL are documented at https://github.com/google/cel-spec
//
// Supported filter:
- // - name: the service account name, support "==" and ".matches()" operator.
- // - email: the service account email, support "==" and ".matches()" operator.
+ // - name: the service account name, support "==" and ".contains()" operator.
+ // - email: the service account email, support "==" and ".contains()" operator.
// - state: check State enum for values, support "==" operator.
//
// For example:
// name == "ed"
- // name.matches("ed")
+ // name.contains("ed")
// state == "DELETED"
// email == "[email protected]"
- // email.matches("ed")
+ // email.contains("ed")
Filter string `protobuf:"bytes,5,opt,name=filter,proto3" json:"filter,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
diff --git a/backend/generated-go/v1/sql_service.pb.go b/backend/generated-go/v1/sql_service.pb.go
index 31a4b88dad..8a04dc1097 100644
--- a/backend/generated-go/v1/sql_service.pb.go
+++ b/backend/generated-go/v1/sql_service.pb.go
@@ -1746,7 +1746,7 @@ type SearchQueryHistoriesRequest struct {
// - database: the database full name in "instances/{id}/databases/{name}" format, support "==" operator.
// - instance: the instance full name in "instances/{id}" format, support "==" operator.
// - type: the type, should be "QUERY" or "EXPORT", support "==" operator.
- // - statement: the SQL statement, support ".matches()" operator.
+ // - statement: the SQL statement, support ".contains()" operator.
//
// For example:
// project == "projects/{project}"
@@ -1754,8 +1754,8 @@ type SearchQueryHistoriesRequest struct {
// instance == "instances/{instance}"
// type == "QUERY"
// type == "EXPORT"
- // statement.matches("select")
- // type == "QUERY" && statement.matches("select")
+ // statement.contains("select")
+ // type == "QUERY" && statement.contains("select")
Filter string `protobuf:"bytes,3,opt,name=filter,proto3" json:"filter,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
diff --git a/backend/generated-go/v1/user_service.pb.go b/backend/generated-go/v1/user_service.pb.go
index 7b9a9dfefd..adf7a224cf 100644
--- a/backend/generated-go/v1/user_service.pb.go
+++ b/backend/generated-go/v1/user_service.pb.go
@@ -182,20 +182,20 @@ type ListUsersRequest struct {
// The syntax and semantics of CEL are documented at https://github.com/google/cel-spec
//
// Supported filter:
- // - name: the user name, support "==" and ".matches()" operator.
- // - email: the user email, support "==" and ".matches()" operator.
+ // - name: the user name, support "==" and ".contains()" operator.
+ // - email: the user email, support "==" and ".contains()" operator.
// - state: check State enum for values, support "==" operator.
// - project: the project full name in "projects/{id}" format, support "==" operator.
//
// For example:
// name == "ed"
- // name.matches("ed")
+ // name.contains("ed")
// email == "[email protected]"
- // email.matches("ed")
+ // email.contains("ed")
// state == "DELETED"
// project == "projects/sample-project"
// You can combine filter conditions like:
- // name.matches("ed") && project == "projects/sample-project"
+ // name.contains("ed") && project == "projects/sample-project"
// (name == "ed" || email == "[email protected]") && project == "projects/sample-project"
Filter string `protobuf:"bytes,4,opt,name=filter,proto3" json:"filter,omitempty"`
unknownFields protoimpl.UnknownFields
diff --git a/backend/generated-go/v1/workload_identity_service.pb.go b/backend/generated-go/v1/workload_identity_service.pb.go
index 5b40a84040..62178434d2 100644
--- a/backend/generated-go/v1/workload_identity_service.pb.go
+++ b/backend/generated-go/v1/workload_identity_service.pb.go
@@ -380,16 +380,16 @@ type ListWorkloadIdentitiesRequest struct {
// The syntax and semantics of CEL are documented at https://github.com/google/cel-spec
//
// Supported filter:
- // - name: the workload identity name, support "==" and ".matches()" operator.
- // - email: the workload identity email, support "==" and ".matches()" operator.
+ // - name: the workload identity name, support "==" and ".contains()" operator.
+ // - email: the workload identity email, support "==" and ".contains()" operator.
// - state: check State enum for values, support "==" operator.
//
// For example:
// name == "ed"
- // name.matches("ed")
+ // name.contains("ed")
// state == "DELETED"
// email == "[email protected]"
- // email.matches("ed")
+ // email.contains("ed")
Filter string `protobuf:"bytes,5,opt,name=filter,proto3" json:"filter,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
diff --git a/backend/store/access_grant.go b/backend/store/access_grant.go
index 659763b263..4d864eba73 100644
--- a/backend/store/access_grant.go
+++ b/backend/store/access_grant.go
@@ -386,7 +386,7 @@ func GetListAccessGrantFilter(filter string) (*qb.Query, error) {
default:
return nil, errors.Errorf("unsupported variable %q", variable)
}
- case celoverloads.Matches:
+ case celoverloads.Contains:
call := expr.AsCall()
target := call.Target()
if target.Kind() != celast.IdentKind {
diff --git a/backend/store/access_grant_filter_test.go b/backend/store/access_grant_filter_test.go
new file mode 100644
index 0000000000..0a29634b56
--- /dev/null
+++ b/backend/store/access_grant_filter_test.go
@@ -0,0 +1,72 @@
+package store
+
+import (
+ "testing"
+
+ "github.com/stretchr/testify/require"
+)
+
+func TestGetListAccessGrantFilter(t *testing.T) {
+ tests := []struct {
+ name string
+ filter string
+ wantSQL string
+ wantArgs []any
+ wantErr bool
+ errContains string
+ }{
+ {
+ name: "empty filter",
+ filter: "",
+ wantSQL: "",
+ wantArgs: nil,
+ wantErr: false,
+ },
+ {
+ name: "query contains",
+ filter: `query.contains("SELECT * FROM users")`,
+ wantSQL: "(regexp_replace(access_grant.payload->>'query', '\\s+', ' ', 'g') ILIKE $1)",
+ wantArgs: []any{"%SELECT * FROM users%"},
+ wantErr: false,
+ },
+ {
+ name: "query contains normalizes whitespace",
+ filter: `query.contains("SELECT * FROM users")`,
+ wantSQL: "(regexp_replace(access_grant.payload->>'query', '\\s+', ' ', 'g') ILIKE $1)",
+ wantArgs: []any{"%SELECT * FROM users%"},
+ wantErr: false,
+ },
+ {
+ name: "matches is unsupported",
+ filter: `query.matches("SELECT")`,
+ wantErr: true,
+ errContains: "unsupported function matches",
+ },
+ }
+
+ for _, tt := range tests {
+ t.Run(tt.name, func(t *testing.T) {
+ q, err := GetListAccessGrantFilter(tt.filter)
+
+ if tt.wantErr {
+ require.Error(t, err)
+ if tt.errContains != "" {
+ require.ErrorContains(t, err, tt.errContains)
+ }
+ return
+ }
+
+ require.NoError(t, err)
+ if tt.filter == "" {
+ require.Nil(t, q)
+ return
+ }
+
+ require.NotNil(t, q)
+ sql, args, err := q.ToSQL()
+ require.NoError(t, err)
+ require.Equal(t, tt.wantSQL, sql)
+ require.Equal(t, tt.wantArgs, args)
+ })
+ }
+}
diff --git a/backend/store/account_filter.go b/backend/store/account_filter.go
index c702b01fc6..aa31cedbb1 100644
--- a/backend/store/account_filter.go
+++ b/backend/store/account_filter.go
@@ -101,7 +101,7 @@ func GetAccountListFilter(filter string) (*AccountListFilter, error) {
case celoperators.Equals:
variable, value := getVariableAndValueFromExpr(expr)
return parseToSQL(variable, value)
- case celoverloads.Matches:
+ case celoverloads.Contains:
variable := expr.AsCall().Target().AsIdent()
args := expr.AsCall().Args()
if len(args) != 1 {
@@ -109,7 +109,7 @@ func GetAccountListFilter(filter string) (*AccountListFilter, error) {
}
value := args[0].AsLiteral().Value()
if variable != "name" && variable != "email" {
- return nil, errors.Errorf(`only "name" and "email" support %q operator, but found %q`, celoverloads.Matches, variable)
+ return nil, errors.Errorf(`only "name" and "email" support %q operator, but found %q`, celoverloads.Contains, variable)
}
strValue, ok := value.(string)
if !ok {
diff --git a/backend/store/account_filter_test.go b/backend/store/account_filter_test.go
index 8b6846831b..2d2434671f 100644
--- a/backend/store/account_filter_test.go
+++ b/backend/store/account_filter_test.go
@@ -38,15 +38,15 @@ func TestGetAccountListFilter(t *testing.T) {
wantErr: false,
},
{
- name: "name matches",
- filter: `name.matches("ED")`,
+ name: "name contains",
+ filter: `name.contains("ED")`,
wantSQL: "(LOWER(name) LIKE $1)",
wantArgs: []any{"%ed%"},
wantErr: false,
},
{
- name: "email matches",
- filter: `email.matches("test")`,
+ name: "email contains",
+ filter: `email.contains("test")`,
wantSQL: "(LOWER(email) LIKE $1)",
wantArgs: []any{"%test%"},
wantErr: false,
@@ -112,6 +112,12 @@ func TestGetAccountListFilter(t *testing.T) {
wantErr: true,
errContains: "invalid state filter",
},
+ {
+ name: "matches is unsupported",
+ filter: `name.matches("ed")`,
+ wantErr: true,
+ errContains: "unexpected function matches",
+ },
}
for _, tt := range tests {
diff --git a/backend/store/database.go b/backend/store/database.go
index 00f67210bc..f8351019d2 100644
--- a/backend/store/database.go
+++ b/backend/store/database.go
@@ -601,7 +601,7 @@ func GetListDatabaseFilter(workspace, filter string) (*qb.Query, error) {
case celoperators.Equals:
variable, value := getVariableAndValueFromExpr(expr)
return parseToSQL(variable, value)
- case celoverloads.Matches:
+ case celoverloads.Contains:
variable := expr.AsCall().Target().AsIdent()
args := expr.AsCall().Args()
if len(args) != 1 {
@@ -624,7 +624,7 @@ func GetListDatabaseFilter(workspace, filter string) (*qb.Query, error) {
json_array_elements(s->'tables') AS t
WHERE t->>'name' LIKE ?)`, "%"+strValue+"%"), nil
default:
- return nil, errors.Errorf(`only "name" or "table" support %q operator, but found %q`, celoverloads.Matches, variable)
+ return nil, errors.Errorf(`only "name" or "table" support %q operator, but found %q`, celoverloads.Contains, variable)
}
case celoperators.In:
variable, value := getVariableAndValueFromExpr(expr)
diff --git a/backend/store/group.go b/backend/store/group.go
index 13c21a8cba..02a8ff6854 100644
--- a/backend/store/group.go
+++ b/backend/store/group.go
@@ -422,7 +422,7 @@ func GetListGroupFilter(find *FindGroupMessage, filter string) (*qb.Query, error
case celoperators.Equals:
variable, value := getVariableAndValueFromExpr(expr)
return parseToSQL(variable, value)
- case celoverloads.Matches:
+ case celoverloads.Contains:
variable := expr.AsCall().Target().AsIdent()
args := expr.AsCall().Args()
if len(args) != 1 {
diff --git a/backend/store/group_filter_test.go b/backend/store/group_filter_test.go
index f2bc4d7845..687cc3e053 100644
--- a/backend/store/group_filter_test.go
+++ b/backend/store/group_filter_test.go
@@ -37,15 +37,15 @@ func TestGetListGroupFilter(t *testing.T) {
wantErr: false,
},
{
- name: "title matches",
- filter: `title.matches("dev")`,
+ name: "title contains",
+ filter: `title.contains("dev")`,
wantSQL: "(LOWER(name) LIKE $1)",
wantArgs: []any{"%dev%"},
wantErr: false,
},
{
- name: "email matches",
- filter: `email.matches("example")`,
+ name: "email contains",
+ filter: `email.contains("example")`,
wantSQL: "(LOWER(email) LIKE $1)",
wantArgs: []any{"%example%"},
wantErr: false,
@@ -66,7 +66,7 @@ func TestGetListGroupFilter(t *testing.T) {
},
{
name: "complex nested AND/OR",
- filter: `(title == "Developers" || title == "Admins") && email.matches("example")`,
+ filter: `(title == "Developers" || title == "Admins") && email.contains("example")`,
wantSQL: "(((name = $1 OR name = $2) AND LOWER(email) LIKE $3))",
wantArgs: []any{"Developers", "Admins", "%example%"},
wantErr: false,
@@ -84,11 +84,17 @@ func TestGetListGroupFilter(t *testing.T) {
errContains: "unsupport variable",
},
{
- name: "empty matches value",
- filter: `title.matches("")`,
+ name: "empty contains value",
+ filter: `title.contains("")`,
wantErr: true,
errContains: "empty value",
},
+ {
+ name: "matches is unsupported",
+ filter: `title.matches("dev")`,
+ wantErr: true,
+ errContains: "unexpected function matches",
+ },
}
for _, tt := range tests {
diff --git a/backend/store/instance.go b/backend/store/instance.go
index 0e49e96db7..e7ca7f2c34 100644
--- a/backend/store/instance.go
+++ b/backend/store/instance.go
@@ -872,7 +872,7 @@ func GetListInstanceFilter(filter string) (*qb.Query, error) {
case celoperators.Equals:
variable, value := getVariableAndValueFromExpr(expr)
return parseToSQL(variable, value)
- case celoverloads.Matches:
+ case celoverloads.Contains:
variable := expr.AsCall().Target().AsIdent()
args := expr.AsCall().Args()
if len(args) != 1 {
diff --git a/backend/store/instance_filter_test.go b/backend/store/instance_filter_test.go
new file mode 100644
index 0000000000..c91d4a6634
--- /dev/null
+++ b/backend/store/instance_filter_test.go
@@ -0,0 +1,71 @@
+package store
+
+import (
+ "testing"
+
+ "github.com/stretchr/testify/require"
+)
+
+func TestGetListInstanceFilter(t *testing.T) {
+ tests := []struct {
+ name string
+ filter string
+ wantSQL string
+ wantArgs []any
+ wantErr bool
+ errContains string
+ }{
+ {
+ name: "name contains",
+ filter: `name.contains("sample")`,
+ wantSQL: "(LOWER(instance.metadata->>'title') LIKE $1)",
+ wantArgs: []any{"%sample%"},
+ },
+ {
+ name: "resource_id contains",
+ filter: `resource_id.contains("prod")`,
+ wantSQL: "(LOWER(instance.resource_id) LIKE $1)",
+ wantArgs: []any{"%prod%"},
+ },
+ {
+ name: "host contains",
+ filter: `host.contains("127.0")`,
+ wantSQL: "(EXISTS (SELECT 1 FROM jsonb_array_elements(instance.metadata -> 'dataSources') AS ds WHERE ds ->> 'host' LIKE $1))",
+ wantArgs: []any{"%127.0%"},
+ },
+ {
+ name: "port contains",
+ filter: `port.contains("543")`,
+ wantSQL: "(EXISTS (SELECT 1 FROM jsonb_array_elements(instance.metadata -> 'dataSources') AS ds WHERE ds ->> 'port' LIKE $1))",
+ wantArgs: []any{"%543%"},
+ },
+ {
+ name: "matches is unsupported",
+ filter: `name.matches("sample")`,
+ wantErr: true,
+ errContains: "unexpected function matches",
+ },
+ }
+
+ for _, tt := range tests {
+ t.Run(tt.name, func(t *testing.T) {
+ q, err := GetListInstanceFilter(tt.filter)
+
+ if tt.wantErr {
+ require.Error(t, err)
+ if tt.errContains != "" {
+ require.ErrorContains(t, err, tt.errContains)
+ }
+ return
+ }
+
+ require.NoError(t, err)
+ require.NotNil(t, q)
+
+ sql, args, err := q.ToSQL()
+ require.NoError(t, err)
+ require.Equal(t, tt.wantSQL, sql)
+ require.Equal(t, tt.wantArgs, args)
+ })
+ }
+}
diff --git a/backend/store/project.go b/backend/store/project.go
index fe0c6e3db8..55a09db29c 100644
--- a/backend/store/project.go
+++ b/backend/store/project.go
@@ -717,7 +717,7 @@ func GetListProjectFilter(workspace, filter string) (*qb.Query, error) {
case celoperators.Equals:
variable, value := getVariableAndValueFromExpr(expr)
return parseToSQL(variable, value)
- case celoverloads.Matches:
+ case celoverloads.Contains:
variable := expr.AsCall().Target().AsIdent()
args := expr.AsCall().Args()
if len(args) != 1 {
diff --git a/backend/store/project_filter_test.go b/backend/store/project_filter_test.go
index 7709500c33..9879779b84 100644
--- a/backend/store/project_filter_test.go
+++ b/backend/store/project_filter_test.go
@@ -65,15 +65,15 @@ func TestGetListProjectFilter(t *testing.T) {
wantErr: false,
},
{
- name: "name matches",
- filter: `name.matches("test")`,
+ name: "name contains",
+ filter: `name.contains("test")`,
wantSQL: "(LOWER(project.name) LIKE $1)",
wantArgs: []any{"%test%"},
wantErr: false,
},
{
- name: "resource_id matches",
- filter: `resource_id.matches("prod")`,
+ name: "resource_id contains",
+ filter: `resource_id.contains("prod")`,
wantSQL: "(LOWER(project.resource_id) LIKE $1)",
wantArgs: []any{"%prod%"},
wantErr: false,
@@ -131,6 +131,12 @@ func TestGetListProjectFilter(t *testing.T) {
wantErr: true,
errContains: "invalid state filter",
},
+ {
+ name: "matches is unsupported",
+ filter: `name.matches("test")`,
+ wantErr: true,
+ errContains: "unexpected function matches",
+ },
}
for _, tt := range tests {
diff --git a/backend/store/query_history.go b/backend/store/query_history.go
index a84e56e844..d60b5eb342 100644
--- a/backend/store/query_history.go
+++ b/backend/store/query_history.go
@@ -253,7 +253,7 @@ func GetListQueryHistoryFilter(filter string) (*qb.Query, error) {
case celoperators.Equals:
variable, value := getVariableAndValueFromExpr(expr)
return parseToSQL(variable, value)
- case celoverloads.Matches:
+ case celoverloads.Contains:
variable := expr.AsCall().Target().AsIdent()
args := expr.AsCall().Args()
if len(args) != 1 {
@@ -261,7 +261,7 @@ func GetListQueryHistoryFilter(filter string) (*qb.Query, error) {
}
value := args[0].AsLiteral().Value()
if variable != "statement" {
- return nil, errors.Errorf(`only "statement" support %q operator, but found %q`, celoverloads.Matches, variable)
+ return nil, errors.Errorf(`only "statement" support %q operator, but found %q`, celoverloads.Contains, variable)
}
strValue, ok := value.(string)
if !ok {
diff --git a/backend/store/query_history_filter_test.go b/backend/store/query_history_filter_test.go
index be29047aa9..f6704ef79b 100644
--- a/backend/store/query_history_filter_test.go
+++ b/backend/store/query_history_filter_test.go
@@ -58,8 +58,8 @@ func TestGetListQueryHistoryFilter(t *testing.T) {
wantErr: false,
},
{
- name: "statement matches operator",
- filter: `statement.matches("SELECT")`,
+ name: "statement contains operator",
+ filter: `statement.contains("SELECT")`,
wantSQL: "(query_history.statement LIKE $1)",
wantArgs: []any{"%SELECT%"},
wantErr: false,
@@ -100,8 +100,8 @@ func TestGetListQueryHistoryFilter(t *testing.T) {
wantErr: false,
},
{
- name: "complex nested with statement matches",
- filter: `project == "projects/test" && statement.matches("SELECT") && type == "QUERY"`,
+ name: "complex nested with statement contains",
+ filter: `project == "projects/test" && statement.contains("SELECT") && type == "QUERY"`,
wantSQL: "(((query_history.project = $1 AND query_history.statement LIKE $2) AND query_history.type = $3))",
wantArgs: []any{"test", "%SELECT%", QueryHistoryType("QUERY")},
wantErr: false,
@@ -119,8 +119,8 @@ func TestGetListQueryHistoryFilter(t *testing.T) {
errContains: "unsupport variable",
},
{
- name: "matches on non-statement variable",
- filter: `project.matches("test")`,
+ name: "contains on non-statement variable",
+ filter: `project.contains("test")`,
wantErr: true,
errContains: `only "statement" support`,
},
@@ -131,11 +131,17 @@ func TestGetListQueryHistoryFilter(t *testing.T) {
errContains: "invalid project filter",
},
{
- name: "matches with non-string value",
- filter: `statement.matches(123)`,
+ name: "contains with non-string value",
+ filter: `statement.contains(123)`,
wantErr: true,
errContains: "expect string",
},
+ {
+ name: "statement matches operator unsupported",
+ filter: `statement.matches("SELECT")`,
+ wantErr: true,
+ errContains: "unexpected function matches",
+ },
}
for _, tt := range tests {
@@ -186,9 +192,9 @@ func TestGetListQueryHistoryFilter_EdgeCases(t *testing.T) {
wantErr: false,
},
{
- name: "statement matches with wildcard pattern",
- filter: `statement.matches("SELECT.*FROM")`,
- description: "regex pattern in matches should be wrapped with %",
+ name: "statement contains punctuation literally",
+ filter: `statement.contains("SELECT.*FROM")`,
+ description: "contains should treat punctuation as plain substring content",
wantSQL: "(query_history.statement LIKE $1)",
wantArgs: []any{"%SELECT.*FROM%"},
wantErr: false,
@@ -219,7 +225,7 @@ func TestGetListQueryHistoryFilter_EdgeCases(t *testing.T) {
},
{
name: "complex filter with all supported fields",
- filter: `project == "projects/test" && database == "instances/i1/databases/db1" && type == "EXPORT" && statement.matches("INSERT")`,
+ filter: `project == "projects/test" && database == "instances/i1/databases/db1" && type == "EXPORT" && statement.contains("INSERT")`,
description: "combination of all supported filter types",
wantSQL: "(((query_history.project = $1 AND query_history.database = $2) AND (query_history.type = $3 AND query_history.statement LIKE $4)))",
wantArgs: []any{"test", "instances/i1/databases/db1", QueryHistoryType("EXPORT"), "%INSERT%"},
@@ -274,8 +280,8 @@ func TestGetListQueryHistoryFilter_CompareWithOriginal(t *testing.T) {
expectedConditions: []string{"query_history.type = $1", "AND", "query_history.project = $2"},
},
{
- name: "statement matches",
- filter: `statement.matches("SELECT")`,
+ name: "statement contains",
+ filter: `statement.contains("SELECT")`,
expectedConditions: []string{"query_history.statement LIKE $1"},
},
{
diff --git a/frontend/src/components/SchemaEditorLite/Aside/Tree.vue b/frontend/src/components/SchemaEditorLite/Aside/Tree.vue
index 6c83219c11..37571fb6db 100644
--- a/frontend/src/components/SchemaEditorLite/Aside/Tree.vue
+++ b/frontend/src/components/SchemaEditorLite/Aside/Tree.vue
@@ -234,7 +234,7 @@ const handleSearch = debounce(
database: target.database.name,
skipCache: false,
limit: 100,
- filter: `table.matches("${search.trim()}")`,
+ filter: `table.contains("${search.trim()}")`,
});
return metadata;
})
diff --git a/frontend/src/plugins/agent/logic/skills/query.ts b/frontend/src/plugins/agent/logic/skills/query.ts
index da4a11e56c..1eba839a0c 100644
--- a/frontend/src/plugins/agent/logic/skills/query.ts
+++ b/frontend/src/plugins/agent/logic/skills/query.ts
@@ -24,16 +24,16 @@ Run SQL queries against databases managed by Bytebase.
\`\`\`
call_api(operationId="DatabaseService/ListDatabases", body={
"parent": "workspaces/{id}",
- "filter": "name.matches(\\"db_name\\")"
+ "filter": "name.contains(\\"db_name\\")"
})
\`\`\`
Filter examples:
- - \`name.matches("employee")\` - database name contains "employee"
+ - \`name.contains("employee")\` - database name contains "employee"
- \`project == "projects/{project-id}"\` - databases in a project
- \`instance == "instances/{instance-id}"\` - databases in an instance
- \`engine == "MYSQL"\` - MySQL databases only
- - \`environment == "environments/prod" && name.matches("user")\` - combine filters
+ - \`environment == "environments/prod" && name.contains("user")\` - combine filters
**Optionally inspect \`instanceResource.dataSources\`** if you need to target a specific data source. Prefer \`type: "READ_ONLY"\` over \`type: "ADMIN"\` when choosing explicitly.
diff --git a/frontend/src/store/modules/accessGrant.ts b/frontend/src/store/modules/accessGrant.ts
index 1d2b88634a..c91d133e7f 100644
--- a/frontend/src/store/modules/accessGrant.ts
+++ b/frontend/src/store/modules/accessGrant.ts
@@ -52,7 +52,7 @@ const getListAccessFilter = (filter: AccessFilter | undefined): string => {
parts.push(`(${statusFilter.join(" || ")})`);
}
if (filter.statement) {
- parts.push(`query.matches("${filter.statement.trim()}")`);
+ parts.push(`query.contains("${filter.statement.trim()}")`);
}
if (filter.creator) {
parts.push(`creator == "${filter.creator}"`);
diff --git a/frontend/src/store/modules/serviceAccount.ts b/frontend/src/store/modules/serviceAccount.ts
index b158899783..3c8f6b9ba5 100644
--- a/frontend/src/store/modules/serviceAccount.ts
+++ b/frontend/src/store/modules/serviceAccount.ts
@@ -27,7 +27,7 @@ export const getAccountListFilter = (params: AccountFilter) => {
const filter = [];
const search = params.query?.trim()?.toLowerCase();
if (search) {
- filter.push(`(name.matches("${search}") || email.matches("${search}"))`);
+ filter.push(`(name.contains("${search}") || email.contains("${search}"))`);
}
if (params.state === State.DELETED) {
filter.push(`state == "${State[params.state]}"`);
diff --git a/frontend/src/store/modules/sqlEditor/queryHistory.ts b/frontend/src/store/modules/sqlEditor/queryHistory.ts
index 262a395d2f..7a12891eb6 100644
--- a/frontend/src/store/modules/sqlEditor/queryHistory.ts
+++ b/frontend/src/store/modules/sqlEditor/queryHistory.ts
@@ -21,7 +21,7 @@ const getListQueryHistoryFilter = (filter: QueryHistoryFilter) => {
params.push(`database == "${filter.database}"`);
}
if (filter.statement) {
- params.push(`statement.matches("${filter.statement}")`);
+ params.push(`statement.contains("${filter.statement}")`);
}
return params.join(" && ");
};
diff --git a/frontend/src/store/modules/user.ts b/frontend/src/store/modules/user.ts
index dccc478d1c..be41c789b5 100644
--- a/frontend/src/store/modules/user.ts
+++ b/frontend/src/store/modules/user.ts
@@ -41,7 +41,7 @@ const getListUserFilter = (params: UserFilter) => {
const filter = [];
const search = params.query?.trim()?.toLowerCase();
if (search) {
- filter.push(`(name.matches("${search}") || email.matches("${search}"))`);
+ filter.push(`(name.contains("${search}") || email.contains("${search}"))`);
}
if (isValidProjectName(params.project)) {
filter.push(`project == "${params.project}"`);
diff --git a/frontend/src/store/modules/v1/database.ts b/frontend/src/store/modules/v1/database.ts
index cdbdf06548..14c3b3c7fd 100644
--- a/frontend/src/store/modules/v1/database.ts
+++ b/frontend/src/store/modules/v1/database.ts
@@ -137,7 +137,7 @@ const getListDatabaseFilter = (filter: DatabaseFilter): string => {
}
const keyword = filter.query?.trim()?.toLowerCase();
if (keyword) {
- params.push(`name.matches("${keyword}")`);
+ params.push(`name.contains("${keyword}")`);
}
if (filter.labels) {
@@ -145,7 +145,7 @@ const getListDatabaseFilter = (filter: DatabaseFilter): string => {
}
if (filter.table) {
- params.push(`table.matches("${filter.table}")`);
+ params.push(`table.contains("${filter.table}")`);
}
return params.join(" && ");
diff --git a/frontend/src/store/modules/v1/dbSchema.ts b/frontend/src/store/modules/v1/dbSchema.ts
index 7720e83250..cc8f57d59c 100644
--- a/frontend/src/store/modules/v1/dbSchema.ts
+++ b/frontend/src/store/modules/v1/dbSchema.ts
@@ -116,7 +116,7 @@ export const useDBSchemaV1Store = defineStore("dbSchema_v1", () => {
skipCache?: boolean;
silent?: boolean;
limit?: number; // limit the number of returned tables per schema
- filter?: string; // used to filter schema and table, e.g. schema == "public" && table.matches("user*")
+ filter?: string; // used to filter schema and table, e.g. schema == "public" && table.contains("user")
}) => {
const {
limit = 0,
diff --git a/frontend/src/store/modules/v1/group.ts b/frontend/src/store/modules/v1/group.ts
index 5613937718..980968c6df 100644
--- a/frontend/src/store/modules/v1/group.ts
+++ b/frontend/src/store/modules/v1/group.ts
@@ -27,7 +27,7 @@ const getListGroupFilter = (params: GroupFilter) => {
const filter = [];
const search = params.query?.trim()?.toLowerCase();
if (search) {
- filter.push(`(title.matches("${search}") || email.matches("${search}"))`);
+ filter.push(`(title.contains("${search}") || email.contains("${search}"))`);
}
if (isValidProjectName(params.project)) {
filter.push(`project == "${params.project}"`);
diff --git a/frontend/src/store/modules/v1/instance.ts b/frontend/src/store/modules/v1/instance.ts
index c879a9508c..62cfef8db6 100644
--- a/frontend/src/store/modules/v1/instance.ts
+++ b/frontend/src/store/modules/v1/instance.ts
@@ -53,7 +53,7 @@ const getListInstanceFilter = (params: InstanceFilter) => {
const search = params.query?.trim().toLowerCase();
if (search) {
list.push(
- `(name.matches("${search}") || resource_id.matches("${search}"))`
+ `(name.contains("${search}") || resource_id.contains("${search}"))`
);
}
if (isValidProjectName(params.project)) {
@@ -65,10 +65,10 @@ const getListInstanceFilter = (params: InstanceFilter) => {
list.push(`environment == "${params.environment}"`);
}
if (params.host) {
- list.push(`host.matches("${params.host}")`);
+ list.push(`host.contains("${params.host}")`);
}
if (params.port) {
- list.push(`port.matches("${params.port}")`);
+ list.push(`port.contains("${params.port}")`);
}
if (params.engines && params.engines.length > 0) {
// engine filter should be:
diff --git a/frontend/src/store/modules/v1/project.ts b/frontend/src/store/modules/v1/project.ts
index cd40d98c3c..f73752c490 100644
--- a/frontend/src/store/modules/v1/project.ts
+++ b/frontend/src/store/modules/v1/project.ts
@@ -47,7 +47,7 @@ const getListProjectFilter = (params: ProjectFilter) => {
// It's a regular name/resource_id search
const searchLower = search.toLowerCase();
list.push(
- `(name.matches("${searchLower}") || resource_id.matches("${searchLower}"))`
+ `(name.contains("${searchLower}") || resource_id.contains("${searchLower}"))`
);
}
diff --git a/frontend/src/types/proto-es/v1/database_service_pb.d.ts b/frontend/src/types/proto-es/v1/database_service_pb.d.ts
index 63942aa139..4598797031 100644
--- a/frontend/src/types/proto-es/v1/database_service_pb.d.ts
+++ b/frontend/src/types/proto-es/v1/database_service_pb.d.ts
@@ -118,12 +118,12 @@ export declare type ListDatabasesRequest = Message<"bytebase.v1.ListDatabasesReq
*
* Supported filter:
* - environment: the environment full name in "environments/{id}" format, support "==" operator.
- * - name: the database name, support ".matches()" operator.
+ * - name: the database name, support ".contains()" operator.
* - project: the project full name in "projects/{id}" format, support "==" operator.
* - instance: the instance full name in "instances/{id}" format, support "==" operator.
* - engine: the database engine, check Engine enum for values. Support "==", "in [xx]", "!(in [xx])" operator.
* - exclude_unassigned: should be "true" or "false", will not show unassigned databases if it's true, support "==" operator.
- * - table: filter by the database table, support "==" and ".matches()" operator.
+ * - table: filter by the database table, support "==" and ".contains()" operator.
* - labels.{key}: the database label, support "==" and "in" operators.
*
* For example:
@@ -131,19 +131,19 @@ export declare type ListDatabasesRequest = Message<"bytebase.v1.ListDatabasesReq
* environment == "" (find databases which environment is not set)
* project == "projects/{project resource id}"
* instance == "instances/{instance resource id}"
- * name.matches("database name")
+ * name.contains("database name")
* engine == "MYSQL"
* engine in ["MYSQL", "POSTGRES"]
* !(engine in ["MYSQL", "POSTGRES"])
* exclude_unassigned == true
* table == "sample"
- * table.matches("sam")
+ * table.contains("sam")
* labels.environment == "production"
* labels.region == "asia"
* labels.region in ["asia", "europe"]
*
* You can combine filter conditions like:
- * environment == "environments/prod" && name.matches("employee")
+ * environment == "environments/prod" && name.contains("employee")
*
* @generated from field: string filter = 4;
*/
@@ -372,14 +372,14 @@ export declare type GetDatabaseMetadataRequest = Message<"bytebase.v1.GetDatabas
*
* Supported filter:
* - schema: the schema name, support "==" operator.
- * - table: the table name, support "==" and ".matches()" operator.
+ * - table: the table name, support "==" and ".contains()" operator.
*
* For example:
* schema == "schema-a"
* table == "table-a"
- * table.matches("table-a")
- * schema == "schema-a" && table.matches("sample")
- * The filter used to search table with wildcard "sample" in the schema "schemas/schema-a".
+ * table.contains("table-a")
+ * schema == "schema-a" && table.contains("sample")
+ * The filter is used to search for tables containing "sample" in the schema "schemas/schema-a".
* The column masking level will only be returned when a table filter is used.
*
* @generated from field: string filter = 2;
diff --git a/frontend/src/types/proto-es/v1/group_service_pb.d.ts b/frontend/src/types/proto-es/v1/group_service_pb.d.ts
index 45af4b0551..d3e5635715 100644
--- a/frontend/src/types/proto-es/v1/group_service_pb.d.ts
+++ b/frontend/src/types/proto-es/v1/group_service_pb.d.ts
@@ -105,18 +105,18 @@ export declare type ListGroupsRequest = Message<"bytebase.v1.ListGroupsRequest">
* The syntax and semantics of CEL are documented at https://github.com/google/cel-spec
*
* Supported filter:
- * - title: the group title, support "==" and ".matches()" operator.
- * - email: the group email, support "==" and ".matches()" operator.
+ * - title: the group title, support "==" and ".contains()" operator.
+ * - email: the group email, support "==" and ".contains()" operator.
* - project: the project full name in "projects/{id}" format, support "==" operator.
*
* For example:
* title == "dba"
* email == "[email protected]"
- * title.matches("dba")
- * email.matches("dba")
+ * title.contains("dba")
+ * email.contains("dba")
* project == "projects/sample-project"
* You can combine filter conditions like:
- * title.matches("dba") || email.matches("dba")
+ * title.contains("dba") || email.contains("dba")
*
* @generated from field: string filter = 3;
*/
diff --git a/frontend/src/types/proto-es/v1/instance_service_pb.d.ts b/frontend/src/types/proto-es/v1/instance_service_pb.d.ts
index 0e72c861e8..eb6284fb87 100644
--- a/frontend/src/types/proto-es/v1/instance_service_pb.d.ts
+++ b/frontend/src/types/proto-es/v1/instance_service_pb.d.ts
@@ -69,21 +69,21 @@ export declare type ListInstancesRequest = Message<"bytebase.v1.ListInstancesReq
* The syntax and semantics of CEL are documented at https://github.com/google/cel-spec
*
* Supported filters:
- * - name: the instance name, support "==" and ".matches()" operator.
- * - resource_id: the instance id, support "==" and ".matches()" operator.
+ * - name: the instance name, support "==" and ".contains()" operator.
+ * - resource_id: the instance id, support "==" and ".contains()" operator.
* - environment: the environment full name in "environments/{id}" format, support "==" operator.
* - state: the instance state, check State enum for values, support "==" operator.
* - engine: the instance engine, check Engine enum for values. Support "==", "in [xx]", "!(in [xx])" operator.
- * - host: the instance host, support "==" and ".matches()" operator.
- * - port: the instance port, support "==" and ".matches()" operator.
+ * - host: the instance host, support "==" and ".contains()" operator.
+ * - port: the instance port, support "==" and ".contains()" operator.
* - project: the project full name in "projects/{id}" format, support "==" operator.
* - labels.{key}: the instance label, support "==" and "in" operators.
*
* For example:
* name == "sample instance"
- * name.matches("sample")
+ * name.contains("sample")
* resource_id == "sample-instance"
- * resource_id.matches("sample")
+ * resource_id.contains("sample")
* state == "DELETED"
* environment == "environments/test"
* environment == "" (find instances which environment is not set)
@@ -91,14 +91,14 @@ export declare type ListInstancesRequest = Message<"bytebase.v1.ListInstancesReq
* engine in ["MYSQL", "POSTGRES"]
* !(engine in ["MYSQL", "POSTGRES"])
* host == "127.0.0.1"
- * host.matches("127.0")
+ * host.contains("127.0")
* port == "54321"
- * port.matches("543")
+ * port.contains("543")
* labels.org_group == "infrastructure"
* labels.environment in ["prod", "production"]
* project == "projects/sample-project"
* You can combine filter conditions like:
- * name.matches("sample") && environment == "environments/test"
+ * name.contains("sample") && environment == "environments/test"
* host == "127.0.0.1" && port == "54321"
*
* @generated from field: string filter = 4;
diff --git a/frontend/src/types/proto-es/v1/project_service_pb.d.ts b/frontend/src/types/proto-es/v1/project_service_pb.d.ts
index 35da0bbe23..9cda9c0b35 100644
--- a/frontend/src/types/proto-es/v1/project_service_pb.d.ts
+++ b/frontend/src/types/proto-es/v1/project_service_pb.d.ts
@@ -171,25 +171,25 @@ export declare type SearchProjectsRequest = Message<"bytebase.v1.SearchProjectsR
* The syntax and semantics of CEL are documented at https://github.com/google/cel-spec
*
* Supported filters:
- * - name: the project name, support "==" and ".matches()" operator.
- * - resource_id: the project id, support "==" and ".matches()" operator.
+ * - name: the project name, support "==" and ".contains()" operator.
+ * - resource_id: the project id, support "==" and ".contains()" operator.
* - exclude_default: if not include the default project, should be "true" or "false", support "==" operator.
* - state: check the State enum for the values, support "==" operator.
* - labels.{key}: the project label, support "==" and "in" operators.
*
* For example:
* name == "project name"
- * name.matches("project name")
+ * name.contains("project name")
* resource_id == "project id"
- * resource_id.matches("project id")
+ * resource_id.contains("project id")
* exclude_default == true
* state == "DELETED"
* labels.environment == "production"
* labels.tier == "critical"
* labels.environment in ["staging", "prod"]
* You can combine filter conditions like:
- * name == "project name" && resource_id.matches("project id")
- * name.matches("project name") || resource_id == "project id"
+ * name == "project name" && resource_id.contains("project id")
+ * name.contains("project name") || resource_id == "project id"
* labels.environment == "production" && labels.tier == "critical"
*
* @generated from field: string filter = 2;
diff --git a/frontend/src/types/proto-es/v1/service_account_service_pb.d.ts b/frontend/src/types/proto-es/v1/service_account_service_pb.d.ts
index 519243bb71..6589603f0b 100644
--- a/frontend/src/types/proto-es/v1/service_account_service_pb.d.ts
+++ b/frontend/src/types/proto-es/v1/service_account_service_pb.d.ts
@@ -175,16 +175,16 @@ export declare type ListServiceAccountsRequest = Message<"bytebase.v1.ListServic
* The syntax and semantics of CEL are documented at https://github.com/google/cel-spec
*
* Supported filter:
- * - name: the service account name, support "==" and ".matches()" operator.
- * - email: the service account email, support "==" and ".matches()" operator.
+ * - name: the service account name, support "==" and ".contains()" operator.
+ * - email: the service account email, support "==" and ".contains()" operator.
* - state: check State enum for values, support "==" operator.
*
* For example:
* name == "ed"
- * name.matches("ed")
+ * name.contains("ed")
* state == "DELETED"
* email == "[email protected]"
- * email.matches("ed")
+ * email.contains("ed")
*
* @generated from field: string filter = 5;
*/
diff --git a/frontend/src/types/proto-es/v1/sql_service_pb.d.ts b/frontend/src/types/proto-es/v1/sql_service_pb.d.ts
index e69919cb6d..1c4f995b72 100644
--- a/frontend/src/types/proto-es/v1/sql_service_pb.d.ts
+++ b/frontend/src/types/proto-es/v1/sql_service_pb.d.ts
@@ -1161,7 +1161,7 @@ export declare type SearchQueryHistoriesRequest = Message<"bytebase.v1.SearchQue
* - database: the database full name in "instances/{id}/databases/{name}" format, support "==" operator.
* - instance: the instance full name in "instances/{id}" format, support "==" operator.
* - type: the type, should be "QUERY" or "EXPORT", support "==" operator.
- * - statement: the SQL statement, support ".matches()" operator.
+ * - statement: the SQL statement, support ".contains()" operator.
*
* For example:
* project == "projects/{project}"
@@ -1169,8 +1169,8 @@ export declare type SearchQueryHistoriesRequest = Message<"bytebase.v1.SearchQue
* instance == "instances/{instance}"
* type == "QUERY"
* type == "EXPORT"
- * statement.matches("select")
- * type == "QUERY" && statement.matches("select")
+ * statement.contains("select")
+ * type == "QUERY" && statement.contains("select")
*
* @generated from field: string filter = 3;
*/
diff --git a/frontend/src/types/proto-es/v1/user_service_pb.d.ts b/frontend/src/types/proto-es/v1/user_service_pb.d.ts
index 98c0c18354..fe65299e6e 100644
--- a/frontend/src/types/proto-es/v1/user_service_pb.d.ts
+++ b/frontend/src/types/proto-es/v1/user_service_pb.d.ts
@@ -105,20 +105,20 @@ export declare type ListUsersRequest = Message<"bytebase.v1.ListUsersRequest"> &
* The syntax and semantics of CEL are documented at https://github.com/google/cel-spec
*
* Supported filter:
- * - name: the user name, support "==" and ".matches()" operator.
- * - email: the user email, support "==" and ".matches()" operator.
+ * - name: the user name, support "==" and ".contains()" operator.
+ * - email: the user email, support "==" and ".contains()" operator.
* - state: check State enum for values, support "==" operator.
* - project: the project full name in "projects/{id}" format, support "==" operator.
*
* For example:
* name == "ed"
- * name.matches("ed")
+ * name.contains("ed")
* email == "[email protected]"
- * email.matches("ed")
+ * email.contains("ed")
* state == "DELETED"
* project == "projects/sample-project"
* You can combine filter conditions like:
- * name.matches("ed") && project == "projects/sample-project"
+ * name.contains("ed") && project == "projects/sample-project"
* (name == "ed" || email == "[email protected]") && project == "projects/sample-project"
*
* @generated from field: string filter = 4;
diff --git a/frontend/src/types/proto-es/v1/workload_identity_service_pb.d.ts b/frontend/src/types/proto-es/v1/workload_identity_service_pb.d.ts
index 46cdbda095..622dcc5718 100644
--- a/frontend/src/types/proto-es/v1/workload_identity_service_pb.d.ts
+++ b/frontend/src/types/proto-es/v1/workload_identity_service_pb.d.ts
@@ -243,16 +243,16 @@ export declare type ListWorkloadIdentitiesRequest = Message<"bytebase.v1.ListWor
* The syntax and semantics of CEL are documented at https://github.com/google/cel-spec
*
* Supported filter:
- * - name: the workload identity name, support "==" and ".matches()" operator.
- * - email: the workload identity email, support "==" and ".matches()" operator.
+ * - name: the workload identity name, support "==" and ".contains()" operator.
+ * - email: the workload identity email, support "==" and ".contains()" operator.
* - state: check State enum for values, support "==" operator.
*
* For example:
* name == "ed"
- * name.matches("ed")
+ * name.contains("ed")
* state == "DELETED"
* email == "[email protected]"
- * email.matches("ed")
+ * email.contains("ed")
*
* @generated from field: string filter = 5;
*/
diff --git a/proto/gen/grpc-doc/openapi.yaml b/proto/gen/grpc-doc/openapi.yaml
index 59c02c8106..dff8be8898 100644
--- a/proto/gen/grpc-doc/openapi.yaml
+++ b/proto/gen/grpc-doc/openapi.yaml
@@ -745,18 +745,18 @@ paths:
The syntax and semantics of CEL are documented at https://github.com/google/cel-spec
Supported filter:
- - title: the group title, support "==" and ".matches()" operator.
- - email: the group email, support "==" and ".matches()" operator.
+ - title: the group title, support "==" and ".contains()" operator.
+ - email: the group email, support "==" and ".contains()" operator.
- project: the project full name in "projects/{id}" format, support "==" operator.
For example:
title == "dba"
email == "[email protected]"
- title.matches("dba")
- email.matches("dba")
+ title.contains("dba")
+ email.contains("dba")
project == "projects/sample-project"
You can combine filter conditions like:
- title.matches("dba") || email.matches("dba")
+ title.contains("dba") || email.contains("dba")
schema:
type: string
title: filter
@@ -765,18 +765,18 @@ paths:
The syntax and semantics of CEL are documented at https://github.com/google/cel-spec
Supported filter:
- - title: the group title, support "==" and ".matches()" operator.
- - email: the group email, support "==" and ".matches()" operator.
+ - title: the group title, support "==" and ".contains()" operator.
+ - email: the group email, support "==" and ".contains()" operator.
- project: the project full name in "projects/{id}" format, support "==" operator.
For example:
title == "dba"
email == "[email protected]"
- title.matches("dba")
- email.matches("dba")
+ title.contains("dba")
+ email.contains("dba")
project == "projects/sample-project"
You can combine filter conditions like:
- title.matches("dba") || email.matches("dba")
+ title.contains("dba") || email.contains("dba")
responses:
"200":
description: Success
@@ -1596,21 +1596,21 @@ paths:
The syntax and semantics of CEL are documented at https://github.com/google/cel-spec
Supported filters:
- - name: the instance name, support "==" and ".matches()" operator.
- - resource_id: the instance id, support "==" and ".matches()" operator.
+ - name: the instance name, support "==" and ".contains()" operator.
+ - resource_id: the instance id, support "==" and ".contains()" operator.
- environment: the environment full name in "environments/{id}" format, support "==" operator.
- state: the instance state, check State enum for values, support "==" operator.
- engine: the instance engine, check Engine enum for values. Support "==", "in [xx]", "!(in [xx])" operator.
- - host: the instance host, support "==" and ".matches()" operator.
- - port: the instance port, support "==" and ".matches()" operator.
+ - host: the instance host, support "==" and ".contains()" operator.
+ - port: the instance port, support "==" and ".contains()" operator.
- project: the project full name in "projects/{id}" format, support "==" operator.
- labels.{key}: the instance label, support "==" and "in" operators.
For example:
name == "sample instance"
- name.matches("sample")
+ name.contains("sample")
resource_id == "sample-instance"
- resource_id.matches("sample")
+ resource_id.contains("sample")
state == "DELETED"
environment == "environments/test"
environment == "" (find instances which environment is not set)
@@ -1618,14 +1618,14 @@ paths:
engine in ["MYSQL", "POSTGRES"]
!(engine in ["MYSQL", "POSTGRES"])
host == "127.0.0.1"
- host.matches("127.0")
+ host.contains("127.0")
port == "54321"
- port.matches("543")
+ port.contains("543")
labels.org_group == "infrastructure"
labels.environment in ["prod", "production"]
project == "projects/sample-project"
You can combine filter conditions like:
- name.matches("sample") && environment == "environments/test"
+ name.contains("sample") && environment == "environments/test"
host == "127.0.0.1" && port == "54321"
schema:
type: string
@@ -1635,21 +1635,21 @@ paths:
The syntax and semantics of CEL are documented at https://github.com/google/cel-spec
Supported filters:
- - name: the instance name, support "==" and ".matches()" operator.
- - resource_id: the instance id, support "==" and ".matches()" operator.
+ - name: the instance name, support "==" and ".contains()" operator.
+ - resource_id: the instance id, support "==" and ".contains()" operator.
- environment: the environment full name in "environments/{id}" format, support "==" operator.
- state: the instance state, check State enum for values, support "==" operator.
- engine: the instance engine, check Engine enum for values. Support "==", "in [xx]", "!(in [xx])" operator.
- - host: the instance host, support "==" and ".matches()" operator.
- - port: the instance port, support "==" and ".matches()" operator.
+ - host: the instance host, support "==" and ".contains()" operator.
+ - port: the instance port, support "==" and ".contains()" operator.
- project: the project full name in "projects/{id}" format, support "==" operator.
- labels.{key}: the instance label, support "==" and "in" operators.
For example:
name == "sample instance"
- name.matches("sample")
+ name.contains("sample")
resource_id == "sample-instance"
- resource_id.matches("sample")
+ resource_id.contains("sample")
state == "DELETED"
environment == "environments/test"
environment == "" (find instances which environment is not set)
@@ -1657,14 +1657,14 @@ paths:
engine in ["MYSQL", "POSTGRES"]
!(engine in ["MYSQL", "POSTGRES"])
host == "127.0.0.1"
- host.matches("127.0")
+ host.contains("127.0")
port == "54321"
- port.matches("543")
+ port.contains("543")
labels.org_group == "infrastructure"
labels.environment in ["prod", "production"]
project == "projects/sample-project"
You can combine filter conditions like:
- name.matches("sample") && environment == "environments/test"
+ name.contains("sample") && environment == "environments/test"
host == "127.0.0.1" && port == "54321"
- name: orderBy
in: query
@@ -2118,12 +2118,12 @@ paths:
Supported filter:
- environment: the environment full name in "environments/{id}" format, support "==" operator.
- - name: the database name, support ".matches()" operator.
+ - name: the database name, support ".contains()" operator.
- project: the project full name in "projects/{id}" format, support "==" operator.
- instance: the instance full name in "instances/{id}" format, support "==" operator.
- engine: the database engine, check Engine enum for values. Support "==", "in [xx]", "!(in [xx])" operator.
- exclude_unassigned: should be "true" or "false", will not show unassigned databases if it's true, support "==" operator.
- - table: filter by the database table, support "==" and ".matches()" operator.
+ - table: filter by the database table, support "==" and ".contains()" operator.
- labels.{key}: the database label, support "==" and "in" operators.
For example:
@@ -2131,19 +2131,19 @@ paths:
environment == "" (find databases which environment is not set)
project == "projects/{project resource id}"
instance == "instances/{instance resource id}"
- name.matches("database name")
+ name.contains("database name")
engine == "MYSQL"
engine in ["MYSQL", "POSTGRES"]
!(engine in ["MYSQL", "POSTGRES"])
exclude_unassigned == true
table == "sample"
- table.matches("sam")
+ table.contains("sam")
labels.environment == "production"
labels.region == "asia"
labels.region in ["asia", "europe"]
You can combine filter conditions like:
- environment == "environments/prod" && name.matches("employee")
+ environment == "environments/prod" && name.contains("employee")
schema:
type: string
title: filter
@@ -2153,12 +2153,12 @@ paths:
Supported filter:
- environment: the environment full name in "environments/{id}" format, support "==" operator.
- - name: the database name, support ".matches()" operator.
+ - name: the database name, support ".contains()" operator.
- project: the project full name in "projects/{id}" format, support "==" operator.
- instance: the instance full name in "instances/{id}" format, support "==" operator.
- engine: the database engine, check Engine enum for values. Support "==", "in [xx]", "!(in [xx])" operator.
- exclude_unassigned: should be "true" or "false", will not show unassigned databases if it's true, support "==" operator.
- - table: filter by the database table, support "==" and ".matches()" operator.
+ - table: filter by the database table, support "==" and ".contains()" operator.
- labels.{key}: the database label, support "==" and "in" operators.
For example:
@@ -2166,19 +2166,19 @@ paths:
environment == "" (find databases which environment is not set)
project == "projects/{project resource id}"
instance == "instances/{instance resource id}"
- name.matches("database name")
+ name.contains("database name")
engine == "MYSQL"
engine in ["MYSQL", "POSTGRES"]
!(engine in ["MYSQL", "POSTGRES"])
exclude_unassigned == true
table == "sample"
- table.matches("sam")
+ table.contains("sam")
labels.environment == "production"
labels.region == "asia"
labels.region in ["asia", "europe"]
You can combine filter conditions like:
- environment == "environments/prod" && name.matches("employee")
+ environment == "environments/prod" && name.contains("employee")
- name: showDeleted
in: query
description: Show deleted database if specified.
@@ -2816,14 +2816,14 @@ paths:
Supported filter:
- schema: the schema name, support "==" operator.
- - table: the table name, support "==" and ".matches()" operator.
+ - table: the table name, support "==" and ".contains()" operator.
For example:
schema == "schema-a"
table == "table-a"
- table.matches("table-a")
- schema == "schema-a" && table.matches("sample")
- The filter used to search table with wildcard "sample" in the schema "schemas/schema-a".
+ table.contains("table-a")
+ schema == "schema-a" && table.contains("sample")
+ The filter is used to search for tables containing "sample" in the schema "schemas/schema-a".
The column masking level will only be returned when a table filter is used.
schema:
type: string
@@ -2834,14 +2834,14 @@ paths:
Supported filter:
- schema: the schema name, support "==" operator.
- - table: the table name, support "==" and ".matches()" operator.
+ - table: the table name, support "==" and ".contains()" operator.
For example:
schema == "schema-a"
table == "table-a"
- table.matches("table-a")
- schema == "schema-a" && table.matches("sample")
- The filter used to search table with wildcard "sample" in the schema "schemas/schema-a".
+ table.contains("table-a")
+ schema == "schema-a" && table.contains("sample")
+ The filter is used to search for tables containing "sample" in the schema "schemas/schema-a".
The column masking level will only be returned when a table filter is used.
- name: limit
in: query
@@ -7750,12 +7750,12 @@ paths:
Supported filter:
- environment: the environment full name in "environments/{id}" format, support "==" operator.
- - name: the database name, support ".matches()" operator.
+ - name: the database name, support ".contains()" operator.
- project: the project full name in "projects/{id}" format, support "==" operator.
- instance: the instance full name in "instances/{id}" format, support "==" operator.
- engine: the database engine, check Engine enum for values. Support "==", "in [xx]", "!(in [xx])" operator.
- exclude_unassigned: should be "true" or "false", will not show unassigned databases if it's true, support "==" operator.
- - table: filter by the database table, support "==" and ".matches()" operator.
+ - table: filter by the database table, support "==" and ".contains()" operator.
- labels.{key}: the database label, support "==" and "in" operators.
For example:
@@ -7763,19 +7763,19 @@ paths:
environment == "" (find databases which environment is not set)
project == "projects/{project resource id}"
instance == "instances/{instance resource id}"
- name.matches("database name")
+ name.contains("database name")
engine == "MYSQL"
engine in ["MYSQL", "POSTGRES"]
!(engine in ["MYSQL", "POSTGRES"])
exclude_unassigned == true
table == "sample"
- table.matches("sam")
+ table.contains("sam")
labels.environment == "production"
labels.region == "asia"
labels.region in ["asia", "europe"]
You can combine filter conditions like:
- environment == "environments/prod" && name.matches("employee")
+ environment == "environments/prod" && name.contains("employee")
schema:
type: string
title: filter
@@ -7785,12 +7785,12 @@ paths:
Supported filter:
- environment: the environment full name in "environments/{id}" format, support "==" operator.
- - name: the database name, support ".matches()" operator.
+ - name: the database name, support ".contains()" operator.
- project: the project full name in "projects/{id}" format, support "==" operator.
- instance: the instance full name in "instances/{id}" format, support "==" operator.
- engine: the database engine, check Engine enum for values. Support "==", "in [xx]", "!(in [xx])" operator.
- exclude_unassigned: should be "true" or "false", will not show unassigned databases if it's true, support "==" operator.
- - table: filter by the database table, support "==" and ".matches()" operator.
+ - table: filter by the database table, support "==" and ".contains()" operator.
- labels.{key}: the database label, support "==" and "in" operators.
For example:
@@ -7798,19 +7798,19 @@ paths:
environment == "" (find databases which environment is not set)
project == "projects/{project resource id}"
instance == "instances/{instance resource id}"
- name.matches("database name")
+ name.contains("database name")
engine == "MYSQL"
engine in ["MYSQL", "POSTGRES"]
!(engine in ["MYSQL", "POSTGRES"])
exclude_unassigned == true
table == "sample"
- table.matches("sam")
+ table.contains("sam")
labels.environment == "production"
labels.region == "asia"
labels.region in ["asia", "europe"]
You can combine filter conditions like:
- environment == "environments/prod" && name.matches("employee")
+ environment == "environments/prod" && name.contains("employee")
- name: showDeleted
in: query
description: Show deleted database if specified.
@@ -11202,16 +11202,16 @@ paths:
The syntax and semantics of CEL are documented at https://github.com/google/cel-spec
Supported filter:
- - name: the service account name, support "==" and ".matches()" operator.
- - email: the service account email, support "==" and ".matches()" operator.
+ - name: the service account name, support "==" and ".contains()" operator.
+ - email: the service account email, support "==" and ".contains()" operator.
- state: check State enum for values, support "==" operator.
For example:
name == "ed"
- name.matches("ed")
+ name.contains("ed")
state == "DELETED"
email == "[email protected]"
- email.matches("ed")
+ email.contains("ed")
schema:
type: string
title: filter
@@ -11220,16 +11220,16 @@ paths:
The syntax and semantics of CEL are documented at https://github.com/google/cel-spec
Supported filter:
- - name: the service account name, support "==" and ".matches()" operator.
- - email: the service account email, support "==" and ".matches()" operator.
+ - name: the service account name, support "==" and ".contains()" operator.
+ - email: the service account email, support "==" and ".contains()" operator.
- state: check State enum for values, support "==" operator.
For example:
name == "ed"
- name.matches("ed")
+ name.contains("ed")
state == "DELETED"
email == "[email protected]"
- email.matches("ed")
+ email.contains("ed")
responses:
"200":
description: Success
@@ -11749,16 +11749,16 @@ paths:
The syntax and semantics of CEL are documented at https://github.com/google/cel-spec
Supported filter:
- - name: the workload identity name, support "==" and ".matches()" operator.
- - email: the workload identity email, support "==" and ".matches()" operator.
+ - name: the workload identity name, support "==" and ".contains()" operator.
+ - email: the workload identity email, support "==" and ".contains()" operator.
- state: check State enum for values, support "==" operator.
For example:
name == "ed"
- name.matches("ed")
+ name.contains("ed")
state == "DELETED"
email == "[email protected]"
- email.matches("ed")
+ email.contains("ed")
schema:
type: string
title: filter
@@ -11767,16 +11767,16 @@ paths:
The syntax and semantics of CEL are documented at https://github.com/google/cel-spec
Supported filter:
- - name: the workload identity name, support "==" and ".matches()" operator.
- - email: the workload identity email, support "==" and ".matches()" operator.
+ - name: the workload identity name, support "==" and ".contains()" operator.
+ - email: the workload identity email, support "==" and ".contains()" operator.
- state: check State enum for values, support "==" operator.
For example:
name == "ed"
- name.matches("ed")
+ name.contains("ed")
state == "DELETED"
email == "[email protected]"
- email.matches("ed")
+ email.contains("ed")
responses:
"200":
description: Success
@@ -14304,20 +14304,20 @@ paths:
The syntax and semantics of CEL are documented at https://github.com/google/cel-spec
Supported filter:
- - name: the user name, support "==" and ".matches()" operator.
- - email: the user email, support "==" and ".matches()" operator.
+ - name: the user name, support "==" and ".contains()" operator.
+ - email: the user email, support "==" and ".contains()" operator.
- state: check State enum for values, support "==" operator.
- project: the project full name in "projects/{id}" format, support "==" operator.
For example:
name == "ed"
- name.matches("ed")
+ name.contains("ed")
email == "[email protected]"
- email.matches("ed")
+ email.contains("ed")
state == "DELETED"
project == "projects/sample-project"
You can combine filter conditions like:
- name.matches("ed") && project == "projects/sample-project"
+ name.contains("ed") && project == "projects/sample-project"
(name == "ed" || email == "[email protected]") && project == "projects/sample-project"
schema:
type: string
@@ -14327,20 +14327,20 @@ paths:
The syntax and semantics of CEL are documented at https://github.com/google/cel-spec
Supported filter:
- - name: the user name, support "==" and ".matches()" operator.
- - email: the user email, support "==" and ".matches()" operator.
+ - name: the user name, support "==" and ".contains()" operator.
+ - email: the user email, support "==" and ".contains()" operator.
- state: check State enum for values, support "==" operator.
- project: the project full name in "projects/{id}" format, support "==" operator.
For example:
name == "ed"
- name.matches("ed")
+ name.contains("ed")
email == "[email protected]"
- email.matches("ed")
+ email.contains("ed")
state == "DELETED"
project == "projects/sample-project"
You can combine filter conditions like:
- name.matches("ed") && project == "projects/sample-project"
+ name.contains("ed") && project == "projects/sample-project"
(name == "ed" || email == "[email protected]") && project == "projects/sample-project"
responses:
"200":
@@ -15299,12 +15299,12 @@ paths:
Supported filter:
- environment: the environment full name in "environments/{id}" format, support "==" operator.
- - name: the database name, support ".matches()" operator.
+ - name: the database name, support ".contains()" operator.
- project: the project full name in "projects/{id}" format, support "==" operator.
- instance: the instance full name in "instances/{id}" format, support "==" operator.
- engine: the database engine, check Engine enum for values. Support "==", "in [xx]", "!(in [xx])" operator.
- exclude_unassigned: should be "true" or "false", will not show unassigned databases if it's true, support "==" operator.
- - table: filter by the database table, support "==" and ".matches()" operator.
+ - table: filter by the database table, support "==" and ".contains()" operator.
- labels.{key}: the database label, support "==" and "in" operators.
For example:
@@ -15312,19 +15312,19 @@ paths:
environment == "" (find databases which environment is not set)
project == "projects/{project resource id}"
instance == "instances/{instance resource id}"
- name.matches("database name")
+ name.contains("database name")
engine == "MYSQL"
engine in ["MYSQL", "POSTGRES"]
!(engine in ["MYSQL", "POSTGRES"])
exclude_unassigned == true
table == "sample"
- table.matches("sam")
+ table.contains("sam")
labels.environment == "production"
labels.region == "asia"
labels.region in ["asia", "europe"]
You can combine filter conditions like:
- environment == "environments/prod" && name.matches("employee")
+ environment == "environments/prod" && name.contains("employee")
schema:
type: string
title: filter
@@ -15334,12 +15334,12 @@ paths:
Supported filter:
- environment: the environment full name in "environments/{id}" format, support "==" operator.
- - name: the database name, support ".matches()" operator.
+ - name: the database name, support ".contains()" operator.
- project: the project full name in "projects/{id}" format, support "==" operator.
- instance: the instance full name in "instances/{id}" format, support "==" operator.
- engine: the database engine, check Engine enum for values. Support "==", "in [xx]", "!(in [xx])" operator.
- exclude_unassigned: should be "true" or "false", will not show unassigned databases if it's true, support "==" operator.
- - table: filter by the database table, support "==" and ".matches()" operator.
+ - table: filter by the database table, support "==" and ".contains()" operator.
- labels.{key}: the database label, support "==" and "in" operators.
For example:
@@ -15347,19 +15347,19 @@ paths:
environment == "" (find databases which environment is not set)
project == "projects/{project resource id}"
instance == "instances/{instance resource id}"
- name.matches("database name")
+ name.contains("database name")
engine == "MYSQL"
engine in ["MYSQL", "POSTGRES"]
!(engine in ["MYSQL", "POSTGRES"])
exclude_unassigned == true
table == "sample"
- table.matches("sam")
+ table.contains("sam")
labels.environment == "production"
labels.region == "asia"
labels.region in ["asia", "europe"]
You can combine filter conditions like:
- environment == "environments/prod" && name.matches("employee")
+ environment == "environments/prod" && name.contains("employee")
- name: showDeleted
in: query
description: Show deleted database if specified.
@@ -15858,16 +15858,16 @@ paths:
The syntax and semantics of CEL are documented at https://github.com/google/cel-spec
Supported filter:
- - name: the service account name, support "==" and ".matches()" operator.
- - email: the service account email, support "==" and ".matches()" operator.
+ - name: the service account name, support "==" and ".contains()" operator.
+ - email: the service account email, support "==" and ".contains()" operator.
- state: check State enum for values, support "==" operator.
For example:
name == "ed"
- name.matches("ed")
+ name.contains("ed")
state == "DELETED"
email == "[email protected]"
- email.matches("ed")
+ email.contains("ed")
schema:
type: string
title: filter
@@ -15876,16 +15876,16 @@ paths:
The syntax and semantics of CEL are documented at https://github.com/google/cel-spec
Supported filter:
- - name: the service account name, support "==" and ".matches()" operator.
- - email: the service account email, support "==" and ".matches()" operator.
+ - name: the service account name, support "==" and ".contains()" operator.
+ - email: the service account email, support "==" and ".contains()" operator.
- state: check State enum for values, support "==" operator.
For example:
name == "ed"
- name.matches("ed")
+ name.contains("ed")
state == "DELETED"
email == "[email protected]"
- email.matches("ed")
+ email.contains("ed")
responses:
"200":
description: Success
@@ -16002,16 +16002,16 @@ paths:
The syntax and semantics of CEL are documented at https://github.com/google/cel-spec
Supported filter:
- - name: the workload identity name, support "==" and ".matches()" operator.
- - email: the workload identity email, support "==" and ".matches()" operator.
+ - name: the workload identity name, support "==" and ".contains()" operator.
+ - email: the workload identity email, support "==" and ".contains()" operator.
- state: check State enum for values, support "==" operator.
For example:
name == "ed"
- name.matches("ed")
+ name.contains("ed")
state == "DELETED"
email == "[email protected]"
- email.matches("ed")
+ email.contains("ed")
schema:
type: string
title: filter
@@ -16020,16 +16020,16 @@ paths:
The syntax and semantics of CEL are documented at https://github.com/google/cel-spec
Supported filter:
- - name: the workload identity name, support "==" and ".matches()" operator.
- - email: the workload identity email, support "==" and ".matches()" operator.
+ - name: the workload identity name, support "==" and ".contains()" operator.
+ - email: the workload identity email, support "==" and ".contains()" operator.
- state: check State enum for values, support "==" operator.
For example:
name == "ed"
- name.matches("ed")
+ name.contains("ed")
state == "DELETED"
email == "[email protected]"
- email.matches("ed")
+ email.contains("ed")
responses:
"200":
description: Success
@@ -20354,14 +20354,14 @@ components:
Supported filter:
- schema: the schema name, support "==" operator.
- - table: the table name, support "==" and ".matches()" operator.
+ - table: the table name, support "==" and ".contains()" operator.
For example:
schema == "schema-a"
table == "table-a"
- table.matches("table-a")
- schema == "schema-a" && table.matches("sample")
- The filter used to search table with wildcard "sample" in the schema "schemas/schema-a".
+ table.contains("table-a")
+ schema == "schema-a" && table.contains("sample")
+ The filter is used to search for tables containing "sample" in the schema "schemas/schema-a".
The column masking level will only be returned when a table filter is used.
limit:
type: integer
@@ -21899,12 +21899,12 @@ components:
Supported filter:
- environment: the environment full name in "environments/{id}" format, support "==" operator.
- - name: the database name, support ".matches()" operator.
+ - name: the database name, support ".contains()" operator.
- project: the project full name in "projects/{id}" format, support "==" operator.
- instance: the instance full name in "instances/{id}" format, support "==" operator.
- engine: the database engine, check Engine enum for values. Support "==", "in [xx]", "!(in [xx])" operator.
- exclude_unassigned: should be "true" or "false", will not show unassigned databases if it's true, support "==" operator.
- - table: filter by the database table, support "==" and ".matches()" operator.
+ - table: filter by the database table, support "==" and ".contains()" operator.
- labels.{key}: the database label, support "==" and "in" operators.
For example:
@@ -21912,19 +21912,19 @@ components:
environment == "" (find databases which environment is not set)
project == "projects/{project resource id}"
instance == "instances/{instance resource id}"
- name.matches("database name")
+ name.contains("database name")
engine == "MYSQL"
engine in ["MYSQL", "POSTGRES"]
!(engine in ["MYSQL", "POSTGRES"])
exclude_unassigned == true
table == "sample"
- table.matches("sam")
+ table.contains("sam")
labels.environment == "production"
labels.region == "asia"
labels.region in ["asia", "europe"]
You can combine filter conditions like:
- environment == "environments/prod" && name.matches("employee")
+ environment == "environments/prod" && name.contains("employee")
showDeleted:
type: boolean
title: show_deleted
@@ -21989,18 +21989,18 @@ components:
The syntax and semantics of CEL are documented at https://github.com/google/cel-spec
Supported filter:
- - title: the group title, support "==" and ".matches()" operator.
- - email: the group email, support "==" and ".matches()" operator.
+ - title: the group title, support "==" and ".contains()" operator.
+ - email: the group email, support "==" and ".contains()" operator.
- project: the project full name in "projects/{id}" format, support "==" operator.
For example:
title == "dba"
email == "[email protected]"
- title.matches("dba")
- email.matches("dba")
+ title.contains("dba")
+ email.contains("dba")
project == "projects/sample-project"
You can combine filter conditions like:
- title.matches("dba") || email.matches("dba")
+ title.contains("dba") || email.contains("dba")
title: ListGroupsRequest
additionalProperties: false
description: Request message for listing groups.
@@ -22155,21 +22155,21 @@ components:
The syntax and semantics of CEL are documented at https://github.com/google/cel-spec
Supported filters:
- - name: the instance name, support "==" and ".matches()" operator.
- - resource_id: the instance id, support "==" and ".matches()" operator.
+ - name: the instance name, support "==" and ".contains()" operator.
+ - resource_id: the instance id, support "==" and ".contains()" operator.
- environment: the environment full name in "environments/{id}" format, support "==" operator.
- state: the instance state, check State enum for values, support "==" operator.
- engine: the instance engine, check Engine enum for values. Support "==", "in [xx]", "!(in [xx])" operator.
- - host: the instance host, support "==" and ".matches()" operator.
- - port: the instance port, support "==" and ".matches()" operator.
+ - host: the instance host, support "==" and ".contains()" operator.
+ - port: the instance port, support "==" and ".contains()" operator.
- project: the project full name in "projects/{id}" format, support "==" operator.
- labels.{key}: the instance label, support "==" and "in" operators.
For example:
name == "sample instance"
- name.matches("sample")
+ name.contains("sample")
resource_id == "sample-instance"
- resource_id.matches("sample")
+ resource_id.contains("sample")
state == "DELETED"
environment == "environments/test"
environment == "" (find instances which environment is not set)
@@ -22177,14 +22177,14 @@ components:
engine in ["MYSQL", "POSTGRES"]
!(engine in ["MYSQL", "POSTGRES"])
host == "127.0.0.1"
- host.matches("127.0")
+ host.contains("127.0")
port == "54321"
- port.matches("543")
+ port.contains("543")
labels.org_group == "infrastructure"
labels.environment in ["prod", "production"]
project == "projects/sample-project"
You can combine filter conditions like:
- name.matches("sample") && environment == "environments/test"
+ name.contains("sample") && environment == "environments/test"
host == "127.0.0.1" && port == "54321"
orderBy:
type: string
@@ -22795,16 +22795,16 @@ components:
The syntax and semantics of CEL are documented at https://github.com/google/cel-spec
Supported filter:
- - name: the service account name, support "==" and ".matches()" operator.
- - email: the service account email, support "==" and ".matches()" operator.
+ - name: the service account name, support "==" and ".contains()" operator.
+ - email: the service account email, support "==" and ".contains()" operator.
- state: check State enum for values, support "==" operator.
For example:
name == "ed"
- name.matches("ed")
+ name.contains("ed")
state == "DELETED"
email == "[email protected]"
- email.matches("ed")
+ email.contains("ed")
title: ListServiceAccountsRequest
additionalProperties: false
description: Request message for listing service accounts.
@@ -22899,20 +22899,20 @@ components:
The syntax and semantics of CEL are documented at https://github.com/google/cel-spec
Supported filter:
- - name: the user name, support "==" and ".matches()" operator.
- - email: the user email, support "==" and ".matches()" operator.
+ - name: the user name, support "==" and ".contains()" operator.
+ - email: the user email, support "==" and ".contains()" operator.
- state: check State enum for values, support "==" operator.
- project: the project full name in "projects/{id}" format, support "==" operator.
For example:
name == "ed"
- name.matches("ed")
+ name.contains("ed")
email == "[email protected]"
- email.matches("ed")
+ email.contains("ed")
state == "DELETED"
project == "projects/sample-project"
You can combine filter conditions like:
- name.matches("ed") && project == "projects/sample-project"
+ name.contains("ed") && project == "projects/sample-project"
(name == "ed" || email == "[email protected]") && project == "projects/sample-project"
title: ListUsersRequest
additionalProperties: false
@@ -22972,16 +22972,16 @@ components:
The syntax and semantics of CEL are documented at https://github.com/google/cel-spec
Supported filter:
- - name: the workload identity name, support "==" and ".matches()" operator.
- - email: the workload identity email, support "==" and ".matches()" operator.
+ - name: the workload identity name, support "==" and ".contains()" operator.
+ - email: the workload identity email, support "==" and ".contains()" operator.
- state: check State enum for values, support "==" operator.
For example:
name == "ed"
- name.matches("ed")
+ name.contains("ed")
state == "DELETED"
email == "[email protected]"
- email.matches("ed")
+ email.contains("ed")
title: ListWorkloadIdentitiesRequest
additionalProperties: false
description: Request message for listing workload identities.
@@ -26122,25 +26122,25 @@ components:
The syntax and semantics of CEL are documented at https://github.com/google/cel-spec
Supported filters:
- - name: the project name, support "==" and ".matches()" operator.
- - resource_id: the project id, support "==" and ".matches()" operator.
+ - name: the project name, support "==" and ".contains()" operator.
+ - resource_id: the project id, support "==" and ".contains()" operator.
- exclude_default: if not include the default project, should be "true" or "false", support "==" operator.
- state: check the State enum for the values, support "==" operator.
- labels.{key}: the project label, support "==" and "in" operators.
For example:
name == "project name"
- name.matches("project name")
+ name.contains("project name")
resource_id == "project id"
- resource_id.matches("project id")
+ resource_id.contains("project id")
exclude_default == true
state == "DELETED"
labels.environment == "production"
labels.tier == "critical"
labels.environment in ["staging", "prod"]
You can combine filter conditions like:
- name == "project name" && resource_id.matches("project id")
- name.matches("project name") || resource_id == "project id"
+ name == "project name" && resource_id.contains("project id")
+ name.contains("project name") || resource_id == "project id"
labels.environment == "production" && labels.tier == "critical"
pageSize:
type: integer
@@ -26219,7 +26219,7 @@ components:
- database: the database full name in "instances/{id}/databases/{name}" format, support "==" operator.
- instance: the instance full name in "instances/{id}" format, support "==" operator.
- type: the type, should be "QUERY" or "EXPORT", support "==" operator.
- - statement: the SQL statement, support ".matches()" operator.
+ - statement: the SQL statement, support ".contains()" operator.
For example:
project == "projects/{project}"
@@ -26227,8 +26227,8 @@ components:
instance == "instances/{instance}"
type == "QUERY"
type == "EXPORT"
- statement.matches("select")
- type == "QUERY" && statement.matches("select")
+ statement.contains("select")
+ type == "QUERY" && statement.contains("select")
title: SearchQueryHistoriesRequest
additionalProperties: false
bytebase.v1.SearchQueryHistoriesResponse:
diff --git a/proto/gen/grpc-doc/v1/README.md b/proto/gen/grpc-doc/v1/README.md
index e3353c7183..7e7c87e870 100644
--- a/proto/gen/grpc-doc/v1/README.md
+++ b/proto/gen/grpc-doc/v1/README.md
@@ -3222,9 +3222,9 @@ When paginating, all other parameters provided to `ListUsers` must match the cal
| show_deleted | [bool](#bool) | | Show deleted users if specified. |
| filter | [string](#string) | | Filter is used to filter users returned in the list. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec
-Supported filter: - name: the user name, support &#34;==&#34; and &#34;.matches()&#34; operator. - email: the user email, support &#34;==&#34; and &#34;.matches()&#34; operator. - state: check State enum for values, support &#34;==&#34; operator. - project: the project full name in &#34;projects/{id}&#34; format, support &#34;==&#34; operator.
+Supported filter: - name: the user name, support &#34;==&#34; and &#34;.contains()&#34; operator. - email: the user email, support &#34;==&#34; and &#34;.contains()&#34; operator. - state: check State enum for values, support &#34;==&#34; operator. - project: the project full name in &#34;projects/{id}&#34; format, support &#34;==&#34; operator.
-For example: name == &#34;ed&#34; name.matches(&#34;ed&#34;) email == &#34;[email protected]&#34; email.matches(&#34;ed&#34;) state == &#34;DELETED&#34; project == &#34;projects/sample-project&#34; You can combine filter conditions like: name.matches(&#34;ed&#34;) &amp;&amp; project == &#34;projects/sample-project&#34; (name == &#34;ed&#34; || email == &#34;[email protected]&#34;) &amp;&amp; project == &#34;projects/sample-project&#34; |
+For example: name == &#34;ed&#34; name.contains(&#34;ed&#34;) email == &#34;[email protected]&#34; email.contains(&#34;ed&#34;) state == &#34;DELETED&#34; project == &#34;projects/sample-project&#34; You can combine filter conditions like: name.contains(&#34;ed&#34;) &amp;&amp; project == &#34;projects/sample-project&#34; (name == &#34;ed&#34; || email == &#34;[email protected]&#34;) &amp;&amp; project == &#34;projects/sample-project&#34; |
@@ -4619,9 +4619,9 @@ When paginating, all other parameters provided to `ListInstances` must match the
| show_deleted | [bool](#bool) | | Show deleted instances if specified. |
| filter | [string](#string) | | Filter the instance. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec
-Supported filters: - name: the instance name, support &#34;==&#34; and &#34;.matches()&#34; operator. - resource_id: the instance id, support &#34;==&#34; and &#34;.matches()&#34; operator. - environment: the environment full name in &#34;environments/{id}&#34; format, support &#34;==&#34; operator. - state: the instance state, check State enum for values, support &#34;==&#34; operator. - engine: the instance engine, check Engine enum for values. Support &#34;==&#34;, &#34;in [xx]&#34;, &#34;!(in [xx])&#34; operator. - host: the instance host, support &#34;==&#34; and &#34;.matches()&#34; operator. - port: the instance port, support &#34;==&#34; and &#34;.matches()&#34; operator. - project: the project full name in &#34;projects/{id}&#34; format, support &#34;==&#34; operator. - labels.{key}: the instance label, support &#34;==&#34; and &#34;in&#34; operators.
+Supported filters: - name: the instance name, support &#34;==&#34; and &#34;.contains()&#34; operator. - resource_id: the instance id, support &#34;==&#34; and &#34;.contains()&#34; operator. - environment: the environment full name in &#34;environments/{id}&#34; format, support &#34;==&#34; operator. - state: the instance state, check State enum for values, support &#34;==&#34; operator. - engine: the instance engine, check Engine enum for values. Support &#34;==&#34;, &#34;in [xx]&#34;, &#34;!(in [xx])&#34; operator. - host: the instance host, support &#34;==&#34; and &#34;.contains()&#34; operator. - port: the instance port, support &#34;==&#34; and &#34;.contains()&#34; operator. - project: the project full name in &#34;projects/{id}&#34; format, support &#34;==&#34; operator. - labels.{key}: the instance label, support &#34;==&#34; and &#34;in&#34; operators.
-For example: name == &#34;sample instance&#34; name.matches(&#34;sample&#34;) resource_id == &#34;sample-instance&#34; resource_id.matches(&#34;sample&#34;) state == &#34;DELETED&#34; environment == &#34;environments/test&#34; environment == &#34;&#34; (find instances which environment is not set) engine == &#34;MYSQL&#34; engine in [&#34;MYSQL&#34;, &#34;POSTGRES&#34;] !(engine in [&#34;MYSQL&#34;, &#34;POSTGRES&#34;]) host == &#34;127.0.0.1&#34; host.matches(&#34;127.0&#34;) port == &#34;54321&#34; port.matches(&#34;543&#34;) labels.org_group == &#34;infrastructure&#34; labels.environment in [&#34;prod&#34;, &#34;production&#34;] project == &#34;projects/sample-project&#34; You can combine filter conditions like: name.matches(&#34;sample&#34;) &amp;&amp; environment == &#34;environments/test&#34; host == &#34;127.0.0.1&#34; &amp;&amp; port == &#34;54321&#34; |
+For example: name == &#34;sample instance&#34; name.contains(&#34;sample&#34;) resource_id == &#34;sample-instance&#34; resource_id.contains(&#34;sample&#34;) state == &#34;DELETED&#34; environment == &#34;environments/test&#34; environment == &#34;&#34; (find instances which environment is not set) engine == &#34;MYSQL&#34; engine in [&#34;MYSQL&#34;, &#34;POSTGRES&#34;] !(engine in [&#34;MYSQL&#34;, &#34;POSTGRES&#34;]) host == &#34;127.0.0.1&#34; host.contains(&#34;127.0&#34;) port == &#34;54321&#34; port.contains(&#34;543&#34;) labels.org_group == &#34;infrastructure&#34; labels.environment in [&#34;prod&#34;, &#34;production&#34;] project == &#34;projects/sample-project&#34; You can combine filter conditions like: name.contains(&#34;sample&#34;) &amp;&amp; environment == &#34;environments/test&#34; host == &#34;127.0.0.1&#34; &amp;&amp; port == &#34;54321&#34; |
| order_by | [string](#string) | | The order by of instances. Support title, environment. The default sorting order is ascending. For example: - order_by = &#34;title&#34; - order_by = &#34;title desc&#34; - order_by = &#34;title desc, environment asc&#34; |
@@ -5424,9 +5424,9 @@ FunctionMetadata is the metadata for functions.
| name | [string](#string) | | The name of the database to retrieve metadata. Format: instances/{instance}/databases/{database}/metadata |
| filter | [string](#string) | | Filter is used to filter databases returned in the list. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec
-Supported filter: - schema: the schema name, support &#34;==&#34; operator. - table: the table name, support &#34;==&#34; and &#34;.matches()&#34; operator.
+Supported filter: - schema: the schema name, support &#34;==&#34; operator. - table: the table name, support &#34;==&#34; and &#34;.contains()&#34; operator.
-For example: schema == &#34;schema-a&#34; table == &#34;table-a&#34; table.matches(&#34;table-a&#34;) schema == &#34;schema-a&#34; &amp;&amp; table.matches(&#34;sample&#34;) The filter used to search table with wildcard &#34;sample&#34; in the schema &#34;schemas/schema-a&#34;. The column masking level will only be returned when a table filter is used. |
+For example: schema == &#34;schema-a&#34; table == &#34;table-a&#34; table.contains(&#34;table-a&#34;) schema == &#34;schema-a&#34; &amp;&amp; table.contains(&#34;sample&#34;) The filter is used to search for tables containing &#34;sample&#34; in the schema &#34;schemas/schema-a&#34;. The column masking level will only be returned when a table filter is used. |
| limit | [int32](#int32) | | Limit the response size of returned table metadata per schema. For example, if the database has 3 schemas, and each schema has 100 tables, if limit is 20, then only 20 tables will be returned for each schema, total 60 tables. Default 0, means no limit. |
@@ -5617,11 +5617,11 @@ Example: status == &#34;DONE&#34; status == &#34;FAILED&#34; &amp;&amp; type ==
When paginating, all other parameters provided to `ListDatabases` must match the call that provided the page token. |
| filter | [string](#string) | | Filter is used to filter databases returned in the list. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec
-Supported filter: - environment: the environment full name in &#34;environments/{id}&#34; format, support &#34;==&#34; operator. - name: the database name, support &#34;.matches()&#34; operator. - project: the project full name in &#34;projects/{id}&#34; format, support &#34;==&#34; operator. - instance: the instance full name in &#34;instances/{id}&#34; format, support &#34;==&#34; operator. - engine: the database engine, check Engine enum for values. Support &#34;==&#34;, &#34;in [xx]&#34;, &#34;!(in [xx])&#34; operator. - exclude_unassigned: should be &#34;true&#34; or &#34;false&#34;, will not show unassigned databases if it&#39;s true, support &#34;==&#34; operator. - table: filter by the database table, support &#34;==&#34; and &#34;.matches()&#34; operator. - labels.{key}: the database label, support &#34;==&#34; and &#34;in&#34; operators.
+Supported filter: - environment: the environment full name in &#34;environments/{id}&#34; format, support &#34;==&#34; operator. - name: the database name, support &#34;.contains()&#34; operator. - project: the project full name in &#34;projects/{id}&#34; format, support &#34;==&#34; operator. - instance: the instance full name in &#34;instances/{id}&#34; format, support &#34;==&#34; operator. - engine: the database engine, check Engine enum for values. Support &#34;==&#34;, &#34;in [xx]&#34;, &#34;!(in [xx])&#34; operator. - exclude_unassigned: should be &#34;true&#34; or &#34;false&#34;, will not show unassigned databases if it&#39;s true, support &#34;==&#34; operator. - table: filter by the database table, support &#34;==&#34; and &#34;.contains()&#34; operator. - labels.{key}: the database label, support &#34;==&#34; and &#34;in&#34; operators.
-For example: environment == &#34;environments/{environment resource id}&#34; environment == &#34;&#34; (find databases which environment is not set) project == &#34;projects/{project resource id}&#34; instance == &#34;instances/{instance resource id}&#34; name.matches(&#34;database name&#34;) engine == &#34;MYSQL&#34; engine in [&#34;MYSQL&#34;, &#34;POSTGRES&#34;] !(engine in [&#34;MYSQL&#34;, &#34;POSTGRES&#34;]) exclude_unassigned == true table == &#34;sample&#34; table.matches(&#34;sam&#34;) labels.environment == &#34;production&#34; labels.region == &#34;asia&#34; labels.region in [&#34;asia&#34;, &#34;europe&#34;]
+For example: environment == &#34;environments/{environment resource id}&#34; environment == &#34;&#34; (find databases which environment is not set) project == &#34;projects/{project resource id}&#34; instance == &#34;instances/{instance resource id}&#34; name.contains(&#34;database name&#34;) engine == &#34;MYSQL&#34; engine in [&#34;MYSQL&#34;, &#34;POSTGRES&#34;] !(engine in [&#34;MYSQL&#34;, &#34;POSTGRES&#34;]) exclude_unassigned == true table == &#34;sample&#34; table.contains(&#34;sam&#34;) labels.environment == &#34;production&#34; labels.region == &#34;asia&#34; labels.region in [&#34;asia&#34;, &#34;europe&#34;]
-You can combine filter conditions like: environment == &#34;environments/prod&#34; &amp;&amp; name.matches(&#34;employee&#34;) |
+You can combine filter conditions like: environment == &#34;environments/prod&#34; &amp;&amp; name.contains(&#34;employee&#34;) |
| show_deleted | [bool](#bool) | | Show deleted database if specified. |
| order_by | [string](#string) | | The order by of databases. Support name, project, instance. The default sorting order is ascending. For example: - order_by = &#34;name&#34; - order by name ascending - order_by = &#34;name desc&#34; - order_by = &#34;name desc, project asc&#34; |
@@ -6348,9 +6348,9 @@ Request message for listing groups.
When paginating, all other parameters provided to `ListGroups` must match the call that provided the page token. |
| filter | [string](#string) | | Filter is used to filter groups returned in the list. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec
-Supported filter: - title: the group title, support &#34;==&#34; and &#34;.matches()&#34; operator. - email: the group email, support &#34;==&#34; and &#34;.matches()&#34; operator. - project: the project full name in &#34;projects/{id}&#34; format, support &#34;==&#34; operator.
+Supported filter: - title: the group title, support &#34;==&#34; and &#34;.contains()&#34; operator. - email: the group email, support &#34;==&#34; and &#34;.contains()&#34; operator. - project: the project full name in &#34;projects/{id}&#34; format, support &#34;==&#34; operator.
-For example: title == &#34;dba&#34; email == &#34;[email protected]&#34; title.matches(&#34;dba&#34;) email.matches(&#34;dba&#34;) project == &#34;projects/sample-project&#34; You can combine filter conditions like: title.matches(&#34;dba&#34;) || email.matches(&#34;dba&#34;) |
+For example: title == &#34;dba&#34; email == &#34;[email protected]&#34; title.contains(&#34;dba&#34;) email.contains(&#34;dba&#34;) project == &#34;projects/sample-project&#34; You can combine filter conditions like: title.contains(&#34;dba&#34;) || email.contains(&#34;dba&#34;) |
@@ -8503,9 +8503,9 @@ Syntax error with position information for editor highlighting
| page_token | [string](#string) | | A page token, received from a previous `ListQueryHistory` call. Provide this to retrieve the subsequent page. |
| filter | [string](#string) | | Filter is the filter to apply on the search query history The syntax and semantics of CEL are documented at https://github.com/google/cel-spec
-Supported filter: - project: the project full name in &#34;projects/{id}&#34; format, support &#34;==&#34; operator. - database: the database full name in &#34;instances/{id}/databases/{name}&#34; format, support &#34;==&#34; operator. - instance: the instance full name in &#34;instances/{id}&#34; format, support &#34;==&#34; operator. - type: the type, should be &#34;QUERY&#34; or &#34;EXPORT&#34;, support &#34;==&#34; operator. - statement: the SQL statement, support &#34;.matches()&#34; operator.
+Supported filter: - project: the project full name in &#34;projects/{id}&#34; format, support &#34;==&#34; operator. - database: the database full name in &#34;instances/{id}/databases/{name}&#34; format, support &#34;==&#34; operator. - instance: the instance full name in &#34;instances/{id}&#34; format, support &#34;==&#34; operator. - type: the type, should be &#34;QUERY&#34; or &#34;EXPORT&#34;, support &#34;==&#34; operator. - statement: the SQL statement, support &#34;.contains()&#34; operator.
-For example: project == &#34;projects/{project}&#34; database == &#34;instances/{instance}/databases/{database}&#34; instance == &#34;instances/{instance}&#34; type == &#34;QUERY&#34; type == &#34;EXPORT&#34; statement.matches(&#34;select&#34;) type == &#34;QUERY&#34; &amp;&amp; statement.matches(&#34;select&#34;) |
+For example: project == &#34;projects/{project}&#34; database == &#34;instances/{instance}/databases/{database}&#34; instance == &#34;instances/{instance}&#34; type == &#34;QUERY&#34; type == &#34;EXPORT&#34; statement.contains(&#34;select&#34;) type == &#34;QUERY&#34; &amp;&amp; statement.contains(&#34;select&#34;) |
@@ -9362,9 +9362,9 @@ Execution retry policy configuration.
| show_deleted | [bool](#bool) | | Show deleted projects if specified. |
| filter | [string](#string) | | Filter the project. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec
-Supported filters: - name: the project name, support &#34;==&#34; and &#34;.matches()&#34; operator. - resource_id: the project id, support &#34;==&#34; and &#34;.matches()&#34; operator. - exclude_default: if not include the default project, should be &#34;true&#34; or &#34;false&#34;, support &#34;==&#34; operator. - state: check the State enum for the values, support &#34;==&#34; operator. - labels.{key}: the project label, support &#34;==&#34; and &#34;in&#34; operators.
+Supported filters: - name: the project name, support &#34;==&#34; and &#34;.contains()&#34; operator. - resource_id: the project id, support &#34;==&#34; and &#34;.contains()&#34; operator. - exclude_default: if not include the default project, should be &#34;true&#34; or &#34;false&#34;, support &#34;==&#34; operator. - state: check the State enum for the values, support &#34;==&#34; operator. - labels.{key}: the project label, support &#34;==&#34; and &#34;in&#34; operators.
-For example: name == &#34;project name&#34; name.matches(&#34;project name&#34;) resource_id == &#34;project id&#34; resource_id.matches(&#34;project id&#34;) exclude_default == true state == &#34;DELETED&#34; labels.environment == &#34;production&#34; labels.tier == &#34;critical&#34; labels.environment in [&#34;staging&#34;, &#34;prod&#34;] You can combine filter conditions like: name == &#34;project name&#34; &amp;&amp; resource_id.matches(&#34;project id&#34;) name.matches(&#34;project name&#34;) || resource_id == &#34;project id&#34; labels.environment == &#34;production&#34; &amp;&amp; labels.tier == &#34;critical&#34; |
+For example: name == &#34;project name&#34; name.contains(&#34;project name&#34;) resource_id == &#34;project id&#34; resource_id.contains(&#34;project id&#34;) exclude_default == true state == &#34;DELETED&#34; labels.environment == &#34;production&#34; labels.tier == &#34;critical&#34; labels.environment in [&#34;staging&#34;, &#34;prod&#34;] You can combine filter conditions like: name == &#34;project name&#34; &amp;&amp; resource_id.contains(&#34;project id&#34;) name.contains(&#34;project name&#34;) || resource_id == &#34;project id&#34; labels.environment == &#34;production&#34; &amp;&amp; labels.tier == &#34;critical&#34; |
| page_size | [int32](#int32) | | The maximum number of projects to return. The service may return fewer than this value. If unspecified, at most 10 projects will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000. |
| page_token | [string](#string) | | A page token, received from a previous `SearchProjects` call. Provide this to retrieve the subsequent page.
@@ -10642,9 +10642,9 @@ When paginating, all other parameters provided to `ListServiceAccounts` must mat
| show_deleted | [bool](#bool) | | Show deleted service accounts if specified. |
| filter | [string](#string) | | Filter is used to filter service accounts returned in the list. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec
-Supported filter: - name: the service account name, support &#34;==&#34; and &#34;.matches()&#34; operator. - email: the service account email, support &#34;==&#34; and &#34;.matches()&#34; operator. - state: check State enum for values, support &#34;==&#34; operator.
+Supported filter: - name: the service account name, support &#34;==&#34; and &#34;.contains()&#34; operator. - email: the service account email, support &#34;==&#34; and &#34;.contains()&#34; operator. - state: check State enum for values, support &#34;==&#34; operator.
-For example: name == &#34;ed&#34; name.matches(&#34;ed&#34;) state == &#34;DELETED&#34; email == &#34;[email protected]&#34; email.matches(&#34;ed&#34;) |
+For example: name == &#34;ed&#34; name.contains(&#34;ed&#34;) state == &#34;DELETED&#34; email == &#34;[email protected]&#34; email.contains(&#34;ed&#34;) |
@@ -11387,9 +11387,9 @@ When paginating, all other parameters provided to `ListWorkloadIdentities` must
| show_deleted | [bool](#bool) | | Show deleted workload identities if specified. |
| filter | [string](#string) | | Filter is used to filter workload identities returned in the list. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec
-Supported filter: - name: the workload identity name, support &#34;==&#34; and &#34;.matches()&#34; operator. - email: the workload identity email, support &#34;==&#34; and &#34;.matches()&#34; operator. - state: check State enum for values, support &#34;==&#34; operator.
+Supported filter: - name: the workload identity name, support &#34;==&#34; and &#34;.contains()&#34; operator. - email: the workload identity email, support &#34;==&#34; and &#34;.contains()&#34; operator. - state: check State enum for values, support &#34;==&#34; operator.
-For example: name == &#34;ed&#34; name.matches(&#34;ed&#34;) state == &#34;DELETED&#34; email == &#34;[email protected]&#34; email.matches(&#34;ed&#34;) |
+For example: name == &#34;ed&#34; name.contains(&#34;ed&#34;) state == &#34;DELETED&#34; email == &#34;[email protected]&#34; email.contains(&#34;ed&#34;) |
diff --git a/proto/gen/grpc-doc/v1/index.html b/proto/gen/grpc-doc/v1/index.html
index 08f65e673d..00619340d6 100644
--- a/proto/gen/grpc-doc/v1/index.html
+++ b/proto/gen/grpc-doc/v1/index.html
@@ -9510,20 +9510,20 @@ the call that provided the page token. </p></td>
The syntax and semantics of CEL are documented at https://github.com/google/cel-spec
Supported filter:
-- name: the user name, support &#34;==&#34; and &#34;.matches()&#34; operator.
-- email: the user email, support &#34;==&#34; and &#34;.matches()&#34; operator.
+- name: the user name, support &#34;==&#34; and &#34;.contains()&#34; operator.
+- email: the user email, support &#34;==&#34; and &#34;.contains()&#34; operator.
- state: check State enum for values, support &#34;==&#34; operator.
- project: the project full name in &#34;projects/{id}&#34; format, support &#34;==&#34; operator.
For example:
name == &#34;ed&#34;
-name.matches(&#34;ed&#34;)
+name.contains(&#34;ed&#34;)
email == &#34;[email protected]&#34;
-email.matches(&#34;ed&#34;)
+email.contains(&#34;ed&#34;)
state == &#34;DELETED&#34;
project == &#34;projects/sample-project&#34;
You can combine filter conditions like:
-name.matches(&#34;ed&#34;) &amp;&amp; project == &#34;projects/sample-project&#34;
+name.contains(&#34;ed&#34;) &amp;&amp; project == &#34;projects/sample-project&#34;
(name == &#34;ed&#34; || email == &#34;[email protected]&#34;) &amp;&amp; project == &#34;projects/sample-project&#34; </p></td>
</tr>
@@ -13197,21 +13197,21 @@ the call that provided the page token. </p></td>
The syntax and semantics of CEL are documented at https://github.com/google/cel-spec
Supported filters:
-- name: the instance name, support &#34;==&#34; and &#34;.matches()&#34; operator.
-- resource_id: the instance id, support &#34;==&#34; and &#34;.matches()&#34; operator.
+- name: the instance name, support &#34;==&#34; and &#34;.contains()&#34; operator.
+- resource_id: the instance id, support &#34;==&#34; and &#34;.contains()&#34; operator.
- environment: the environment full name in &#34;environments/{id}&#34; format, support &#34;==&#34; operator.
- state: the instance state, check State enum for values, support &#34;==&#34; operator.
- engine: the instance engine, check Engine enum for values. Support &#34;==&#34;, &#34;in [xx]&#34;, &#34;!(in [xx])&#34; operator.
-- host: the instance host, support &#34;==&#34; and &#34;.matches()&#34; operator.
-- port: the instance port, support &#34;==&#34; and &#34;.matches()&#34; operator.
+- host: the instance host, support &#34;==&#34; and &#34;.contains()&#34; operator.
+- port: the instance port, support &#34;==&#34; and &#34;.contains()&#34; operator.
- project: the project full name in &#34;projects/{id}&#34; format, support &#34;==&#34; operator.
- labels.{key}: the instance label, support &#34;==&#34; and &#34;in&#34; operators.
For example:
name == &#34;sample instance&#34;
-name.matches(&#34;sample&#34;)
+name.contains(&#34;sample&#34;)
resource_id == &#34;sample-instance&#34;
-resource_id.matches(&#34;sample&#34;)
+resource_id.contains(&#34;sample&#34;)
state == &#34;DELETED&#34;
environment == &#34;environments/test&#34;
environment == &#34;&#34; (find instances which environment is not set)
@@ -13219,14 +13219,14 @@ engine == &#34;MYSQL&#34;
engine in [&#34;MYSQL&#34;, &#34;POSTGRES&#34;]
!(engine in [&#34;MYSQL&#34;, &#34;POSTGRES&#34;])
host == &#34;127.0.0.1&#34;
-host.matches(&#34;127.0&#34;)
+host.contains(&#34;127.0&#34;)
port == &#34;54321&#34;
-port.matches(&#34;543&#34;)
+port.contains(&#34;543&#34;)
labels.org_group == &#34;infrastructure&#34;
labels.environment in [&#34;prod&#34;, &#34;production&#34;]
project == &#34;projects/sample-project&#34;
You can combine filter conditions like:
-name.matches(&#34;sample&#34;) &amp;&amp; environment == &#34;environments/test&#34;
+name.contains(&#34;sample&#34;) &amp;&amp; environment == &#34;environments/test&#34;
host == &#34;127.0.0.1&#34; &amp;&amp; port == &#34;54321&#34; </p></td>
</tr>
@@ -15408,14 +15408,14 @@ The syntax and semantics of CEL are documented at https://github.com/google/cel-
Supported filter:
- schema: the schema name, support &#34;==&#34; operator.
-- table: the table name, support &#34;==&#34; and &#34;.matches()&#34; operator.
+- table: the table name, support &#34;==&#34; and &#34;.contains()&#34; operator.
For example:
schema == &#34;schema-a&#34;
table == &#34;table-a&#34;
-table.matches(&#34;table-a&#34;)
-schema == &#34;schema-a&#34; &amp;&amp; table.matches(&#34;sample&#34;)
-The filter used to search table with wildcard &#34;sample&#34; in the schema &#34;schemas/schema-a&#34;.
+table.contains(&#34;table-a&#34;)
+schema == &#34;schema-a&#34; &amp;&amp; table.contains(&#34;sample&#34;)
+The filter is used to search for tables containing &#34;sample&#34; in the schema &#34;schemas/schema-a&#34;.
The column masking level will only be returned when a table filter is used. </p></td>
</tr>
@@ -15917,12 +15917,12 @@ The syntax and semantics of CEL are documented at https://github.com/google/cel-
Supported filter:
- environment: the environment full name in &#34;environments/{id}&#34; format, support &#34;==&#34; operator.
-- name: the database name, support &#34;.matches()&#34; operator.
+- name: the database name, support &#34;.contains()&#34; operator.
- project: the project full name in &#34;projects/{id}&#34; format, support &#34;==&#34; operator.
- instance: the instance full name in &#34;instances/{id}&#34; format, support &#34;==&#34; operator.
- engine: the database engine, check Engine enum for values. Support &#34;==&#34;, &#34;in [xx]&#34;, &#34;!(in [xx])&#34; operator.
- exclude_unassigned: should be &#34;true&#34; or &#34;false&#34;, will not show unassigned databases if it&#39;s true, support &#34;==&#34; operator.
-- table: filter by the database table, support &#34;==&#34; and &#34;.matches()&#34; operator.
+- table: filter by the database table, support &#34;==&#34; and &#34;.contains()&#34; operator.
- labels.{key}: the database label, support &#34;==&#34; and &#34;in&#34; operators.
For example:
@@ -15930,19 +15930,19 @@ environment == &#34;environments/{environment resource id}&#34;
environment == &#34;&#34; (find databases which environment is not set)
project == &#34;projects/{project resource id}&#34;
instance == &#34;instances/{instance resource id}&#34;
-name.matches(&#34;database name&#34;)
+name.contains(&#34;database name&#34;)
engine == &#34;MYSQL&#34;
engine in [&#34;MYSQL&#34;, &#34;POSTGRES&#34;]
!(engine in [&#34;MYSQL&#34;, &#34;POSTGRES&#34;])
exclude_unassigned == true
table == &#34;sample&#34;
-table.matches(&#34;sam&#34;)
+table.contains(&#34;sam&#34;)
labels.environment == &#34;production&#34;
labels.region == &#34;asia&#34;
labels.region in [&#34;asia&#34;, &#34;europe&#34;]
You can combine filter conditions like:
-environment == &#34;environments/prod&#34; &amp;&amp; name.matches(&#34;employee&#34;) </p></td>
+environment == &#34;environments/prod&#34; &amp;&amp; name.contains(&#34;employee&#34;) </p></td>
</tr>
<tr>
@@ -18253,18 +18253,18 @@ the call that provided the page token. </p></td>
The syntax and semantics of CEL are documented at https://github.com/google/cel-spec
Supported filter:
-- title: the group title, support &#34;==&#34; and &#34;.matches()&#34; operator.
-- email: the group email, support &#34;==&#34; and &#34;.matches()&#34; operator.
+- title: the group title, support &#34;==&#34; and &#34;.contains()&#34; operator.
+- email: the group email, support &#34;==&#34; and &#34;.contains()&#34; operator.
- project: the project full name in &#34;projects/{id}&#34; format, support &#34;==&#34; operator.
For example:
title == &#34;dba&#34;
email == &#34;[email protected]&#34;
-title.matches(&#34;dba&#34;)
-email.matches(&#34;dba&#34;)
+title.contains(&#34;dba&#34;)
+email.contains(&#34;dba&#34;)
project == &#34;projects/sample-project&#34;
You can combine filter conditions like:
-title.matches(&#34;dba&#34;) || email.matches(&#34;dba&#34;) </p></td>
+title.contains(&#34;dba&#34;) || email.contains(&#34;dba&#34;) </p></td>
</tr>
</tbody>
@@ -23977,7 +23977,7 @@ Supported filter:
- database: the database full name in &#34;instances/{id}/databases/{name}&#34; format, support &#34;==&#34; operator.
- instance: the instance full name in &#34;instances/{id}&#34; format, support &#34;==&#34; operator.
- type: the type, should be &#34;QUERY&#34; or &#34;EXPORT&#34;, support &#34;==&#34; operator.
-- statement: the SQL statement, support &#34;.matches()&#34; operator.
+- statement: the SQL statement, support &#34;.contains()&#34; operator.
For example:
project == &#34;projects/{project}&#34;
@@ -23985,8 +23985,8 @@ database == &#34;instances/{instance}/databases/{database}&#34;
instance == &#34;instances/{instance}&#34;
type == &#34;QUERY&#34;
type == &#34;EXPORT&#34;
-statement.matches(&#34;select&#34;)
-type == &#34;QUERY&#34; &amp;&amp; statement.matches(&#34;select&#34;) </p></td>
+statement.contains(&#34;select&#34;)
+type == &#34;QUERY&#34; &amp;&amp; statement.contains(&#34;select&#34;) </p></td>
</tr>
</tbody>
@@ -26221,25 +26221,25 @@ If enabled, issues cannot be created when SQL review finds errors. </p></td>
The syntax and semantics of CEL are documented at https://github.com/google/cel-spec
Supported filters:
-- name: the project name, support &#34;==&#34; and &#34;.matches()&#34; operator.
-- resource_id: the project id, support &#34;==&#34; and &#34;.matches()&#34; operator.
+- name: the project name, support &#34;==&#34; and &#34;.contains()&#34; operator.
+- resource_id: the project id, support &#34;==&#34; and &#34;.contains()&#34; operator.
- exclude_default: if not include the default project, should be &#34;true&#34; or &#34;false&#34;, support &#34;==&#34; operator.
- state: check the State enum for the values, support &#34;==&#34; operator.
- labels.{key}: the project label, support &#34;==&#34; and &#34;in&#34; operators.
For example:
name == &#34;project name&#34;
-name.matches(&#34;project name&#34;)
+name.contains(&#34;project name&#34;)
resource_id == &#34;project id&#34;
-resource_id.matches(&#34;project id&#34;)
+resource_id.contains(&#34;project id&#34;)
exclude_default == true
state == &#34;DELETED&#34;
labels.environment == &#34;production&#34;
labels.tier == &#34;critical&#34;
labels.environment in [&#34;staging&#34;, &#34;prod&#34;]
You can combine filter conditions like:
-name == &#34;project name&#34; &amp;&amp; resource_id.matches(&#34;project id&#34;)
-name.matches(&#34;project name&#34;) || resource_id == &#34;project id&#34;
+name == &#34;project name&#34; &amp;&amp; resource_id.contains(&#34;project id&#34;)
+name.contains(&#34;project name&#34;) || resource_id == &#34;project id&#34;
labels.environment == &#34;production&#34; &amp;&amp; labels.tier == &#34;critical&#34; </p></td>
</tr>
@@ -30000,16 +30000,16 @@ the call that provided the page token. </p></td>
The syntax and semantics of CEL are documented at https://github.com/google/cel-spec
Supported filter:
-- name: the service account name, support &#34;==&#34; and &#34;.matches()&#34; operator.
-- email: the service account email, support &#34;==&#34; and &#34;.matches()&#34; operator.
+- name: the service account name, support &#34;==&#34; and &#34;.contains()&#34; operator.
+- email: the service account email, support &#34;==&#34; and &#34;.contains()&#34; operator.
- state: check State enum for values, support &#34;==&#34; operator.
For example:
name == &#34;ed&#34;
-name.matches(&#34;ed&#34;)
+name.contains(&#34;ed&#34;)
state == &#34;DELETED&#34;
email == &#34;[email protected]&#34;
-email.matches(&#34;ed&#34;) </p></td>
+email.contains(&#34;ed&#34;) </p></td>
</tr>
</tbody>
@@ -32108,16 +32108,16 @@ the call that provided the page token. </p></td>
The syntax and semantics of CEL are documented at https://github.com/google/cel-spec
Supported filter:
-- name: the workload identity name, support &#34;==&#34; and &#34;.matches()&#34; operator.
-- email: the workload identity email, support &#34;==&#34; and &#34;.matches()&#34; operator.
+- name: the workload identity name, support &#34;==&#34; and &#34;.contains()&#34; operator.
+- email: the workload identity email, support &#34;==&#34; and &#34;.contains()&#34; operator.
- state: check State enum for values, support &#34;==&#34; operator.
For example:
name == &#34;ed&#34;
-name.matches(&#34;ed&#34;)
+name.contains(&#34;ed&#34;)
state == &#34;DELETED&#34;
email == &#34;[email protected]&#34;
-email.matches(&#34;ed&#34;) </p></td>
+email.contains(&#34;ed&#34;) </p></td>
</tr>
</tbody>
diff --git a/proto/v1/v1/database_service.proto b/proto/v1/v1/database_service.proto
index ee03f5600e..799d54acbf 100644
--- a/proto/v1/v1/database_service.proto
+++ b/proto/v1/v1/database_service.proto
@@ -225,12 +225,12 @@ message ListDatabasesRequest {
//
// Supported filter:
// - environment: the environment full name in "environments/{id}" format, support "==" operator.
- // - name: the database name, support ".matches()" operator.
+ // - name: the database name, support ".contains()" operator.
// - project: the project full name in "projects/{id}" format, support "==" operator.
// - instance: the instance full name in "instances/{id}" format, support "==" operator.
// - engine: the database engine, check Engine enum for values. Support "==", "in [xx]", "!(in [xx])" operator.
// - exclude_unassigned: should be "true" or "false", will not show unassigned databases if it's true, support "==" operator.
- // - table: filter by the database table, support "==" and ".matches()" operator.
+ // - table: filter by the database table, support "==" and ".contains()" operator.
// - labels.{key}: the database label, support "==" and "in" operators.
//
// For example:
@@ -238,19 +238,19 @@ message ListDatabasesRequest {
// environment == "" (find databases which environment is not set)
// project == "projects/{project resource id}"
// instance == "instances/{instance resource id}"
- // name.matches("database name")
+ // name.contains("database name")
// engine == "MYSQL"
// engine in ["MYSQL", "POSTGRES"]
// !(engine in ["MYSQL", "POSTGRES"])
// exclude_unassigned == true
// table == "sample"
- // table.matches("sam")
+ // table.contains("sam")
// labels.environment == "production"
// labels.region == "asia"
// labels.region in ["asia", "europe"]
//
// You can combine filter conditions like:
- // environment == "environments/prod" && name.matches("employee")
+ // environment == "environments/prod" && name.contains("employee")
string filter = 4;
// Show deleted database if specified.
@@ -345,14 +345,14 @@ message GetDatabaseMetadataRequest {
//
// Supported filter:
// - schema: the schema name, support "==" operator.
- // - table: the table name, support "==" and ".matches()" operator.
+ // - table: the table name, support "==" and ".contains()" operator.
//
// For example:
// schema == "schema-a"
// table == "table-a"
- // table.matches("table-a")
- // schema == "schema-a" && table.matches("sample")
- // The filter used to search table with wildcard "sample" in the schema "schemas/schema-a".
+ // table.contains("table-a")
+ // schema == "schema-a" && table.contains("sample")
+ // The filter is used to search for tables containing "sample" in the schema "schemas/schema-a".
// The column masking level will only be returned when a table filter is used.
string filter = 2;
diff --git a/proto/v1/v1/group_service.proto b/proto/v1/v1/group_service.proto
index d7d6abacb7..1c1458801b 100644
--- a/proto/v1/v1/group_service.proto
+++ b/proto/v1/v1/group_service.proto
@@ -126,18 +126,18 @@ message ListGroupsRequest {
// The syntax and semantics of CEL are documented at https://github.com/google/cel-spec
//
// Supported filter:
- // - title: the group title, support "==" and ".matches()" operator.
- // - email: the group email, support "==" and ".matches()" operator.
+ // - title: the group title, support "==" and ".contains()" operator.
+ // - email: the group email, support "==" and ".contains()" operator.
// - project: the project full name in "projects/{id}" format, support "==" operator.
//
// For example:
// title == "dba"
// email == "[email protected]"
- // title.matches("dba")
- // email.matches("dba")
+ // title.contains("dba")
+ // email.contains("dba")
// project == "projects/sample-project"
// You can combine filter conditions like:
- // title.matches("dba") || email.matches("dba")
+ // title.contains("dba") || email.contains("dba")
string filter = 3;
}
diff --git a/proto/v1/v1/instance_service.proto b/proto/v1/v1/instance_service.proto
index 02b0827379..b2751131a0 100644
--- a/proto/v1/v1/instance_service.proto
+++ b/proto/v1/v1/instance_service.proto
@@ -198,21 +198,21 @@ message ListInstancesRequest {
// The syntax and semantics of CEL are documented at https://github.com/google/cel-spec
//
// Supported filters:
- // - name: the instance name, support "==" and ".matches()" operator.
- // - resource_id: the instance id, support "==" and ".matches()" operator.
+ // - name: the instance name, support "==" and ".contains()" operator.
+ // - resource_id: the instance id, support "==" and ".contains()" operator.
// - environment: the environment full name in "environments/{id}" format, support "==" operator.
// - state: the instance state, check State enum for values, support "==" operator.
// - engine: the instance engine, check Engine enum for values. Support "==", "in [xx]", "!(in [xx])" operator.
- // - host: the instance host, support "==" and ".matches()" operator.
- // - port: the instance port, support "==" and ".matches()" operator.
+ // - host: the instance host, support "==" and ".contains()" operator.
+ // - port: the instance port, support "==" and ".contains()" operator.
// - project: the project full name in "projects/{id}" format, support "==" operator.
// - labels.{key}: the instance label, support "==" and "in" operators.
//
// For example:
// name == "sample instance"
- // name.matches("sample")
+ // name.contains("sample")
// resource_id == "sample-instance"
- // resource_id.matches("sample")
+ // resource_id.contains("sample")
// state == "DELETED"
// environment == "environments/test"
// environment == "" (find instances which environment is not set)
@@ -220,14 +220,14 @@ message ListInstancesRequest {
// engine in ["MYSQL", "POSTGRES"]
// !(engine in ["MYSQL", "POSTGRES"])
// host == "127.0.0.1"
- // host.matches("127.0")
+ // host.contains("127.0")
// port == "54321"
- // port.matches("543")
+ // port.contains("543")
// labels.org_group == "infrastructure"
// labels.environment in ["prod", "production"]
// project == "projects/sample-project"
// You can combine filter conditions like:
- // name.matches("sample") && environment == "environments/test"
+ // name.contains("sample") && environment == "environments/test"
// host == "127.0.0.1" && port == "54321"
string filter = 4;
diff --git a/proto/v1/v1/project_service.proto b/proto/v1/v1/project_service.proto
index f10e975727..08325f9c4b 100644
--- a/proto/v1/v1/project_service.proto
+++ b/proto/v1/v1/project_service.proto
@@ -251,25 +251,25 @@ message SearchProjectsRequest {
// The syntax and semantics of CEL are documented at https://github.com/google/cel-spec
//
// Supported filters:
- // - name: the project name, support "==" and ".matches()" operator.
- // - resource_id: the project id, support "==" and ".matches()" operator.
+ // - name: the project name, support "==" and ".contains()" operator.
+ // - resource_id: the project id, support "==" and ".contains()" operator.
// - exclude_default: if not include the default project, should be "true" or "false", support "==" operator.
// - state: check the State enum for the values, support "==" operator.
// - labels.{key}: the project label, support "==" and "in" operators.
//
// For example:
// name == "project name"
- // name.matches("project name")
+ // name.contains("project name")
// resource_id == "project id"
- // resource_id.matches("project id")
+ // resource_id.contains("project id")
// exclude_default == true
// state == "DELETED"
// labels.environment == "production"
// labels.tier == "critical"
// labels.environment in ["staging", "prod"]
// You can combine filter conditions like:
- // name == "project name" && resource_id.matches("project id")
- // name.matches("project name") || resource_id == "project id"
+ // name == "project name" && resource_id.contains("project id")
+ // name.contains("project name") || resource_id == "project id"
// labels.environment == "production" && labels.tier == "critical"
string filter = 2;
diff --git a/proto/v1/v1/service_account_service.proto b/proto/v1/v1/service_account_service.proto
index ce6362006f..7ecbf3afa2 100644
--- a/proto/v1/v1/service_account_service.proto
+++ b/proto/v1/v1/service_account_service.proto
@@ -173,16 +173,16 @@ message ListServiceAccountsRequest {
// The syntax and semantics of CEL are documented at https://github.com/google/cel-spec
//
// Supported filter:
- // - name: the service account name, support "==" and ".matches()" operator.
- // - email: the service account email, support "==" and ".matches()" operator.
+ // - name: the service account name, support "==" and ".contains()" operator.
+ // - email: the service account email, support "==" and ".contains()" operator.
// - state: check State enum for values, support "==" operator.
//
// For example:
// name == "ed"
- // name.matches("ed")
+ // name.contains("ed")
// state == "DELETED"
// email == "[email protected]"
- // email.matches("ed")
+ // email.contains("ed")
string filter = 5;
}
diff --git a/proto/v1/v1/sql_service.proto b/proto/v1/v1/sql_service.proto
index dd791b8f41..33a7eae2b7 100644
--- a/proto/v1/v1/sql_service.proto
+++ b/proto/v1/v1/sql_service.proto
@@ -478,7 +478,7 @@ message SearchQueryHistoriesRequest {
// - database: the database full name in "instances/{id}/databases/{name}" format, support "==" operator.
// - instance: the instance full name in "instances/{id}" format, support "==" operator.
// - type: the type, should be "QUERY" or "EXPORT", support "==" operator.
- // - statement: the SQL statement, support ".matches()" operator.
+ // - statement: the SQL statement, support ".contains()" operator.
//
// For example:
// project == "projects/{project}"
@@ -486,8 +486,8 @@ message SearchQueryHistoriesRequest {
// instance == "instances/{instance}"
// type == "QUERY"
// type == "EXPORT"
- // statement.matches("select")
- // type == "QUERY" && statement.matches("select")
+ // statement.contains("select")
+ // type == "QUERY" && statement.contains("select")
string filter = 3;
}
diff --git a/proto/v1/v1/user_service.proto b/proto/v1/v1/user_service.proto
index 9895dfb5e1..a5a5d78ef1 100644
--- a/proto/v1/v1/user_service.proto
+++ b/proto/v1/v1/user_service.proto
@@ -159,20 +159,20 @@ message ListUsersRequest {
// The syntax and semantics of CEL are documented at https://github.com/google/cel-spec
//
// Supported filter:
- // - name: the user name, support "==" and ".matches()" operator.
- // - email: the user email, support "==" and ".matches()" operator.
+ // - name: the user name, support "==" and ".contains()" operator.
+ // - email: the user email, support "==" and ".contains()" operator.
// - state: check State enum for values, support "==" operator.
// - project: the project full name in "projects/{id}" format, support "==" operator.
//
// For example:
// name == "ed"
- // name.matches("ed")
+ // name.contains("ed")
// email == "[email protected]"
- // email.matches("ed")
+ // email.contains("ed")
// state == "DELETED"
// project == "projects/sample-project"
// You can combine filter conditions like:
- // name.matches("ed") && project == "projects/sample-project"
+ // name.contains("ed") && project == "projects/sample-project"
// (name == "ed" || email == "[email protected]") && project == "projects/sample-project"
string filter = 4;
}
diff --git a/proto/v1/v1/workload_identity_service.proto b/proto/v1/v1/workload_identity_service.proto
index 2b06d0ec6f..67dd014396 100644
--- a/proto/v1/v1/workload_identity_service.proto
+++ b/proto/v1/v1/workload_identity_service.proto
@@ -192,16 +192,16 @@ message ListWorkloadIdentitiesRequest {
// The syntax and semantics of CEL are documented at https://github.com/google/cel-spec
//
// Supported filter:
- // - name: the workload identity name, support "==" and ".matches()" operator.
- // - email: the workload identity email, support "==" and ".matches()" operator.
+ // - name: the workload identity name, support "==" and ".contains()" operator.
+ // - email: the workload identity email, support "==" and ".contains()" operator.
// - state: check State enum for values, support "==" operator.
//
// For example:
// name == "ed"
- // name.matches("ed")
+ // name.contains("ed")
// state == "DELETED"
// email == "[email protected]"
- // email.matches("ed")
+ // email.contains("ed")
string filter = 5;
}