Home Reference Source

Typedef

Static Public Summary
public

The available DataTypes

public

Function for creating a decimal data type

public

Options for each key in the TableOptions

public

Function for creating a maximum character limit data type

public
public
public

Options when creating a table

Static Private Summary
private

The parsed table options

Static Public

public DataTypes: Object source

The available DataTypes

Properties:

NameTypeAttributeDescription
bit string

Represents a bit data type

tinyint string

Represents a tiny integer data type

smallint string

Represents a small integer data type

int string

Represents an integer data type

bigint string

Represents a big integer data type

decimal DecimalFunction

Represents a decimal data type

numeric string

Represents a numeric data type

float string

Represents a floating point data type

real string

Represents a real number data type

date string

Represents a date data type (YYYY-MM-DD Format)

time string

Represents a time data type (HH:MI:SS Format)

datetime string

Represents a date/time data type (YYYY-MM-DD HH:MI:SS Format)

timestamp string

Represents a timestamp since the Unix epoch (1970-01-01 00:00:00 UTC)

year string

Represents a year data type (YY or YYYY Format)

char MaxFunction

Represents a fixed length (<=4000 characters) string data type

varchar MaxFunction

Represents a variable length string data type (<=8000 characters)

text string

Represents a variable length string data type (<=2GB size)

nchar MaxFunction

Represents a fixed length (4000 characters) unicode string data type

nvarchar MaxFunction

Represents a variable length unicode string data type (<=4000 characters)

ntext string

Represents a variable length unicode string data type (<=1GB size)

binary string

Represents a fixed length binary data type (<=8000 bytes)

varbinary MaxFunction

Represents a variable length binary data type (<=8000 bytes)

image string

Represents a variable length binary data type (<=2GB size)

json string

Represents a JSON data type

public DecimalFunction(p: number, q: number): Function source

Function for creating a decimal data type

Example:

decimal(5, 2) // 000.00

public KeyOptions: Object source

Options for each key in the TableOptions

Properties:

NameTypeAttributeDescription
name string

The name for the key

type DataType

The data type for the key, one of DataTypes

unique boolean
  • optional
  • default: false

Whether the key should be unique

primary boolean
  • optional
  • default: false

If the key is the primary key for the DB

nullable boolean
  • optional
  • default: null

Whether the key is nullable or not

public MaxFunction(max: number): Function source

Function for creating a maximum character limit data type

public RawData: Object source

Properties:

NameTypeAttributeDescription
type string

The type of object the data is

name string

The name of the object

tbl_name string

The name of the table that holds the object

rootpage number

The root page of the item

sql Statement

The raw sql used to retrieve the data

public RawTableData: RawData source

Properties:

NameTypeAttributeDescription
tbl_name string

The name of the retrieved table

public TableOptions: Array<KeyOptions> source

Options when creating a table

Static Private

private ParsedTableOptions: string source

The parsed table options