Synchronous MySQL database manager built on top of sync-mysql. Current stable version is 2.3.4. Provides a class hierarchy for synchronous database operations including table creation from JSON schema, query building with insert/select/get methods, and is designed for Node.js. Differentiates from async drivers by offering blocking calls, suitable for scripts and CLIs. Requires auth.json with database field and structure.json for table definitions. Release cadence is sporadic.
npm install sync-mysql-databaseNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows synchronous MySQL operations: create database from auth and structure JSON, insert a row, and retrieve all rows.
Always provide the 'database' property in the auth object.
Ensure you call a terminal method (e.g., get(), execute()) after building the query.
Consider migrating to async MySQL drivers like mysql2 with synchronous wrapper via deasync or use better-sqlite3 for SQLite.
Run: npm install sync-mysql
Use const { Database } = require('sync-mysql-database');Add 'database' to the auth object, e.g., { user, host, password, database: 'mydb' }.