From 3758a01563a801514409f73b21b22d0ab053e24e Mon Sep 17 00:00:00 2001 From: Eddie A Tejeda <669988+eddietejeda@users.noreply.github.com> Date: Thu, 9 Jul 2026 17:46:25 -0700 Subject: [PATCH 1/2] feat(databases): show created_at in list and show commands Adds a CREATED column to `databases list` and a created_at row to `databases show`. Uses the updated SDK models from sdk-rust feat/database-timestamps (PR #909 in runtimedb). Cargo.toml temporarily points to local sdk-rust path; update to published version once sdk-rust feat/database-timestamps is released. --- Cargo.lock | 2 -- Cargo.toml | 2 +- src/commands/databases.rs | 22 +++++++++++++++++++--- 3 files changed, 20 insertions(+), 6 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index b6753e2d..7345a36f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1166,8 +1166,6 @@ checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" [[package]] name = "hotdata" version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2e63f030edd9865312928059d492b3caf3c64f44b4a26abbfc92779517ec9026" dependencies = [ "arrow-array", "arrow-ipc", diff --git a/Cargo.toml b/Cargo.toml index f4e47c76..281dd17d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -16,7 +16,7 @@ path = "src/main.rs" # behind a shared multi-thread tokio runtime. The `arrow` feature backs result # decode; `upload_file` runs the presigned direct-to-storage upload flow # (see src/sdk.rs::Api::upload). -hotdata = { version = "0.8.0", features = ["arrow"] } +hotdata = { path = "../sdk-rust", features = ["arrow"] } # Shared multi-thread runtime for the sync wrapper; block_on is called # concurrently from rayon worker threads (see src/indexes.rs). The presigned # upload (src/sdk.rs::Api::upload) drives the SDK's async `upload_file` on this diff --git a/src/commands/databases.rs b/src/commands/databases.rs index d5eb2af8..7561f8f7 100644 --- a/src/commands/databases.rs +++ b/src/commands/databases.rs @@ -258,6 +258,8 @@ struct DatabaseSummary { name: Option, #[serde(default)] default_catalog: Option, + #[serde(default)] + created_at: Option, } /// CLI output shape for `databases get`. A curated, stably-ordered view mapped @@ -275,6 +277,8 @@ pub struct Database { #[serde(default)] pub expires_at: Option, #[serde(default)] + pub created_at: Option, + #[serde(default)] attachments: Vec, } @@ -347,6 +351,7 @@ impl From for Database { default_catalog: Some(d.default_catalog), default_connection_id: d.default_connection_id, expires_at: d.expires_at.flatten(), + created_at: d.created_at.flatten(), attachments: d .attachments .into_iter() @@ -360,12 +365,12 @@ impl From for Database { } impl From for DatabaseSummary { - /// Map the SDK's typed summary into the CLI's list-row output shape. fn from(s: hotdata::models::DatabaseSummary) -> Self { DatabaseSummary { id: s.id, name: s.name.flatten(), default_catalog: Some(s.default_catalog), + created_at: s.created_at.flatten(), } } } @@ -386,7 +391,7 @@ pub(crate) fn get_database(api: &Api, id: &str) -> Result { /// up worker" hint instead of an unexplained pause — `databases list` is a /// common first command against an idle workspace. fn list_database_summaries(api: &Api) -> Result, ApiError> { - block_with_wakeup(api, "Loading databases…", api.client().databases().list()) + block_with_wakeup(api, "Loading databases...", api.client().databases().list()) .map(|r| r.databases.into_iter().map(DatabaseSummary::from).collect()) } @@ -818,10 +823,14 @@ pub fn list(workspace_id: &str, format: &str) { marker.to_string(), d.id.clone(), d.name.as_deref().unwrap_or("-").to_string(), + d.created_at + .as_deref() + .map(crate::util::format_date) + .unwrap_or_else(|| "-".to_string()), ] }) .collect(); - crate::output::table::print(&["", "ID", "NAME"], &rows); + crate::output::table::print(&["", "ID", "NAME", "CREATED"], &rows); } } _ => unreachable!(), @@ -845,6 +854,13 @@ pub fn get(workspace_id: &str, id_or_name: &str, format: &str) { if let Some(c) = &db.default_catalog { println!("{}{}", label("catalog:"), c.clone().cyan()); } + if let Some(ts) = &db.created_at { + println!( + "{}{}", + label("created_at:"), + crate::util::format_date(ts).dark_grey() + ); + } println!( "{}{}", label("default_connection_id:"), From cbb84ca77f901139fab1d3ec1c152690b11a5e0c Mon Sep 17 00:00:00 2001 From: Eddie A Tejeda <669988+eddietejeda@users.noreply.github.com> Date: Thu, 9 Jul 2026 18:25:05 -0700 Subject: [PATCH 2/2] chore: update hotdata SDK to v0.8.1 (created_at on databases) --- Cargo.lock | 4 +++- Cargo.toml | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 7345a36f..d898d2ce 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1165,7 +1165,9 @@ checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" [[package]] name = "hotdata" -version = "0.8.0" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6457e9ad27372a828225351937ef49a6a16ec789a2ec46b2a6fbfaa41b3bb780" dependencies = [ "arrow-array", "arrow-ipc", diff --git a/Cargo.toml b/Cargo.toml index 281dd17d..9ec0f00b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -16,7 +16,7 @@ path = "src/main.rs" # behind a shared multi-thread tokio runtime. The `arrow` feature backs result # decode; `upload_file` runs the presigned direct-to-storage upload flow # (see src/sdk.rs::Api::upload). -hotdata = { path = "../sdk-rust", features = ["arrow"] } +hotdata = { version = "0.8.1", features = ["arrow"] } # Shared multi-thread runtime for the sync wrapper; block_on is called # concurrently from rayon worker threads (see src/indexes.rs). The presigned # upload (src/sdk.rs::Api::upload) drives the SDK's async `upload_file` on this