The SQLDatabaseManager class provides CRUD operations for database objects.

The SQLDatabaseManager class defines the following methods.

Method

Returns

Description

addDatabase(SQLDatabase):SQLDatabase

Boolean

Adds a database object to the SQL plug-in inventory.

addTablesToDatabase(SQLDatabase,String[]):SQLTable[]

Array of SQL Table

Adds new tables to a database.

convertBooleanForPresentation(String):String

String

Converts Boolean values to Yes or No strings.

generateCreateWorkflow(SQLTable,ch.dunes.model.workflow.WorkflowCategory,Boolean,SQLColumn[]):ch.dunes.model.workflow.Workflow

ch.dunes.model.workflow.Workflow

Generates a workflow that creates database records.

generateDeleteWorkflow(SQLTable,h.dunes.model.workflow.WorkflowCategory,Boolean):ch.dunes.model.workflow.Workflow

ch.dunes.model.workflow.Workflow

Generates a workflow that deletes table records.

generateReadWorkflow(SQLTable,ch.dunes.model.workflow.WorkflowCategory,Boolean):ch.dunes.model.workflow.Workflow

ch.dunes.model.workflow.Workflow

Generates a workflow that reads table records.

generateUpdateWorkflow(SQLTable,ch.dunes.model.workflow.WorkflowCategory,Boolean,SQLColumn[]):ch.dunes.model.workflow.Workflow

ch.dunes.model.workflow.Workflow

Generates a workflow that updates a table record.

getConnectionUrl(String,String):String

String

Returns a connection URL pattern for a particular database type.

getDatabase(String):SQLDatabase

SQLDatabase

Returns database objects with a specified name from the SQL plug-in inventory.

getDatabaseById(String):SQLDatabase

SQLDatabase

Returns database objects with a specified ID from the SQL plug-in inventory.

getDatabases():SQLDatabase[]

Array of SQLDatabase

Returns a list of database objects in the SQL plug-in inventory.

getSupportedDatabaseTypes():String[]

Array of strings

Returns a list of supported database types.

isValidNumberOrEmpty(Object):Boolean

Boolean

Returns true if the object you passed is a valid number or null. Otherwise returns false.

removeDatabase(SQLDatabase):SQLDatabase

SQLDatabase

Removes a database object from the SQL plug-in inventory.

removeTableFromDatabase(SQLTable):SQLTable

SQLTable

Removes a specified table from the database.

updateDatabase(SQLDatabase):SQLDatabase

SQLDatabase

Updates a specified database in the SQL plug-in inventory.

validateDatabase(SQLDatabase):Object

Object

Validates the created database object in case the object can connect to the real database.