Kind: Class
Source: Pams/Web/Pams.Web/Client/app/models/dashboard/data-source-schema/view.model.ts (line 4)
Part of: Pams
View is a dashboard data-source-schema model. It represents a view definition and exposes clone() to create a separate View instance when changes must not affect the original.
Methods
| Method | Signature | Returns |
|---|---|---|
clone | clone(model: View) | void |
Properties
| Property | Type |
|---|---|
Id | string |
Name | string |
ViewID | string |
Schema | string |
NameSpace | string |
Columns | Column[] |
ConString | string |
ConName | string |
Data | any |
Where it refuses work
Viewstops the work with an early return whenmodel == null.
Diagram
mermaidgraph LR View[View instance] --> Clone[clone()] Clone --> Copy[Copied View instance]
Usage
tsimport { View } from './models/dashboard/data-source-schema/view.model';
declare const view: View;
const editableView = view.clone();
// Apply changes to editableView without changing view.
AI Coding Instructions
- Call
clone()before changing aViewthat may still be referenced elsewhere in dashboard state. - Keep clone behavior aligned with the fields defined on
View. - When adding fields to
View, updateclone()so copied instances retain the new field values. - Treat the value returned by
clone()as a separate model instance.
Relationships
- IMPORTS →
Column - IMPORTS →
GetColumnPrameter
Used by
4 references from 4 files. Each is a place in this repository where the symbol is actually used — go read one rather than trusting an example.
Imported by (4)
RightButtonsComponent—Pams/Web/Pams.Web/Client/app/components/shared/breadcrumbs/right-buttons/right-buttons.component.ts:1DataSourceService—Pams/Web/Pams.Web/Client/app/services/dashboard/data-source.service.ts:1DashboardWidget—Pams/Web/Pams.Web/Client/app/models/dashboard/dashboard-widget.model.ts:10DataSourceConnection—Pams/Web/Pams.Web/Client/app/models/dashboard/data-source-schema/data-source-connection.model.ts:4
Was this page helpful?