> For the complete documentation index, see [llms.txt](https://fivesobes.gitbook.io/nexorm/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://fivesobes.gitbook.io/nexorm/core.md).

# Core

Engine Manual **Connections** and **Disconnection** Handling

Retrieves and processes data such as configuration files, manages manual database connections, and handles connection termination.

*<mark style="color:red;">**Manual Connection Should Be Used Only When**</mark>* *<mark style="color:yellow;">**`$autoConnect:`**</mark>**` `**<mark style="color:blue;">**`false`**</mark>*

*For example:*

```typescript
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} */
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://fivesobes.gitbook.io/nexorm/core.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
