{"id":43852,"library":"slintorm","title":"SlintORM","description":"SlintORM v1.0.0 is a minimal, fully typed ORM for TypeScript that supports SQLite, PostgreSQL, and MySQL. Released as a stable version with no specified release cadence, it distinguishes itself from other ORMs like TypeORM or Prisma by offering a lightweight, Go's GORM-inspired API with explicit decorator-driven schema definitions in interfaces. Key features include auto table creation, migrations, type-safe queries, relationships (one-to-one, one-to-many, many-to-many), advanced query building (joins, aggregates, subqueries, window functions, preloads), and soft deletes. It currently lacks a large community or extensive documentation, positioning it as a niche alternative for developers seeking minimalism over full-featured ORMs.","status":"active","version":"1.0.0","language":"javascript","source_language":"en","source_url":"https://github.com/emeraldlinks/slintorm","tags":["javascript","typescript"],"install":[{"cmd":"npm install slintorm","lang":"bash","label":"npm"},{"cmd":"yarn add slintorm","lang":"bash","label":"yarn"},{"cmd":"pnpm add slintorm","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Required for SQLite driver support","package":"better-sqlite3","optional":true},{"reason":"Required for PostgreSQL driver support","package":"pg","optional":true},{"reason":"Required for MySQL driver support","package":"mysql2","optional":true}],"imports":[{"note":"Package is ESM-only (TypeScript). CommonJS require will not work.","wrong":"const ORMManager = require('slintorm')","symbol":"ORMManager","correct":"import ORMManager from 'slintorm'"},{"note":"Model is a named export, not default.","wrong":"import Model from 'slintorm'","symbol":"Model","correct":"import { Model } from 'slintorm'"},{"note":"DataType provides type constants for column definitions.","wrong":null,"symbol":"DataType","correct":"import { DataType } from 'slintorm'"}],"quickstart":{"code":"import ORMManager from 'slintorm';\n\nconst orm = new ORMManager({\n  driver: 'sqlite',\n  database: 'test.db',\n  host: 'localhost',\n  port: 5432,\n  username: process.env.DB_USER ?? 'user',\n  password: process.env.DB_PASS ?? ''\n});\n\ninterface User {\n  id?: number;\n  name: string;\n  email?: string;\n  createdAt?: string;\n  deletedAt?: string;\n}\n\nconst userModel = orm.model<User>({ table: 'users', schema: User });\n\nasync function main() {\n  await orm.sync();\n  const users = await userModel.find({ where: { name: 'Alice' } });\n  console.log(users);\n}\n\nmain().catch(console.error);","lang":"typescript","description":"Initializes ORMManager with SQLite, defines a User model, syncs schema, and queries users by name."},"warnings":[{"fix":"Ensure every model interface uses @auto on auto-increment primary keys like id?: number.","message":"Model interface comments with @ annotations are parsed as schema definitions. Omitting @auto on primary key may cause auto-increment not to work.","severity":"breaking","affected_versions":">=1.0.0"},{"fix":"Always add @nullable comment annotation to fields that should accept NULL values, even if TypeScript marks them optional.","message":"The package does not support runtime validation of nullable fields. Declaring a field as optional (?) in TypeScript does not enforce nullable in DB if @nullable is missing in comment.","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"Add @softDelete comment to the deletedAt field in your model interface to enable soft delete functionality.","message":"Soft delete is enabled by adding @softDelete in interface comment. Without it, deletedAt field is not automatically managed.","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"Double-check foreignKey in relationship annotations matches an actual column in the model interface.","message":"Relationships defined with @relation or @relationship annotations are not type-checked against actual foreign keys. Mismatched foreignKey names cause silent runtime errors.","severity":"gotcha","affected_versions":">=1.0.0"}],"env_vars":null,"search_vec":"'advanc':81 'aggreg':85 'altern':107 'api':47 'auto':60 'build':83 'cadenc':27 'communiti':98 'creation':62 'current':94 'decor':51 'decorator-driven':50 'definit':54 'delet':92 'develop':109 'distinguish':29 'document':101 'driven':52 'explicit':49 'extens':100 'featur':58,115 'full':114 'full-featur':113 'fulli':7 'function':88 'go':42 'gorm':45 'gorm-inspir':44 'includ':59 'inspir':46 'interfac':56 'javascript':117 'join':84 'key':57 'lack':95 'larg':97 'lightweight':41 'like':34 'mani':76,78,80 'many-to-mani':77 'migrat':63 'minim':6,111 'mysql':17 'nich':106 'offer':39 'one':70,72,74 'one-to-mani':73 'one-to-on':69 'orm':9,33,116 'posit':102 'postgresql':15 'preload':89 'prisma':37 'queri':67,82 'relationship':68 'releas':18,26 'safe':66 'schema':53 'seek':110 'slintorm':1,2 'soft':91 'specifi':25 'sqlite':14 'stabl':21 'subqueri':86 'support':13 'tabl':61 'type':8,65 'type-saf':64 'typeorm':35 'typescript':11,118 'v1.0.0':3 'version':22 'window':87","created_at":"2026-06-05T17:01:47.297334+00:00","updated_at":"2026-06-05T17:01:47.297334+00:00","problems":[{"fix":"npm install better-sqlite3","cause":"Missing optional dependency for SQLite driver.","error":"Cannot find module 'better-sqlite3'"},{"fix":"Ensure driver option is correctly set and the database file path is valid.","cause":"ORMManager instance may not have sync method if driver initialization failed.","error":"TypeError: orm.sync is not a function"},{"fix":"Use orm.sync({ alter: true }) to auto-migrate schema changes without recreating tables.","cause":"Running sync() multiple times on existing tables without migration strategy.","error":"QueryFailedError: table 'users' already exists"}],"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/emeraldlinks/slintorm","github":"https://github.com/emeraldlinks/slintorm","docs":null,"changelog":null,"pypi":null,"npm":"slintorm","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}}