Lupdo-mysql is a MySQL/MariaDB driver for the Lupdo database abstraction layer. Version 2.0.0 requires Node >=18.0.0 and peer dependency lupdo ^4.0.1. It wraps mysql2 internally providing typed TypeScript support, named/numeric placeholders, and a custom type parser that converts boolean to number, bigint to number or BigInt, geometry to JSON string, and all other types to string. Key differentiators: force UTC timezone, default charset UTF8MB4_UNICODE_CI, support for host:port lists, and row-as-array mode. It does NOT support array parameters and ignores TypeBinding type definitions.
npm install lupdo-mysqlNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows how to create a PDO with connection config and pool sizing, execute a parameterized query, and safely disconnect.
Bind parameters individually (e.g., multiple ? placeholders) instead of passing an array.
Do not rely on Lupdo's TypeBinding types; pass plain values.
Check for 1/0 instead of true/false when reading results.
Parse zerofill strings to Number or BigInt before arithmetic.
Use JSON.parse() to convert geometry strings into objects if needed.
Upgrade Node.js to >=18.0.0.
Run 'npm install lupdo-mysql lupdo' (lupdo is a peer dependency).
Use 'const { createMysqlPdo } = require('lupdo-mysql')'.Set 'authPlugins' option or ALTER USER to mysql_native_password.
Check connection config and ensure query returns rows; add error handling.