Options
All
  • Public
  • Public/Protected
  • All
Menu

TypeUtil util class.

export
class

TypeUtil

Hierarchy

  • TypeUtil

Index

Properties

Private numberTypes

numberTypes: string[] = ['int', 'tinyint', 'smallint', 'mediumint', 'bigint', 'decimal', 'float', 'double']

Array that holds the number types

type

{string[]}

memberof

TypeUtil

Private stringTypes

stringTypes: string[] = ['char', 'varchar', 'blob', 'text', 'tinyblob', 'tinytext', 'mediumblob', 'mediumtext', 'longblob', 'longtext',]

Array that holds the string types

type

{string[]}

memberof

TypeUtil

Methods

convertNoSqlType

  • convertNoSqlType(type: string): void
  • Converts no sql types to standard schema

    Parameters

    • type: string

      type to be converted

    Returns void

convertRamlTypes

  • convertRamlTypes(type: object): DataType
  • Converts raml types to standard schema

    Parameters

    • type: object

      type to be converted

      • items: string
      • type: string

    Returns DataType

    • converted type

convertSqlType

  • convertSqlType(type: string): string
  • Converts a given database type to the standard one.

    Parameters

    • type: string

      db type.

    Returns string

    standard type

getEnumValuesAsString

  • getEnumValuesAsString(type: DataType): string

isDefaultType

  • isDefaultType(type: string): boolean
  • Checks if the provided type is a default one.

    Parameters

    • type: string

      data type

    Returns boolean

    returns true if type is a default one.

Generated using TypeDoc