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

# Additional API

**EventManagerInterface & CacheManagerInterface**

EventManagerInterface now includes CacheManagerInterface, merging their functionality.

**Methods:**

* **clearCache:**
  * **key:** Cache key to be cleared (string).
  * **Returns:** Promise\<void> signaling successful cache clearing.

**Field:**

* **cache:** Implementation of CacheManagerInterface that allows cache management.

***

**IndexManagerInterface**

**Methods:**

* **createIndex:**
  * **index:** Object implementing IndexInterface\<DT>. Describes the index to be created.
  * **id (optional):** Identifier of the index.
  * **indexName:** Name of the index.
  * **columns:** List of columns included in the index.
  * **tableName (optional):** Name of the table to which the index is applied.
  * **options (optional):** Index options specific to the database.
  * **getString (optional):** Boolean indicating whether to get the query string (boolean).
  * **Returns:** Promise which may be a string (if getString true) or void.
* **dropIndex:**
  * **parameters:** Object implementing DropIndexInterface\<DT>. Describes parameters for dropping the index.
  * **indexName:** Name of the index.
  * **tableName (optional, for MySQL):** Name of the table from which the index is being dropped.
  * **getString (optional):** Boolean indicating whether to get the query string (boolean).
  * **Returns:** Promise which may be a string (if getString true) or void.

***

**TriggerManagerInterface**

**Methods:**

* **createTrigger:**
  * **trigger:** Object implementing TriggerInterface\<DT>. Describes the trigger to be created.
  * **id (optional):** Identifier of the trigger.
  * **name:** Name of the trigger.
  * **timing:** Timing of the trigger, defined in TriggerTimingsTypes.
  * **event:** Event of the trigger, defined in TriggerEventsTypes.
  * **tableName:** Name of the table for which the trigger is created.
  * **triggerFunction:** Function called by the trigger.
  * **For PostgreSQL:** triggerFunctionName (required).
  * **getString (optional):** Boolean indicating whether to get the query string (boolean).
  * **Returns:** Promise which may be a string (if getString true) or void.
* **dropTrigger:**
  * **parameters:** Object implementing DropTriggerInterface\<DT>. Describes parameters for dropping the trigger.
  * **triggerName:** Name of the trigger.
  * **tableName (optional, for PostgreSQL):** Name of the table from which the trigger is being dropped.
  * **getString (optional):** Boolean indicating whether to get the query string (boolean).
  * **Returns:** Promise which may be a string (if getString true) or void.

***

**Overview**

* **CacheManagerInterface:** Allows managing the cache through the `clearCache` method, which clears the cache for the specified key.
* **EventManagerInterface:** Includes cache management capabilities through CacheManagerInterface and provides access to the cache manager.
* **IndexManagerInterface:** Allows creating and dropping indexes in the database, with the option to get SQL queries.
* **TriggerManagerInterface:** Allows creating and dropping triggers in the database, with the option to get SQL queries and support for database-specific functions.


---

# 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, and the optional `goal` query parameter:

```
GET https://myroslavs-organization.gitbook.io/orm/api/additional-api.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
