Database governance built for humans and agents — controlling changes and access across every major database.
Go cicddata-governancedata-maskingdata-securitydatabase-accessdatabase-governancedevopsdevsecopsflywaygitopsliquibasemongodbmysqloraclepostgresqlschema-migrationssecuritysql-clientsqlservertidb
fix(filter): use contains for substring search (#19842)
p0ny2506db422857
diff --git a/backend/api/mcp/gen/openapi.yaml b/backend/api/mcp/gen/openapi.yamlindex 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 == truetable == "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: booleantitle: show_deleted@@ -12774,18 +12774,18 @@ components:The syntax and semantics of CEL are documented at https://github.com/google/cel-specSupported 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: ListGroupsRequestadditionalProperties: falsedescription: Request message for listing groups.@@ -12935,21 +12935,21 @@ components:The syntax and semantics of CEL are documented at https://github.com/google/cel-specSupported 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-specSupported 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: ListServiceAccountsRequestadditionalProperties: falsedescription: 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-specSupported 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: ListUsersRequestadditionalProperties: false@@ -13734,16 +13734,16 @@ components:The syntax and semantics of CEL are documented at https://github.com/google/cel-specSupported 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: ListWorkloadIdentitiesRequestadditionalProperties: falsedescription: 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-specSupported 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 == truestate == "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: SearchQueryHistoriesRequestadditionalProperties: falsebytebase.v1.SearchQueryHistoriesResponse:diff --git a/backend/api/mcp/skills/query.md b/backend/api/mcp/skills/query.mdindex 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.goindex 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.goindex 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]anyfor _, 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.goindex 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.goindex 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.goindex 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.goindex 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.UnknownFieldssizeCache protoimpl.SizeCachediff --git a/backend/generated-go/v1/instance_service.pb.go b/backend/generated-go/v1/instance_service.pb.goindex 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.goindex 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 thandiff --git a/backend/generated-go/v1/service_account_service.pb.go b/backend/generated-go/v1/service_account_service.pb.goindex 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.UnknownFieldssizeCache protoimpl.SizeCachediff --git a/backend/generated-go/v1/sql_service.pb.go b/backend/generated-go/v1/sql_service.pb.goindex 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.UnknownFieldssizeCache protoimpl.SizeCachediff --git a/backend/generated-go/v1/user_service.pb.go b/backend/generated-go/v1/user_service.pb.goindex 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.UnknownFieldsdiff --git a/backend/generated-go/v1/workload_identity_service.pb.go b/backend/generated-go/v1/workload_identity_service.pb.goindex 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.UnknownFieldssizeCache protoimpl.SizeCachediff --git a/backend/store/access_grant.go b/backend/store/access_grant.goindex 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.gonew file mode 100644index 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.goindex 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.goindex 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.goindex 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 tWHERE t->>'name' LIKE ?)`, "%"+strValue+"%"), nildefault:- 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.goindex 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, errorcase 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.goindex 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.goindex 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.gonew file mode 100644index 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.goindex 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.goindex 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.goindex 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.goindex 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.vueindex 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.tsindex 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.tsindex 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.tsindex 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.tsindex 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.tsindex 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.tsindex 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.tsindex 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.tsindex 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.tsindex 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.tsindex 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 searchconst 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.tsindex 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.tsindex 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.tsindex 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.tsindex 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.tsindex 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.tsindex 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.tsindex 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.tsindex 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.yamlindex 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-specSupported 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: stringtitle: filter@@ -765,18 +765,18 @@ paths:The syntax and semantics of CEL are documented at https://github.com/google/cel-specSupported 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-specSupported 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-specSupported 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: orderByin: 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 == truetable == "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: stringtitle: 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 == truetable == "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: showDeletedin: querydescription: 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: limitin: 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 == truetable == "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: stringtitle: 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 == truetable == "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: showDeletedin: querydescription: Show deleted database if specified.@@ -11202,16 +11202,16 @@ paths:The syntax and semantics of CEL are documented at https://github.com/google/cel-specSupported 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: stringtitle: filter@@ -11220,16 +11220,16 @@ paths:The syntax and semantics of CEL are documented at https://github.com/google/cel-specSupported 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-specSupported 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: stringtitle: filter@@ -11767,16 +11767,16 @@ paths:The syntax and semantics of CEL are documented at https://github.com/google/cel-specSupported 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-specSupported 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-specSupported 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 == truetable == "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: stringtitle: 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 == truetable == "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: showDeletedin: querydescription: Show deleted database if specified.@@ -15858,16 +15858,16 @@ paths:The syntax and semantics of CEL are documented at https://github.com/google/cel-specSupported 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: stringtitle: filter@@ -15876,16 +15876,16 @@ paths:The syntax and semantics of CEL are documented at https://github.com/google/cel-specSupported 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-specSupported 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: stringtitle: filter@@ -16020,16 +16020,16 @@ paths:The syntax and semantics of CEL are documented at https://github.com/google/cel-specSupported 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 == truetable == "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: booleantitle: show_deleted@@ -21989,18 +21989,18 @@ components:The syntax and semantics of CEL are documented at https://github.com/google/cel-specSupported 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: ListGroupsRequestadditionalProperties: falsedescription: Request message for listing groups.@@ -22155,21 +22155,21 @@ components:The syntax and semantics of CEL are documented at https://github.com/google/cel-specSupported 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-specSupported 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: ListServiceAccountsRequestadditionalProperties: falsedescription: 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-specSupported 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: ListUsersRequestadditionalProperties: false@@ -22972,16 +22972,16 @@ components:The syntax and semantics of CEL are documented at https://github.com/google/cel-specSupported 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: ListWorkloadIdentitiesRequestadditionalProperties: falsedescription: 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-specSupported 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 == truestate == "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: SearchQueryHistoriesRequestadditionalProperties: falsebytebase.v1.SearchQueryHistoriesResponse:diff --git a/proto/gen/grpc-doc/v1/README.md b/proto/gen/grpc-doc/v1/README.mdindex 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 "==" and ".matches()" operator. - email: the user email, support "==" and ".matches()" operator. - state: check State enum for values, support "==" operator. - project: the project full name in "projects/{id}" format, support "==" operator.+Supported filter: - 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") email == "[email protected]" email.matches("ed") state == "DELETED" project == "projects/sample-project" You can combine filter conditions like: name.matches("ed") && project == "projects/sample-project" (name == "ed" || email == "[email protected]") && project == "projects/sample-project" |+For example: name == "ed" name.contains("ed") email == "[email protected]" email.contains("ed") state == "DELETED" project == "projects/sample-project" You can combine filter conditions like: name.contains("ed") && project == "projects/sample-project" (name == "ed" || email == "[email protected]") && project == "projects/sample-project" |@@ -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 "==" and ".matches()" operator. - resource_id: the instance id, support "==" and ".matches()" 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. - project: the project full name in "projects/{id}" format, support "==" operator. - labels.{key}: the instance label, support "==" and "in" operators.+Supported filters: - 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 ".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") resource_id == "sample-instance" resource_id.matches("sample") state == "DELETED" environment == "environments/test" environment == "" (find instances which environment is not set) engine == "MYSQL" engine in ["MYSQL", "POSTGRES"] !(engine in ["MYSQL", "POSTGRES"]) host == "127.0.0.1" host.matches("127.0") port == "54321" port.matches("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" host == "127.0.0.1" && port == "54321" |+For example: name == "sample instance" name.contains("sample") resource_id == "sample-instance" resource_id.contains("sample") state == "DELETED" environment == "environments/test" environment == "" (find instances which environment is not set) engine == "MYSQL" engine in ["MYSQL", "POSTGRES"] !(engine in ["MYSQL", "POSTGRES"]) host == "127.0.0.1" host.contains("127.0") port == "54321" port.contains("543") labels.org_group == "infrastructure" labels.environment in ["prod", "production"] project == "projects/sample-project" You can combine filter conditions like: name.contains("sample") && environment == "environments/test" host == "127.0.0.1" && port == "54321" || order_by | [string](#string) | | The order by of instances. Support title, environment. The default sorting order is ascending. For example: - order_by = "title" - order_by = "title desc" - order_by = "title desc, environment asc" |@@ -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 "==" operator. - table: the table name, support "==" and ".matches()" operator.+Supported filter: - schema: the schema name, support "==" 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". The column masking level will only be returned when a table filter is used. |+For example: schema == "schema-a" table == "table-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 | [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 == "DONE" status == "FAILED" && 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 "environments/{id}" format, support "==" operator. - name: the database name, support ".matches()" 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. - labels.{key}: the database label, support "==" and "in" operators.+Supported filter: - environment: the environment full name in "environments/{id}" format, support "==" 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 ".contains()" operator. - labels.{key}: the database label, support "==" and "in" operators.-For example: environment == "environments/{environment resource id}" environment == "" (find databases which environment is not set) project == "projects/{project resource id}" instance == "instances/{instance resource id}" name.matches("database name") engine == "MYSQL" engine in ["MYSQL", "POSTGRES"] !(engine in ["MYSQL", "POSTGRES"]) exclude_unassigned == true table == "sample" table.matches("sam") labels.environment == "production" labels.region == "asia" labels.region in ["asia", "europe"]+For example: environment == "environments/{environment resource id}" environment == "" (find databases which environment is not set) project == "projects/{project resource id}" instance == "instances/{instance resource id}" name.contains("database name") engine == "MYSQL" engine in ["MYSQL", "POSTGRES"] !(engine in ["MYSQL", "POSTGRES"]) exclude_unassigned == true table == "sample" 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") |+You can combine filter conditions like: environment == "environments/prod" && name.contains("employee") || 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 = "name" - order by name ascending - order_by = "name desc" - order_by = "name desc, project asc" |@@ -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 "==" and ".matches()" operator. - email: the group email, support "==" and ".matches()" operator. - project: the project full name in "projects/{id}" format, support "==" operator.+Supported filter: - 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") project == "projects/sample-project" You can combine filter conditions like: title.matches("dba") || email.matches("dba") |+For example: title == "dba" email == "[email protected]" title.contains("dba") email.contains("dba") project == "projects/sample-project" You can combine filter conditions like: title.contains("dba") || email.contains("dba") |@@ -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 "projects/{id}" format, support "==" operator. - 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.+Supported filter: - project: the project full name in "projects/{id}" format, support "==" operator. - 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 ".contains()" operator.-For example: project == "projects/{project}" database == "instances/{instance}/databases/{database}" instance == "instances/{instance}" type == "QUERY" type == "EXPORT" statement.matches("select") type == "QUERY" && statement.matches("select") |+For example: project == "projects/{project}" database == "instances/{instance}/databases/{database}" instance == "instances/{instance}" type == "QUERY" type == "EXPORT" statement.contains("select") type == "QUERY" && statement.contains("select") |@@ -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 "==" and ".matches()" operator. - resource_id: the project id, support "==" and ".matches()" 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.+Supported filters: - 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") resource_id == "project id" resource_id.matches("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" labels.environment == "production" && labels.tier == "critical" |+For example: name == "project name" name.contains("project name") resource_id == "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.contains("project id") name.contains("project name") || resource_id == "project id" labels.environment == "production" && labels.tier == "critical" || 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 "==" and ".matches()" operator. - email: the service account email, support "==" and ".matches()" operator. - state: check State enum for values, support "==" operator.+Supported filter: - 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") state == "DELETED" email == "[email protected]" email.matches("ed") |+For example: name == "ed" name.contains("ed") state == "DELETED" email == "[email protected]" email.contains("ed") |@@ -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 "==" and ".matches()" operator. - email: the workload identity email, support "==" and ".matches()" operator. - state: check State enum for values, support "==" operator.+Supported filter: - 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") state == "DELETED" email == "[email protected]" email.matches("ed") |+For example: name == "ed" name.contains("ed") state == "DELETED" email == "[email protected]" email.contains("ed") |diff --git a/proto/gen/grpc-doc/v1/index.html b/proto/gen/grpc-doc/v1/index.htmlindex 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-specSupported 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" </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-specSupported 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)@@ -13219,14 +13219,14 @@ engine == "MYSQL"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" </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 "==" 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. </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 "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:@@ -15930,19 +15930,19 @@ environment == "environments/{environment resource id}"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 == truetable == "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") </p></td>+environment == "environments/prod" && name.contains("employee") </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-specSupported 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") </p></td>+title.contains("dba") || email.contains("dba") </p></td></tr></tbody>@@ -23977,7 +23977,7 @@ Supported filter:- 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}"@@ -23985,8 +23985,8 @@ database == "instances/{instance}/databases/{database}"instance == "instances/{instance}"type == "QUERY"type == "EXPORT"-statement.matches("select")-type == "QUERY" && statement.matches("select") </p></td>+statement.contains("select")+type == "QUERY" && statement.contains("select") </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-specSupported 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 == truestate == "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" </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-specSupported 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") </p></td>+email.contains("ed") </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-specSupported 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") </p></td>+email.contains("ed") </p></td></tr></tbody>diff --git a/proto/v1/v1/database_service.proto b/proto/v1/v1/database_service.protoindex 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.protoindex 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.protoindex 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.protoindex 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.protoindex 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.protoindex 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.protoindex 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.protoindex 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;}