A SQL builder library that uses a matrix object (MQL) to dynamically construct MySQL queries. Current stable version is 1.0.21. It allows building SELECT, INSERT, UPDATE, and DELETE queries programmatically using table and column definitions. Depends on the ext-mysql package for database connectivity. Differentiators include a unique matrix-based approach for defining queries and handling joins/relationships. However, the library is niche and has very limited adoption, with minimal documentation and no active development since 2020.
npm install mql-mysqlNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows how to create an MQL object, add a table and columns, then execute a SELECT query against MySQL.
Set ENCODE, MYSQL_HOSTNAME, MYSQL_USER, MYSQL_PASSWORD, MYSQL_DATABASE before importing ext-mysql.
Pass the connection as second argument: await MQLtoMySQL.select(mql, conn)
Call MySQL.CREATE_POOL() before any MQLtoMySQL operations.
Use mql.addTable('person') then access mql.person. Avoid aliases that are reserved words or cannot be property names.Ensure table is added first with mql.addTable('tableName') before accessing mql.tableNameCall MySQL.CREATE_POOL() after setting environment variables
Use const { MQLtoMySQL } = require('mql-mysql')