Source: Database/Relational/IRelationalDatabaseConnection.js

const IDatabaseConnection = require('../IDatabaseConnection.js');

/**
 * Relational database connection.
 * @extends IDatabaseConnection
 */
class IRelationalDatabaseConnection extends IDatabaseConnection {
    /**
     * Creates a new relational database connection.
     * @param connectionInfo The connection info to utilize for the connection.
     */
    constructor(connectionInfo) {
        super();
    }

    /**
     * node.js style database close callback
     * @callback IRelationalDatabase~closeCallback
     * @param {string} error Contains the error message if one exists.
     */
    /**
     * Closes an open relational database and returns a Promise.
     * @function IRelationalDatabaseConnection#close
     * @return {Promise}
     * @override
     */
    /**
     * Closes an open relational database and utilizes the supplied callback when complete.
     * @param {IRelationalDatabase~closeCallback} callback The node.js style callback to use in conjunction with the command.
     * @function IRelationalDatabaseConnection#close
     * @override
     */
    close(callback) {
        throw ('IRelationalDatabaseConnection.close() must be overridden!');
    }

    /**
     * node.js style database connection callback
     * @callback IRelationalDatabase~connectCallback
     * @param {string} error Contains the error message if one exists.
     */
    /**
     * Connects to a relational database and returns a Promise.
     * @function IRelationalDatabaseConnection#connect
     * @return {Promise}
     * @override
     */
    /**
     * Connects to a relational database with the supplied connection info and returns a Promise.
     * @param connectionInfo The connection info to utilize for the connection.
     * @function IRelationalDatabaseConnection#connect
     * @return {Promise}
     * @override
     */
    /**
     * Connects to a relational database and utilizes the supplied callback when complete.
     * @param {IRelationalDatabase~connectCallback} callback The node.js style callback to use in conjunction with the connection.
     * @function IRelationalDatabaseConnection#connect
     * @override
     */
    /**
     * Connects to a relational database with the supplied connection info and utilizes the supplied callback when complete.
     * @param connectionInfo The connection info to utilize for the connection.
     * @param {IRelationalDatabase~connectCallback} callback The node.js style callback to use in conjunction with the connection.
     * @function IRelationalDatabaseConnection#connect
     * @override
     */
    connect(connectionInfo, callback) {
        throw ('IRelationalDatabaseConnection.connect() must be overridden!');
    }
}
module.exports = IRelationalDatabaseConnection;