Skip to main content

TypeScript-only ORM

This package works with DenoIt is unknown whether this package works with Cloudflare Workers, Node.js, Bun
It is unknown whether this package works with Cloudflare Workers
It is unknown whether this package works with Node.js
This package works with Deno
It is unknown whether this package works with Bun
JSR Score
41%
Published
a month ago (0.0.3)

dORM

A fork of MikroORM for Deno. Currently, extremely unstable.

It only supports:

  • Typescript
  • PostgreSQL
  • Manual configuration
  • TSMorph metadata provider
  • No metadata cache
  • No bundling

Example usage:

import {Configuration, defineConfig, Entity, PrimaryKey, MikroORM, Property} from '@dorm/core';
import {PostgreSqlDriver} from '@dorm/postgresql';

@Entity({ tableName: "test" })
class TestEntity {
    @PrimaryKey()
    id!: number;

    @Property()
    name!: string;
}

const config = defineConfig({
    debug: true,
    driver: PostgreSqlDriver,
    password: "postgres",
    dbName: "postgres",
    entities: [
        TestEntity,
    ],
    allowGlobalContext: true,
});

const configObj = new Configuration(config);

const orm = await MikroORM.init(configObj);

console.log(await orm.em.find(TestEntity, { id: 1 }));

// Cleanup
orm.close();

Add Package

deno add jsr:@dorm/core

Import symbol

import * as core from "@dorm/core";

---- OR ----

Import directly with a jsr specifier

import * as core from "jsr:@dorm/core";

Add Package

npx jsr add @dorm/core

Import symbol

import * as core from "@dorm/core";

Add Package

yarn dlx jsr add @dorm/core

Import symbol

import * as core from "@dorm/core";

Add Package

pnpm dlx jsr add @dorm/core

Import symbol

import * as core from "@dorm/core";

Add Package

bunx jsr add @dorm/core

Import symbol

import * as core from "@dorm/core";