DatabaseAdapter

A class that implements the DatabaseAdapter interface. This class is responsible for creating and managing various adapters to access the data stored in the backend database. The backend database can be either JSON or SQL (MySQL, SQLite, MariaDB).

Constructors

Link copied to clipboard
open fun DatabaseAdapter(guilds: Guilds, settings: SettingsManager)
Creates a new instance of the DatabaseAdapter class.
Link copied to clipboard
open fun DatabaseAdapter(guilds: Guilds, settings: SettingsManager, doConnect: Boolean)
Creates a new instance of the DatabaseAdapter class.

Functions

Link copied to clipboard
Creates a clone of the current `DatabaseAdapter` with the given `DatabaseBackend`.
Link copied to clipboard
open fun close()
Closes the database connection if it's established.
Link copied to clipboard
open fun isConnected(): Boolean
Returns whether the database connection is established or not.
Link copied to clipboard
open fun open()
Establishes the database connection if it's not already established.

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard