Constructor
new zDatabaseService()
Executes the database connection function and stores it.
- Copyright:
- Ivan Antunes 2021
- Source:
Classes
Members
connection
Sequelize instance containing the database connection.
- Copyright:
- Ivan Antunes 2021
- Source:
isInitialized
Stores if initialized service.
- Copyright:
- Ivan Antunes 2021
- Source:
tService
Stores instance zTranslateService.
- Copyright:
- Ivan Antunes 2021
- Source:
Methods
(static) destroyInstance()
Function used to destroy instance of zDatabaseService
- Copyright:
- Ivan Antunes 2021
- Source:
(static) getInstance()
Function used to get instance of zDatabaseService
- Copyright:
- Ivan Antunes 2021
- Source:
Returns:
zDatabaseService
checkField(tableName, fieldName)
Function to check field in table.
Parameters:
Name | Type | Description |
---|---|---|
tableName |
string | Table Name. |
fieldName |
string | Field Name. |
- Copyright:
- Ivan Antunes 2021
- Source:
Returns:
Observable
checkTable(tableName)
Function to check table in database.
Parameters:
Name | Type | Description |
---|---|---|
tableName |
string | Table Name. |
- Copyright:
- Ivan Antunes 2021
- Source:
Returns:
Observable
connectionDatabase(config)
Function responsible for connecting to the database and testing the connection.
Parameters:
Name | Type | Description |
---|---|---|
config |
zIConfigDB | Database Configs |
- Copyright:
- Ivan Antunes 2021
- Source:
Returns:
Observable
createTable(table)
Function to create tables and add columns.
Parameters:
Name | Type | Description |
---|---|---|
table |
zITableDB | Table. |
- Copyright:
- Ivan Antunes 2021
- Source:
Returns:
Observable
generateAttribute(data)
Function to generate attributes table.
Parameters:
Name | Type | Description |
---|---|---|
data |
zITableDB | zIFieldDB | Table Generate Attributes | Field Generate Attributes |
- Copyright:
- Ivan Antunes 2021
- Source:
Returns:
Observable
getConnection()
Function to pick up the connection.
- Copyright:
- Ivan Antunes 2021
- Source:
Returns:
Observable
getDialectDatabase(dialect)
Function to take the selected bank type in addition to checking if it is valid.
Parameters:
Name | Type | Description |
---|---|---|
dialect |
string | Database type. |
- Copyright:
- Ivan Antunes 2021
- Source:
Returns:
Observable
getFieldType(field)
Function to get field type.
Parameters:
Name | Type | Description |
---|---|---|
field |
zIFieldDB | Database Field |
- Copyright:
- Ivan Antunes 2021
- Source:
Returns:
Observable
setTableModel(table)
Function used to set table model.
Parameters:
Name | Type | Description |
---|---|---|
table |
zITableDB | Table. |
- Copyright:
- Ivan Antunes 2021
- Source:
Returns:
Observable>>