From 78439beb5d0f077b5f4c1bdd3ddfe712bd2decac Mon Sep 17 00:00:00 2001 From: "hotdata-automation[bot]" <267177015+hotdata-automation[bot]@users.noreply.github.com> Date: Fri, 24 Jul 2026 06:42:16 +0000 Subject: [PATCH 1/2] feat(databases): add search parameter to list endpoint --- CHANGELOG.md | 4 ++++ docs/DatabasesApi.md | 5 +++-- src/apis/databases_api.rs | 7 ++++++- 3 files changed, 13 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b6e3eea..384071a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +### Changed + +- feat(databases): add search parameter to list endpoint + ## [0.10.0] - 2026-07-23 ### Changed diff --git a/docs/DatabasesApi.md b/docs/DatabasesApi.md index 4f09808..5e57a54 100644 --- a/docs/DatabasesApi.md +++ b/docs/DatabasesApi.md @@ -263,10 +263,10 @@ Name | Type | Description | Required | Notes ## list_databases -> models::ListDatabasesResponse list_databases(limit, cursor) +> models::ListDatabasesResponse list_databases(limit, cursor, search) List databases -List databases in the workspace, newest first, one page at a time. When no `limit` is given a default page size is applied, so a single call returns at most one page rather than every database. If the response's `has_more` is true, pass its `next_cursor` value back as the `cursor` query parameter to fetch the next page. +List databases in the workspace, newest first, one page at a time. When no `limit` is given a default page size is applied, so a single call returns at most one page rather than every database. If the response's `has_more` is true, pass its `next_cursor` value back as the `cursor` query parameter to fetch the next page. Pass `search` to return only databases whose name contains that text (case-insensitive). ### Parameters @@ -275,6 +275,7 @@ Name | Type | Description | Required | Notes ------------- | ------------- | ------------- | ------------- | ------------- **limit** | Option<**i32**> | Maximum number of databases to return in this page (1–100). Values outside the range are clamped. | | **cursor** | Option<**String**> | Opaque pagination cursor from a previous response's `next_cursor`. | | +**search** | Option<**String**> | Case-insensitive substring filter on the database name. When set, only databases whose name contains this text are returned; paging and newest-first ordering are unchanged. | | ### Return type diff --git a/src/apis/databases_api.rs b/src/apis/databases_api.rs index 9dc4f37..763a338 100644 --- a/src/apis/databases_api.rs +++ b/src/apis/databases_api.rs @@ -631,15 +631,17 @@ pub async fn get_database( } } -/// List databases in the workspace, newest first, one page at a time. When no `limit` is given a default page size is applied, so a single call returns at most one page rather than every database. If the response's `has_more` is true, pass its `next_cursor` value back as the `cursor` query parameter to fetch the next page. +/// List databases in the workspace, newest first, one page at a time. When no `limit` is given a default page size is applied, so a single call returns at most one page rather than every database. If the response's `has_more` is true, pass its `next_cursor` value back as the `cursor` query parameter to fetch the next page. Pass `search` to return only databases whose name contains that text (case-insensitive). pub async fn list_databases( configuration: &configuration::Configuration, limit: Option, cursor: Option<&str>, + search: Option<&str>, ) -> Result> { // add a prefix to parameters to efficiently prevent name collisions let p_query_limit = limit; let p_query_cursor = cursor; + let p_query_search = search; let uri_str = format!("{}/v1/databases", configuration.base_path); let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); @@ -650,6 +652,9 @@ pub async fn list_databases( if let Some(ref param_value) = p_query_cursor { req_builder = req_builder.query(&[("cursor", ¶m_value.to_string())]); } + if let Some(ref param_value) = p_query_search { + req_builder = req_builder.query(&[("search", ¶m_value.to_string())]); + } if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); } From 51ec4a8ee8acc86c821425241567fd46f3b9bd76 Mon Sep 17 00:00:00 2001 From: Anoop Narang Date: Fri, 24 Jul 2026 14:24:42 +0530 Subject: [PATCH 2/2] fix(databases): thread search through the list wrapper Codegen added the search parameter to the generated list_databases, but the hand-written Databases::list wrapper and its callers still used the old arity, breaking the build (E0061). Thread search through the wrapper and update the example/test call sites. --- examples/quickstart.rs | 2 +- src/resources.rs | 7 +++++-- tests/common/mod.rs | 2 +- tests/databases_lifecycle.rs | 2 +- 4 files changed, 8 insertions(+), 5 deletions(-) diff --git a/examples/quickstart.rs b/examples/quickstart.rs index 7917781..7ef71c4 100644 --- a/examples/quickstart.rs +++ b/examples/quickstart.rs @@ -195,7 +195,7 @@ async fn resolve_database_id(client: &Client) -> Result, Box DatabasesApi<'a> { } /// List databases, newest first, one keyset page at a time. Pass `cursor` - /// (from a previous response's `next_cursor`) to fetch the next page. + /// (from a previous response's `next_cursor`) to fetch the next page, and + /// `search` to return only databases whose name contains that text + /// (case-insensitive). pub async fn list( &self, limit: Option, cursor: Option<&str>, + search: Option<&str>, ) -> Result> { - apis::databases_api::list_databases(self.config, limit, cursor).await + apis::databases_api::list_databases(self.config, limit, cursor, search).await } /// Delete a database by id. diff --git a/tests/common/mod.rs b/tests/common/mod.rs index 48aefd8..79a8b02 100644 --- a/tests/common/mod.rs +++ b/tests/common/mod.rs @@ -184,7 +184,7 @@ pub async fn shared_database_id(client: &Client) -> String { use hotdata::apis::databases_api; let config = client.configuration(); - let listing = databases_api::list_databases(config, None, None) + let listing = databases_api::list_databases(config, None, None, None) .await .expect("list_databases should succeed"); if let Some(db) = listing diff --git a/tests/databases_lifecycle.rs b/tests/databases_lifecycle.rs index fb78a53..710a0eb 100644 --- a/tests/databases_lifecycle.rs +++ b/tests/databases_lifecycle.rs @@ -23,7 +23,7 @@ async fn databases_lifecycle() { .expect("get_database should succeed"); assert_eq!(fetched.id, database_id); - let listing = databases_api::list_databases(config, None, None) + let listing = databases_api::list_databases(config, None, None, None) .await .expect("list_databases should succeed"); assert!(