Custom query format for named parameters in node-mysql (mysql2 compatible). Version 1.0.2. Allows use of named placeholders prefixed with : for values and :: for identifiers (e.g., column names, table names) in MySQL queries. Integrates with mysql's connection.config.queryFormat. Lightweight, no dependencies. Alternatives: knex, squel, but this is a minimal escape-only solution.
npm install mysql-named-params-escapeNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows how to set queryFormat on a mysql connection and use named placeholders for identifiers (::) and values (:).
Ensure :: is used for identifiers (table, column names) and : for values.
Always ensure params object contains all keys used in the query.
Use with mysql or mysql2 connection. For other drivers, consider alternatives.
Use `import npEscape from 'mysql-named-params-escape'` or `const npEscape = require('mysql-named-params-escape')`Use :: for identifiers (e.g., ::table) and : for values (e.g., :value).
Ensure params is an object with matching keys for all placeholders in the query.
No dependency data recorded yet.