fix: remove macOS tray icon title and add SQL Server TOP test

- Remove the "DBX" title text from the macOS menu bar tray icon so it
  only displays the icon, matching Windows behavior
- Add test for SQL Server TOP pagination with aggregate queries like
  COUNT(*)
This commit is contained in:
t8y2
2026-05-25 11:42:47 +08:00
parent e5e86eda30
commit ad7797f451
2 changed files with 13 additions and 5 deletions
+13
View File
@@ -575,6 +575,19 @@ mod tests {
assert_eq!(result.sql.unwrap(), "SELECT TOP (100) id FROM users ORDER BY id DESC");
}
#[test]
fn uses_sqlserver_top_for_count_queries_without_derived_table() {
let result = build_paginated_query_sql(PaginatedQuerySqlOptions {
original_sql: "SELECT COUNT(*) FROM TicketInfo".to_string(),
database_type: Some(DatabaseType::SqlServer),
limit: 100,
offset: 0,
});
assert_eq!(result.ok, true);
assert_eq!(result.sql.unwrap(), "SELECT TOP (100) COUNT(*) FROM TicketInfo");
}
#[test]
fn wraps_sqlserver_select_with_unnamed_column() {
let result = build_paginated_query_sql(PaginatedQuerySqlOptions {
-5
View File
@@ -54,11 +54,6 @@ fn setup_desktop_tray<R: tauri::Runtime, M: Manager<R>>(manager: &M) -> tauri::R
let menu = MenuBuilder::new(manager).text("show", "Show DBX").separator().text("quit", "Quit DBX").build()?;
let mut tray =
TrayIconBuilder::<R>::with_id(DESKTOP_TRAY_ID).tooltip("DBX").menu(&menu).show_menu_on_left_click(false);
#[cfg(target_os = "macos")]
{
tray = tray.title("DBX");
}
if let Some(icon) = manager.app_handle().default_window_icon().cloned() {
tray = tray.icon(icon);
}