Alinex Database is a Node.js module that provides a comprehensive database abstraction layer, designed to simplify interactions with various relational database management systems (RDBMS) such as MySQL and PostgreSQL. Currently at version 1.1.2, this library offers key features including robust connection pooling, support for database clustering, automatic SSH tunneling for secure connections, and an object-to-query language builder. It aims for ease of configuration and use across different database types, integrating closely with the broader Alinex Namespace ecosystem for configuration management. While a specific release cadence isn't detailed, the project appears actively maintained, offering a stable API for its stated features. Its primary differentiators lie in its bundled advanced connection management capabilities and integrated query building, aiming to reduce boilerplate for common database operations.
Verified import paths — ran on the pinned version, not inferred.
The primary way to import the library in v1.x, as shown in the documentation, is via CommonJS `require`. Direct ESM `import` might not be fully supported or require a CommonJS interop wrapper.
Database instances are obtained asynchronously through a static `instance` method on the main `database` export, utilizing a callback pattern, not via a constructor.
Connections are acquired from the database pool via an asynchronous `connect` method on the database instance, also using a callback. Ensure this connection is released when done.
This quickstart demonstrates the core workflow: obtaining a database instance, connecting to it from the pool, executing a simple SQL query, and ensuring proper connection release and database instance closure using callback functions.
Breaking-change detection hasn't run for this library yet.
CVE tracking and dependency tree are planned for a later release.