Kind: Class
Source: Pams/Web/Pams.WebApp/Client/app/models/dashboard/data-source-schema/column-data-type.model.ts (line 2)
Part of: Pams
ColumnDataType represents type-related information for a column in the dashboard data-source schema. Its clone() method creates a separate instance so schema type data can be copied before it is changed.
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[Copied ColumnDataType]
Usage
tsimport { ColumnDataType } from './models/dashboard/data-source-schema/column-data-type.model';
function createEditableType(sourceType: ColumnDataType): ColumnDataType {
const editableType = sourceType.clone();
// Apply changes to editableType without changing sourceType.
return editableType;
}
AI Coding Instructions
- Call
clone()before changing column type data that may also be referenced by the original schema. - Keep copied instances independent from the source instance when adding or updating class fields.
- Update
clone()when new mutable properties are added toColumnDataType. - Pass
ColumnDataTypeinstances through dashboard schema code rather than replacing them with untyped objects.
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.WebApp/Client/app/services/dashboard/data-source.service.ts:1Column—Pams/Web/Pams.WebApp/Client/app/models/dashboard/data-source-schema/column.model.ts:2
Was this page helpful?