A library for generating MySQL administrative SQL statements such as CREATE DATABASE, CREATE ROLE, CREATE USER, and GRANT. Version 0.1.1 is the only release; no further updates have been made. It is similar to Squel but for DDL/DCL statements. Unlike ORMs that expect roles/users/databases to exist already, this library provides an API to generate these statements programmatically, with proper escaping and support for browser environments.
npm install mysql-admin-sql-genNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows how to generate CREATE DATABASE, CREATE USER, and GRANT SQL statements using the library.
Pair with mysql or mysql2 to execute the generated SQL.
Evaluate if Squel or knex meets your needs; they are actively maintained.
Rename files to .mjs or use Babel/TypeScript to transpile.
Create a .d.ts file for your project or extend with custom typings.
Run 'npm install mysql-admin-sql-gen' to install the package.
If using Node, rename your file to .mjs or set 'type': 'module' in package.json. If using a bundler, ensure it handles ES modules.
Use 'import { createDatabase } from 'mysql-admin-sql-gen'.'No dependency data recorded yet.