Skip to content

Column

reference
1 min readUpdated

Kind: Class

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

Part of: Pams

Column represents a column in a dashboard data-source schema. It supports copying an individual column with clone() and copying a collection of columns with cloneList() so callers can work with separate model instances.

Methods

MethodSignatureReturns
cloneListcloneList(model: Column[])void
cloneclone(model: Column)void

Properties

PropertyType
Idstring
Namestring
ColumnIdstring
ColumnFullNamestring
IsPrimaryboolean
IsForeignboolean
IsIdentityboolean
AllowNullboolean
IsComputedboolean
ColumnDataTypeColumnDataType
IsSelectedboolean

Where it refuses work

  • Column stops the work with an early return when model == null || model.length == 0.
  • Column stops the work with an early return when model == null.

Diagram

mermaid
graph LR
  Schema[Data-source schema] --> Column[Column]
  Column --> Clone[clone()]
  Column --> CloneList[cloneList()]
  Clone --> ColumnCopy[Copied Column]
  CloneList --> ColumnCopies[Copied Column list]

Usage

ts
import { Column } from './models/dashboard/data-source-schema/column.model';

const copiedColumn = column.clone();

const copiedColumns = Column.cloneList(schema.columns);

// Update copiedColumn or copiedColumns without changing the source instances.

AI Coding Instructions

  • Call clone() before changing a Column that may also be referenced by another schema or view.
  • Use Column.cloneList() when copying schema column collections instead of copying only the array reference.
  • Keep column-copy behavior inside this model so consumers do not manually recreate column instances.
  • Check whether calling code expects copied columns before adding mutations to dashboard schema flows.

Relationships

  • IMPORTS → ColumnDataType

Used by

3 references from 3 files. Each is a place in this repository where the symbol is actually used — go read one rather than trusting an example.

Imported by (3)

  • DataSourceServicePams/Web/Pams.WebApp/Client/app/services/dashboard/data-source.service.ts:1
  • TablePams/Web/Pams.WebApp/Client/app/models/dashboard/data-source-schema/table.model.ts:6
  • ViewPams/Web/Pams.WebApp/Client/app/models/dashboard/data-source-schema/view.model.ts:4

Was this page helpful?

Download as PDF