Registry / database / oly-orm

oly-orm

JSON →
library1.0.0jsnpmunverified

oly-orm is an ORM for TypeScript that integrates with the oly dependency injection framework, providing decorator-based entity definitions and repository patterns. Current stable version is 1.0.0. It uses SQLite in-memory by default and supports common database operations through repositories. Differentiators include tight integration with oly's IoC container and minimal boilerplate compared to TypeORM. Release cadence is low; package appears to be in maintenance mode.

database
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Decorator names are lowercase, import as named exports

import { id } from 'oly-orm'

Use lowercase 'column', not uppercase

import { column } from 'oly-orm'

Repository is a named export, not default

import { Repository } from 'oly-orm'

Shows how to define an entity with decorators, create a repository, and perform an insert and findAll operation.

import { Kernel } from 'oly'; import { id, column, Repository } from 'oly-orm'; class Article { @id() id?: number; @column() title!: string; } class ArticleRepository extends Repository.of(Article) {} async function main() { const k = Kernel.create({ DATABASE_URL: ':memory:' }); const a = k.get(ArticleRepository); await k.start(); await a.insert({ title: 'Hello' }); console.log(await a.findAll()); } main().catch(console.error);
Debug
Known footguns
breakingoly-orm v1.0.0 requires oly ^0.15.1; incompatible with newer oly versions.
deprecatedoly-orm appears unmaintained; last release 1.0.0 in 2019. Consider using TypeORM or MikroORM.
gotchaImporting from 'oly-orm' requires both decorators and Kernel from 'oly'. Missing Kernel initialization leads to runtime errors.
Upgrade
Version history

Breaking-change detection hasn't run for this library yet.

Audit
Security & dependencies

CVE tracking and dependency tree are planned for a later release.

Agent activity
9 hits · last 30 days
gptbot
3
ahrefsbot
2
mj12bot
1
Resources