Options
All
  • Public
  • Public/Protected
  • All
Menu

Class ColumnMetadata

Stores metadata about Column-decorated properties on Table-decorated classes (Entities).

Hierarchy

  • ColumnMetadata

Index

Constructors

constructor

  • Initialize the metadata for a column.

    Parameters

    • Entity: TableType

      The constructor for the Table-decorated class to which this column belongs.

    • mapTo: string

      The name of the property in the class to which this column will be mapped.

    • dataType: string

      The JavaScript datatype of the property.

    • options: ColumnMetaOptions

      Configuration options for this column with metadata like dataType, column name, etc.

    Returns ColumnMetadata

Properties

Entity

Entity: TableType

Optional converter

converter: Converter

dataType

dataType: string

hasDefault

hasDefault: boolean

isGenerated

isGenerated: boolean

isNullable

isNullable: boolean

isPrimary

isPrimary: boolean

mapTo

mapTo: string

Optional maxLength

maxLength: number

name

name: string

Optional sqlDataType

sqlDataType: string

Methods

Static createFQName

  • createFQName(tableAlias: string, colName: string): string
  • Create a fully-qualified name in the form <table-alias>.<name>.

    Parameters

    • tableAlias: string

      The alias for the table.

    • colName: string

      The name of a column or property.

    Returns string

    The fully-qualified column name, unescaped.

Generated using TypeDoc