rapidSQL.js
/**
     * Closes the connection after all pending queries are executed.
     */
Closes the connection after all pending queries are executed.
Closes the connection after all pending queries are executed .
close(){
        return new Promise((resolve, reject) => {
            if(!this.pool) return reject('I\'m not connected to any database!');
            try{
                this.pool.end((err) => {
                    if(err) return reject(err);
                });
                this.pool = null;
                resolve();
            }catch(error){
                return reject(error);
            };
        });
    }
close ( ) { return new Promise ( ( resolve , reject ) => { if ( ! this . pool ) return reject ( 'I\'m not connected to any database!' ) ; try { this . pool . end ( ( err ) => { if ( err ) return reject ( err ) ; } ) ; this . pool = null ; resolve ( ) ; } catch ( error ) { return reject ( error ) ; } ; } ) ; }
Closes the connection after all pending queries are executed.
Closes the connection after all pending queries are executed .