Database module for the JSite package, providing a structured database interface with built-in auditing (SCD Type 4 row-based and column-based change tracking), SQL formatting via sql-formatter, SQL generation via json-sql-builder2, and MySQL support via the mysql module. Version 6.1.0 is the latest stable release. Key differentiators include integrated audit trail capabilities and customizable configuration for format, SQL dialect, and MySQL connection.
npm install jsite-databaseNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Initializes a JSiteDatabase instance with MySQL connection and row-based auditing, then waits for readiness via ready().
Review auditing documentation and migrate your schema accordingly.
Use 'json-sql-builder2' as a dependency.
Replace 'mysql' with 'mysql2' in options or use a compatible wrapper.
Always use 'new JSiteDatabase(options)'.
Run 'npm install jsite-database' in your project directory.
Use 'const JSiteDatabase = require('jsite-database')' and instantiate with 'new JSiteDatabase()'.Ensure MySQL is running on localhost:3306, or provide correct host and port in options.
Use one of 'row', 'column', or omit for default 'row'.