Retrieves and processes data such as configuration files, manages manual database connections, and handles connection termination.
import Nexorm from 'nexorm/core';
/* Connect to database */
Nexorm.$connect('nexorm').then(async () => {
console.log('Connected to database');
});
/* Disconnect from database */
Nexorm.$disconnect('nexorm').then(() => {
console.log('Disconnected from database');
});
/* Connect all databases */
Nexorm.$connectAll().then(() => {
console.log('Connected to all databases');
});
/* Close all connections */
Nexorm.$closeAllConnections().then(() => {
console.log('Closed all connections');
});
/* Database Drop */
Nexorm.$drop('nexorm').then(() => {
console.log('Dropped database');
});
/* Database Connections */
console.log(Nexorm.$connections); /* Return {{ $size: number; $list: string[]; }} */
/* Database Providers */
console.log(Nexorm.$providers); /* Return {string[]} */
/* Database Configurations */
console.log(Nexorm.$configs); /* Return {NexormConfig} */