* PENDING: Is it fast enough? * If no upstream, return empty array.
()
| 427 | * If no upstream, return empty array. |
| 428 | */ |
| 429 | private _getUpstreamSourceManagers(): SourceManager[] { |
| 430 | // Always get the relationship from the raw option. |
| 431 | // Do not cache the link of the dependency graph, so that |
| 432 | // there is no need to update them when change happens. |
| 433 | const sourceHost = this._sourceHost; |
| 434 | |
| 435 | if (isSeries(sourceHost)) { |
| 436 | const datasetModel = querySeriesUpstreamDatasetModel(sourceHost); |
| 437 | return !datasetModel ? [] : [datasetModel.getSourceManager()]; |
| 438 | } |
| 439 | else { |
| 440 | return map( |
| 441 | queryDatasetUpstreamDatasetModels(sourceHost as DatasetModel), |
| 442 | datasetModel => datasetModel.getSourceManager() |
| 443 | ); |
| 444 | } |
| 445 | } |
| 446 | |
| 447 | private _getSourceMetaRawOption(): SourceMetaRawOption { |
| 448 | const sourceHost = this._sourceHost; |
no test coverage detected