A lightweight SQL query builder for MySQL, designed for the Webiny framework. Current stable version is 1.9.0. It provides a simple, table-oriented API for building and executing SQL queries. The package has a peer dependency on serverless-mysql which handles the actual MySQL connection, making it suitable for serverless environments like AWS Lambda. It supports basic CRUD operations with automatic type handling and parameterized queries. Release cadence is low; updates are infrequent and tied to Webiny-js releases.
npm install webiny-sql-table-mysqlNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Creates a table object with schema definition, inserts a record, and queries using a where clause.
Use import syntax. If CommonJS required, wrap in dynamic import: import('webiny-sql-table-mysql').then(m => ...)Replace { $eq: value } with value directly in the where object.Always call await db.end() after query operations to close the connection.
Ensure values passed to insert/update match the MySQL column types. Use explicit type conversions if needed.
Use import syntax or dynamic import: import('webiny-sql-table-mysql')Switch to import { createSqlTableMySQL } from 'webiny-sql-table-mysql'