buildMetadataFilter builds a CEL filter string for GetDatabaseMetadataRequest. Returns the empty string when no narrowing is needed.
(schema, table string)
| 356 | // buildMetadataFilter builds a CEL filter string for GetDatabaseMetadataRequest. |
| 357 | // Returns the empty string when no narrowing is needed. |
| 358 | func buildMetadataFilter(schema, table string) string { |
| 359 | var parts []string |
| 360 | if schema != "" { |
| 361 | parts = append(parts, fmt.Sprintf("schema == %q", schema)) |
| 362 | } |
| 363 | if table != "" { |
| 364 | parts = append(parts, fmt.Sprintf("table == %q", table)) |
| 365 | } |
| 366 | return strings.Join(parts, " && ") |
| 367 | } |
| 368 | |
| 369 | // limitForInclude returns the per-schema `limit` value to send to the server. |
| 370 | // Summary and single-table modes don't need a limit. Bulk modes request |