comment cleanup

This commit is contained in:
Wells Bunker 2025-09-15 14:25:28 -06:00
parent 4d2b7760fa
commit 464ca48264
No known key found for this signature in database
GPG Key ID: DB16D6F2679B78FC
3 changed files with 9 additions and 9 deletions

View File

@ -19,7 +19,7 @@ BEGIN
updated_at = EXCLUDED.updated_at,
deleted_at = EXCLUDED.deleted_at;
ELSIF TG_OP = 'DELETE' THEN
UPDATE text_search
UPDATE public.text_search
SET deleted_at = NOW()
WHERE asset_id = OLD.id AND asset_type = 'chat';
END IF;
@ -46,7 +46,7 @@ BEGIN
updated_at = EXCLUDED.updated_at,
deleted_at = EXCLUDED.deleted_at;
ELSIF TG_OP = 'DELETE' THEN
UPDATE text_search
UPDATE public.text_search
SET deleted_at = NOW()
WHERE asset_id = OLD.id AND asset_type = 'metric_file';
END IF;
@ -73,7 +73,7 @@ BEGIN
updated_at = EXCLUDED.updated_at,
deleted_at = EXCLUDED.deleted_at;
ELSIF TG_OP = 'DELETE' THEN
UPDATE text_search
UPDATE public.text_search
SET deleted_at = NOW()
WHERE asset_id = OLD.id AND asset_type = 'dashboard_file';
END IF;
@ -100,7 +100,7 @@ BEGIN
updated_at = EXCLUDED.updated_at,
deleted_at = EXCLUDED.deleted_at;
ELSIF TG_OP = 'DELETE' THEN
UPDATE text_search
UPDATE public.text_search
SET deleted_at = NOW()
WHERE asset_id = OLD.id AND asset_type = 'report_file';
END IF;
@ -137,7 +137,7 @@ BEGIN
deleted_at = EXCLUDED.deleted_at;
END IF;
ELSIF TG_OP = 'DELETE' THEN
UPDATE text_search
UPDATE public.text_search
SET deleted_at = NOW()
WHERE asset_id = OLD.id AND asset_type = 'message';
END IF;

View File

@ -12,12 +12,12 @@ import { and, eq, isNull } from '@buster/database';
import type { Ancestor, AssetAncestors } from '@buster/server-shared';
/**
* Traces the lineage of an asset through its relationships
* Traces the ancestors of an asset through its relationships
* @param assetId - The ID of the asset to trace
* @param assetType - The type of asset ('message', 'dashboard', 'metric', 'report')
* @param userId - The user ID making the request
* @param organizationId - The organization ID for scoping
* @returns Promise<AssetLineage> - The complete lineage tree for the asset
* @returns Promise<AssetAncestors> - The complete ancestors tree for the asset
*/
export async function getAssetAncestors(
assetId: string,
@ -105,7 +105,7 @@ async function getAssetCollectionAncestor(assetId: string): Promise<Ancestor[]>
);
}
/**
* Get lineage for a dashboard - find chats that contain this dashboard
* Get ancestors for a dashboard - find chats that contain this dashboard
*/
async function getMetricDashboardAncestors(metricId: string): Promise<Ancestor[]> {
return await db

View File

@ -6,7 +6,7 @@ import { getAssetAncestors } from './get-search-result-ancestors';
* Perform text search and enhance results with asset ancestors
* @param userId - The user ID making the request
* @param searchRequest - The search request parameters
* @returns Promise<SearchResponseWithAncestors> - Search results with ancestors
* @returns Promise<SearchTextResponse> - Search results with ancestors
*/
export async function performTextSearch(
userId: string,