limitForInclude returns the per-schema `limit` value to send to the server. Summary and single-table modes don't need a limit. Bulk modes request schemaTableLimit+1 so the client can disambiguate exactly-200 from truncated-at-200.
(include, table string)
| 371 | // schemaTableLimit+1 so the client can disambiguate exactly-200 from |
| 372 | // truncated-at-200. |
| 373 | func limitForInclude(include, table string) int32 { |
| 374 | if table != "" { |
| 375 | return 0 |
| 376 | } |
| 377 | if include == schemaIncludeColumns || include == schemaIncludeDetails { |
| 378 | return int32(schemaTableLimit + 1) |
| 379 | } |
| 380 | return 0 |
| 381 | } |
| 382 | |
| 383 | // fetchMetadata calls DatabaseService/GetDatabaseMetadata and decodes the response. |
| 384 | func (s *Server) fetchMetadata(ctx context.Context, resourceName, filter string, limit int32) (*databaseMetadata, error) { |