@zeruxjs/db
v0.0.3
Published
A powerful library that can connect with database with similar JSON structured query.
Maintainers
Readme
Lifecycle and safety
createDatabaseManager(config) connects each connector sequentially; an initialization failure now disconnects already-created connections. Always call await manager.disconnect() on application shutdown (idempotent). Further queries after disconnect fail closed. Query result references are own-property only and cannot traverse prototypes. Connector package names must be package specifiers, not user-provided arbitrary file paths. Query JSON is size/depth bounded. Array queries are not automatically transactions; use native connector transactions where atomicity is required.
Section 74 tenant and migration APIs
createTenantDatabaseFacade(base, {tenantId, tables: {logical:physical}, tenantColumn?}) exposes only tenant-bound select/insert/update/delete. It rejects joins, unions, subqueries, cross-database routes, nonallowlisted tables and tenant-field changes. Construct it only from a server-verified principal, never a query parameter. createDatabaseMigrationRunner(migrations,{transaction}) requires an actual exclusive and transaction-pinned host implementation for both journal and operations. It checks ordered IDs and SHA-256 drift and requires approval for reverse migrations. See root SECTION_74_DATABASE_AUTH_MIGRATIONS_TENANT_SECURITY.md. This contract does not automatically provide native transactions for any driver.
Release 0.0.2
Prepared to validate npm trusted publishing through GitHub Actions.
Release 0.0.3
Synchronized ecosystem release, including Zuixs CSS-entry support and documentation updates. Existing placeholder packages retain their documented limitations.
