HotDB
Class: HotDB<DBType, DBResultType, DBSchema>
The server-side database connection.
Type parameters​
Name | Type |
---|---|
DBType | any |
DBResultType | any |
DBSchema | HotDBSchema |
Hierarchy​
HotDB
↳
HotDBMySQL
↳
HotDBInflux
Table of contents​
Constructors​
Properties​
Methods​
Constructors​
constructor​
• new HotDB<DBType
, DBResultType
, DBSchema
>(db?
, type?
, schema?
)
Type parameters​
Name | Type |
---|---|
DBType | any |
DBResultType | any |
DBSchema | HotDBSchema |
Parameters​
Name | Type | Default value |
---|---|---|
db | DBType | null |
type | string | "" |
schema | DBSchema | null |
Defined in​
Properties​
connectionStatus​
• connectionStatus: ConnectionStatus
The connection status.
Defined in​
db​
• db: DBType
The connection to the database (or the driver).
Defined in​
schema​
• schema: DBSchema
The db schema. This will generate a database structure and keep it maintained as needed.
Defined in​
type​
• type: string
The database type.
Defined in​
Methods​
connect​
â–¸ Abstract
connect(connectionInfo
): Promise
<any
[]>
Connect to the database. This will only start connecting if db is null.
Parameters​
Name | Type |
---|---|
connectionInfo | HotDBConnectionInterface |
Returns​
Promise
<any
[]>
Defined in​
disconnect​
â–¸ Abstract
disconnect(): Promise
<void
>
Disconnect from the server.
Returns​
Promise
<void
>
Defined in​
multiQuery​
â–¸ Optional
Abstract
multiQuery(queryStrings
): Promise
<DBResultType
[]>
Make multiple queries.
Parameters​
Name | Type |
---|---|
queryStrings | string [] | { query : string ; values : any [] }[] |
Returns​
Promise
<DBResultType
[]>
Defined in​
query​
â–¸ Optional
Abstract
query(queryString
, values?
): Promise
<DBResultType
>
The query to make.
Parameters​
Name | Type |
---|---|
queryString | string |
values? | any [] |
Returns​
Promise
<DBResultType
>
Defined in​
queryOne​
â–¸ Optional
Abstract
queryOne(queryString
, values?
): Promise
<DBResultType
>
Make a single query.
Parameters​
Name | Type |
---|---|
queryString | string |
values? | any [] |
Returns​
Promise
<DBResultType
>
Defined in​
tableCheck​
â–¸ Optional
Abstract
tableCheck(tableName
): Promise
<boolean
>
Checks if the table exists.
Parameters​
Name | Type |
---|---|
tableName | string |
Returns​
Promise
<boolean
>