Kind: Class
Source: Pams/Web/Pams.Web/Client/app/models/dashboard/data-source-schema/column-data-type.model.ts (line 2)
Part of: Pams
ColumnDataType represents the data type metadata for a column in the dashboard data-source schema. Its clone() method creates a separate copy of an existing instance so schema-related changes can be made without directly modifying the original object.
Methods
| Method | Signature | Returns |
|---|---|---|
clone | clone(model: ColumnDataType) | void |
Properties
| Property | Type |
|---|---|
SQLType | string |
DotNetType | string |
CSharpType | string |
VBType | string |
JavaType | string |
LanguageSpecificType | string |
Where it refuses work
ColumnDataTypestops the work with an early return whenmodel == null.
Diagram
mermaidgraph LR Schema[Data-source schema] --> Column[ColumnDataType] Column --> Clone[clone()] Clone --> Copy[Independent ColumnDataType copy]
Usage
tsimport { ColumnDataType } from './models/dashboard/data-source-schema/column-data-type.model';
// Obtain a column data type from an existing schema definition.
const columnDataType: ColumnDataType = getColumnDataTypeFromSchema();
// Create a copy before applying schema-specific changes.
const copiedColumnDataType = columnDataType.clone();
// Keep the original instance unchanged when working with the copy.
updateColumnTypeForDashboard(copiedColumnDataType);
AI Coding Instructions
- Use
clone()when a caller needs to change column type metadata without mutating the source schema instance. - Keep
ColumnDataTypefocused on column data-type representation and copying behavior. - Preserve all existing property values when updating the
clone()implementation. - Check code that consumes data-source schema models when adding fields, so cloned instances include the new metadata.
Used by
2 references from 2 files. Each is a place in this repository where the symbol is actually used — go read one rather than trusting an example.
Imported by (2)
DataSourceService—Pams/Web/Pams.Web/Client/app/services/dashboard/data-source.service.ts:1Column—Pams/Web/Pams.Web/Client/app/models/dashboard/data-source-schema/column.model.ts:2
Was this page helpful?