# ColumnDataType

**Kind:** Class

**Source:** `Pams/Web/Pams.Web/Client/app/models/dashboard/data-source-schema/column-data-type.model.ts` (line 2)

**Part of:** [Pams](subsystem-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

- `ColumnDataType` stops the work with an early return when `model == null`.

## Diagram

```mermaid
graph LR
  Schema[Data-source schema] --> Column[ColumnDataType]
  Column --> Clone[clone()]
  Clone --> Copy[Independent ColumnDataType copy]
```

## Usage

```ts
import { 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 `ColumnDataType` focused 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`:1
- `Column` — `Pams/Web/Pams.Web/Client/app/models/dashboard/data-source-schema/column.model.ts`:2
