{"id":43839,"library":"simple-sql-orm","title":"simple-sql-orm","description":"A lightweight SQL ORM for Node.js inspired by Laravel's query builder, allowing fluent method chaining (table, where, select, orderBy, groupBy, skip/take, aggregate functions) and raw queries. Version 1.0.9 is the latest, released with minimal documentation and no clear release cadence. Key differentiators: simple API, MySQL-only, no TypeScript support, no connection pooling, no migrations. Suitable for small projects but lacks advanced features and has limited community adoption.","status":"active","version":"1.0.9","language":"javascript","source_language":"en","source_url":"https://github.com/simpledev0042/simple-sql-orm","tags":["javascript","SQL","MySQM","ORM","LARAVEL","query","json","automated"],"install":[{"cmd":"npm install simple-sql-orm","lang":"bash","label":"npm"},{"cmd":"yarn add simple-sql-orm","lang":"bash","label":"yarn"},{"cmd":"pnpm add simple-sql-orm","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"required for MySQL database connections","package":"mysql","optional":false}],"imports":[{"note":"The package exports an ORM class; CommonJS require with destructuring is correct: const { ORM } = require('simple-sql-orm').","wrong":"const orm = require('simple-sql-orm')","symbol":"ORM","correct":"import { ORM } from 'simple-sql-orm'"},{"note":"Named export for raw query types. Ensure proper destructuring.","wrong":"const QueryTypes = require('simple-sql-orm').QueryTypes","symbol":"QueryTypes","correct":"import { QueryTypes } from 'simple-sql-orm'"},{"note":"The package does not have a default export; only named export { ORM } and { QueryTypes }.","wrong":"import { ORM } from 'simple-sql-orm'","symbol":"default import","correct":"import ORM from 'simple-sql-orm'"}],"quickstart":{"code":"const { ORM } = require('simple-sql-orm');\n\n// Initialize ORM with host, database, user, password, port\nconst orm = new ORM('localhost', 'mydb', 'root', 'mypass', 3306);\n\n// Example: get all users\norm.table('users').get().then(users => {\n  console.log(users);\n}).catch(err => {\n  console.error(err);\n});\n\n// Example: complex query\norm.table('users')\n  .select('id', 'name')\n  .where('active', true)\n  .orderBy('name', 'asc')\n  .skip(0)\n  .take(10)\n  .get()\n  .then(rows => console.log(rows));","lang":"javascript","description":"Shows instantiation and basic query building with promises. The ORM returns promises for async operations."},"warnings":[{"fix":"Consider using a connection pool wrapper or switch to a more robust ORM like Sequelize.","message":"The package uses MySQL driver without connection pooling; each query creates a new connection unless managed manually.","severity":"gotcha","affected_versions":"<=1.0.9"},{"fix":"Verify actual behavior; expected: `GROUP BY first_name`.","message":"The `groupBy` method example in README shows incorrect output; it applies groupBy on first_name but outputs `GROUP BY 'users'.'id'`.","severity":"breaking","affected_versions":"<=1.0.9"},{"fix":"Always validate and escape user inputs before passing to ORM methods.","message":"The ORM does not sanitize inputs; where conditions with array values use IN clause directly, but string interpolation may lead to SQL injection if values are unsanitized.","severity":"gotcha","affected_versions":"<=1.0.9"},{"fix":"Use `import { ORM } from 'simple-sql-orm'` or `const { ORM } = require('simple-sql-orm')`.","message":"Import path issue: Some users try to import as default, but only named exports exist.","severity":"gotcha","affected_versions":"<=1.0.9"},{"fix":"Create your own declaration file or use with `// @ts-ignore`.","message":"No TypeScript definitions; package may not work with strict TypeScript configurations.","severity":"deprecated","affected_versions":"<=1.0.9"}],"env_vars":null,"search_vec":"'1.0.9':33 'adopt':73 'advanc':67 'aggreg':27 'allow':17 'api':49 'autom':81 'builder':16 'cadenc':45 'chain':20 'clear':43 'communiti':72 'connect':57 'differenti':47 'document':40 'featur':68 'fluent':18 'function':28 'groupbi':25 'inspir':11 'javascript':74 'json':80 'key':46 'lack':66 'laravel':13,78 'latest':36 'lightweight':6 'limit':71 'method':19 'migrat':60 'minim':39 'mysql':51 'mysql-on':50 'mysqm':76 'node.js':10 'orderbi':24 'orm':4,8,77 'pool':58 'project':64 'queri':15,31,79 'raw':30 'releas':37,44 'select':23 'simpl':2,48 'simple-sql-orm':1 'skip/take':26 'small':63 'sql':3,7,75 'suitabl':61 'support':55 'tabl':21 'typescript':54 'version':32","created_at":"2026-06-05T17:01:43.208219+00:00","updated_at":"2026-06-05T17:01:43.208219+00:00","problems":[{"fix":"Run `npm install simple-sql-orm` in your project directory.","cause":"Package not installed or npm install not run.","error":"Cannot find module 'simple-sql-orm'"},{"fix":"Use `const { ORM } = require('simple-sql-orm')` or `import { ORM } from 'simple-sql-orm'`.","cause":"Incorrect import: using default import when only named export exists.","error":"TypeError: ORM is not a constructor"},{"fix":"Use `npm install mysql2` instead of `mysql` and change connection logic, or alter MySQL user to use mysql_native_password.","cause":"MySQL 8+ uses caching_sha2_password by default; older mysql npm package may not support it.","error":"Error: ER_NOT_SUPPORTED_AUTH_MODE: Client does not support authentication protocol requested by server; consider upgrading MySQL client"},{"fix":"Ensure methods are invoked with parentheses: `orm.table('users').get()`.","cause":"Missing parentheses or chaining error: `orm.table('users').get` without calling `get()`.","error":"TypeError: orm.table(...).get is not a function"}],"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/simpledev0042/simple-sql-orm#readme","github":"https://github.com/simpledev0042/simple-sql-orm","docs":null,"changelog":null,"pypi":null,"npm":"simple-sql-orm","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}}