{"id":43835,"library":"simple-orm-mysql-adapter","title":"Simple ORM MySQL Adapter","description":"A MySQL/MariaDB adapter for the Simple ORM framework, providing database connectivity for Node.js applications. As of version 0.6.0, it supports transactions and joins. The adapter is designed to be used with the Simple ORM core, which handles test suites. It is a lightweight, unopinionated library that expects a pre-created MySQL connection object. Release cadence is irregular, and the package appears to be in early development or maintenance mode.","status":"maintenance","version":"0.6.0","language":"javascript","source_language":"en","source_url":"https://github.com/simple-orm/mysql-adapter","tags":["javascript","orm","mysql"],"install":[{"cmd":"npm install simple-orm-mysql-adapter","lang":"bash","label":"npm"},{"cmd":"yarn add simple-orm-mysql-adapter","lang":"bash","label":"yarn"},{"cmd":"pnpm add simple-orm-mysql-adapter","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Required for MySQL database connections","package":"mysql","optional":true}],"imports":[{"note":"Requires calling .create() to instantiate the adapter.","wrong":"const mysqlAdapter = require('simple-orm-mysql-adapter');","symbol":"default (create function)","correct":"const mysqlAdapter = require('simple-orm-mysql-adapter').create();"},{"note":"ESM import for the create function, available since v0.6.0.","wrong":"import mysqlAdapter from 'simple-orm-mysql-adapter';","symbol":"create","correct":"import { create } from 'simple-orm-mysql-adapter';"},{"note":"Default import gives the class directly; named export not available.","wrong":"import { SimpleORMAdapter } from 'simple-orm-mysql-adapter';","symbol":"SimpleORMAdapter","correct":"import SimpleORMAdapter from 'simple-orm-mysql-adapter';"}],"quickstart":{"code":"const mysql = require('mysql');\nconst configuration = { host: 'localhost', user: 'root', password: process.env.MYSQL_PASSWORD ?? '', port: 3306, database: 'test' };\nconst connection = mysql.createConnection(configuration);\nconst mysqlAdapter = require('simple-orm-mysql-adapter').create();\nmysqlAdapter.setConnection({ connection });\n// Now use mysqlAdapter with Simple ORM core","lang":"javascript","description":"Creates a MySQL connection and passes it to the adapter; shows CommonJS usage."},"warnings":[{"fix":"Upgrade to >=0.5.0 and use `.create()` instead of `new Adapter()`, then call `.setConnection()`.","message":"Version 0.5.0 changed the API from `new Adapter(connection)` to `.create()` and `.setConnection()`. Old code will break.","severity":"breaking","affected_versions":"<0.5.0"},{"fix":"Implement connection error handling and reconnect logic in your application.","message":"The adapter does not manage the MySQL connection lifecycle; you must handle connection errors and reconnection yourself.","severity":"gotcha","affected_versions":"all"},{"fix":"Consider migrating to a more actively maintained ORM like Sequelize or TypeORM.","message":"This package is no longer actively maintained. The Simple ORM core has moved to support other databases.","severity":"deprecated","affected_versions":">=0.6.0"}],"env_vars":null,"search_vec":"'0.6.0':22 'adapt':4,7,29 'appear':66 'applic':18 'cadenc':60 'connect':15,57 'core':39 'creat':55 'databas':14 'design':31 'develop':71 'earli':70 'expect':51 'framework':12 'handl':41 'irregular':62 'javascript':75 'join':27 'librari':49 'lightweight':47 'mainten':73 'mode':74 'mysql':3,56,77 'mysql/mariadb':6 'node.js':17 'object':58 'orm':2,11,38,76 'packag':65 'pre':54 'pre-creat':53 'provid':13 'releas':59 'simpl':1,10,37 'suit':43 'support':24 'test':42 'transact':25 'unopinion':48 'use':34 'version':21","created_at":"2026-06-05T17:01:42.569330+00:00","updated_at":"2026-06-05T17:01:42.569330+00:00","problems":[{"fix":"Use `require('simple-orm-mysql-adapter').create()` instead of `require('simple-orm-mysql-adapter')`.","cause":"Using the adapter directly without calling .create() first.","error":"TypeError: mysqlAdapter.setConnection is not a function"},{"fix":"Run `npm install simple-orm-mysql-adapter` and ensure you are using the correct package name.","cause":"The package is not installed or the module path is incorrect.","error":"Error: Cannot find module 'simple-orm-mysql-adapter'"}],"ecosystem":"npm","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":null,"cli_version":null,"type":"library","homepage":"https://github.com/simple-orm/mysql-adapter","github":"https://github.com/simple-orm/mysql-adapter","docs":null,"changelog":null,"pypi":null,"npm":"simple-orm-mysql-adapter","openapi_spec":null,"status_page":null,"smithery":null,"categories":["database"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-06-05","next_check":"2026-09-03","install_tag":null}}