Zum Hauptinhalt springen

DBType

This Class represent a database type. It is used in the

See

TableMapping Class

Example

DBType.string()       // -> varchar(MAX)
DBType.string(length) // -> varchar(20)
DBType.numeric() // -> float
DBType.float() // -> float
DBType.integer() // -> int
DBType.date() // -> datetime
DBType.timestamp() // -> timestamp
DBType.boolean() // -> bit

@class DBType

Constructors

Constructor

new DBType(dbType, resultSetFunc, formatter): DBType

Parameters

dbType

string

resultSetFunc

string

formatter

(value, withQuotes) => string

Returns

DBType

Properties

format()

format: (value, withQuotes) => any

Parameters

value

any

withQuotes

boolean

Returns

any


dbType

dbType: string


resultSetFunc

resultSetFunc: string


formatter()

formatter: (value, withQuotes) => string

Parameters

value

any

withQuotes

boolean

Returns

string


MAX

static MAX: string


DateTimePattern

static DateTimePattern: RegExp


DatePattern

static DatePattern: RegExp


ISO8601DateTimePattern

static ISO8601DateTimePattern: RegExp


ISO8601DatePattern

static ISO8601DatePattern: RegExp

Methods

string()

static string(length?): DBType

Parameters

length?

number

Returns

DBType


numeric()

static numeric(): DBType

Returns

DBType


float()

static float(): DBType

Returns

DBType


integer()

static integer(): DBType

Returns

DBType


date()

static date(): DBType

Returns

DBType


timestamp()

static timestamp(): DBType

Returns

DBType


boolean()

static boolean(): DBType

Returns

DBType