using AnalyticsDAL.DTO.AnalysisQuery; using GB5Shared.DTO.Framework.Login; using System.Data.Common; namespace AnalyticsDAL.CustomCode.AnalysisQuery { public interface IAnalysisQueryDAL { Task GetAnalysisQuery(int analysisQueryId, LoginDTO login, CancellationToken ct); Task GetSelectListAnalysisQuery(int analysisId, LoginDTO login, CancellationToken ct); Task GetAnalysisFieldsForDesigner(int analysisId, int analysisQueryId, LoginDTO login, CancellationToken ct); /// When is supplied, the caller owns the transaction's /// lifecycle (begin/commit/rollback/dispose) — this method only participates in it and /// does not commit/rollback/dispose it. When omitted, this method self-manages its own /// transaction exactly as before (back-compat default for existing callers). Task SaveAnalysisQuery(AnalysisQueryDTO dto, LoginDTO login, bool isNew, CancellationToken ct, DbTransaction tx = null); Task DeleteAnalysisQuery(int analysisQueryId, LoginDTO login, CancellationToken ct); /// Unscoped by TenantId — used only by DatasetResolver to reject DIRECT-type /// queries (see AnalysisQueryQB.GET_ANALYSISQUERY_TYPE_AND_ANALYSISID) and to find the /// owning AnalysisId. Returns null if the query doesn't exist. Task GetAnalysisQueryTypeInfo(int analysisQueryId, LoginDTO login, CancellationToken ct); /// BI engine's dimension/measure picker (BICatalogBLL's AnalysisQuery branch) /// — see AnalysisQueryQB.GET_BI_DIMENSIONS_FOR_QUERY/GET_BI_MEASURES_FOR_QUERY. Task> GetBIDimensionsForQuery(int analysisQueryId, LoginDTO login, CancellationToken ct); Task> GetBIMeasuresForQuery(int analysisQueryId, LoginDTO login, CancellationToken ct); } }