{"id":41983,"library":"soul-orm","title":"Soul ORM","description":"soul-orm is a lightweight, promise-based ORM for Node.js that supports MySQL, PostgreSQL, SQLite, and MSSQL. Version 1.2.0 is the latest stable release, with monthly releases. It features a fluent query builder with chainable methods like where, order, limit, and field, and provides a simple transaction API via beginTx/commit/rollback. Unlike heavy ORMs like Sequelize or TypeORM, Soul ORM focuses on a minimal API surface and zero-config setup, but it lacks advanced features like relations and migrations. It ships TypeScript types.","status":"active","version":"1.2.0","language":"javascript","source_language":"en","source_url":"https://github.com/test/soul-orm","tags":["javascript","soul-orm","typescript"],"install":[{"cmd":"npm install soul-orm","lang":"bash","label":"npm"},{"cmd":"yarn add soul-orm","lang":"bash","label":"yarn"},{"cmd":"pnpm add soul-orm","lang":"bash","label":"pnpm"}],"dependencies":[],"imports":[{"note":"ESM-only since v1.0; the package does not export a default for CJS.","wrong":"const soul = require('soul-orm')","symbol":"default","correct":"import soul from 'soul-orm'"},{"note":"db is not a named export; you must call createConnection to obtain a db instance.","wrong":"import { db } from 'soul-orm'","symbol":"db","correct":"import { createConnection } from 'soul-orm'; const db = createConnection(options)"},{"note":"createConnection is a named export, not the default.","wrong":"import createConnection from 'soul-orm'","symbol":"createConnection","correct":"import { createConnection } from 'soul-orm'"}],"quickstart":{"code":"import { createConnection } from 'soul-orm';\nimport { config } from 'dotenv';\nconfig();\n\nconst db = createConnection({\n  host: process.env.DB_HOST ?? 'localhost',\n  user: process.env.DB_USER ?? 'root',\n  password: process.env.DB_PASS ?? '',\n  database: process.env.DB_NAME ?? 'test'\n});\n\nasync function main() {\n  const users = await db.table('user')\n    .where({ name: 'jake' })\n    .order('age', 'desc')\n    .select();\n  console.log(users);\n\n  await db.table('user').insert({ name: 'new', age: 25 });\n  await db.table('user').where({ name: 'new' }).delete();\n\n  await db.close();\n}\nmain().catch(console.error);","lang":"typescript","description":"Demonstrates creating a connection, querying with where/order/select, inserting, and deleting."},"warnings":[{"fix":"Use async/await or .then() instead of callbacks.","message":"The package dropped support for callbacks; all methods return promises.","severity":"breaking","affected_versions":">=1.0"},{"fix":"Replace .field('name','age') with .columns('name','age').","message":"The .field() method is deprecated in 1.2.0; use .columns() instead.","severity":"deprecated","affected_versions":">=1.2.0"},{"fix":"Create a new table instance for each query: db.table('user') every time.","message":"The query builder methods mutate internal state; reusing a query builder instance may cause unexpected behavior.","severity":"gotcha","affected_versions":">=0.x"},{"fix":"Use a single level of transaction; commit or rollback before starting another.","message":"Transactions require calling beginTx() on the db instance; nested transactions are not supported.","severity":"gotcha","affected_versions":">=1.0"},{"fix":"Upgrade to 1.2.0 or use .find() with a null check.","message":"The .findOrEmpty() method was added in 1.2.0; in 1.1.x it does not exist.","severity":"breaking","affected_versions":"1.1.x"}],"env_vars":null,"search_vec":"'1.2.0':23 'advanc':78 'api':52,68 'base':11 'begintx/commit/rollback':54 'builder':37 'chainabl':39 'config':73 'featur':33,79 'field':46 'fluent':35 'focus':64 'heavi':56 'javascript':88 'lack':77 'latest':26 'lightweight':8 'like':41,58,80 'limit':44 'method':40 'migrat':83 'minim':67 'month':30 'mssql':21 'mysql':17 'node.js':14 'order':43 'orm':2,5,12,57,63,91 'postgresql':18 'promis':10 'promise-bas':9 'provid':48 'queri':36 'relat':81 'releas':28,31 'sequel':59 'setup':74 'ship':85 'simpl':50 'soul':1,4,62,90 'soul-orm':3,89 'sqlite':19 'stabl':27 'support':16 'surfac':69 'transact':51 'type':87 'typeorm':61 'typescript':86,92 'unlik':55 'version':22 'via':53 'zero':72 'zero-config':71","created_at":"2026-06-04T18:55:03.565148+00:00","updated_at":"2026-06-04T18:55:03.565148+00:00","problems":[{"fix":"Change to: import { createConnection } from 'soul-orm';","cause":"Using default import instead of named import.","error":"Error: createConnection is not a function"},{"fix":"Add await before the query call: const users = await db.table('user').where({...}).select();","cause":"Missing await or using callback pattern.","error":"TypeError: db.table(...).where(...).select 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/test/soul-orm#readme","github":"https://github.com/test/soul-orm","docs":null,"changelog":null,"pypi":null,"npm":"soul-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-04","next_check":"2026-09-02","install_tag":null}}